Changeset: f69c11496f24 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f69c11496f24 Branch: default Log Message:
merge diffs (truncated from 12496 to 300 lines): diff --git a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.SQL.py b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.SQL.py new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.SQL.py @@ -0,0 +1,19 @@ +from MonetDBtesting.sqltest import SQLTestCase +import pymonetdb, os + +conn1 = pymonetdb.connect(database=os.getenv("TSTDB"), port=int(os.getenv("MAPIPORT")), autocommit=True) +cur1 = conn1.cursor() +try: + cur1.execute('select cast(1 as hugeint)') + suffix = '.int128' +except pymonetdb.DatabaseError as e: + suffix = '' +cur1.close() +conn1.close() + +with SQLTestCase() as tc: + tc.connect() + with open('convert-function-test.Bug-3460.sql') as f: + tc.execute(query=None, client='mclient', stdin=f)\ + .assertMatchStableOut(fout='convert-function-test.Bug-3460.stable.out%s' % (suffix))\ + .assertMatchStableError(ferr='convert-function-test.Bug-3460.stable.err%s' % (suffix)) diff --git a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err --- a/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err +++ b/sql/test/BugTracker-2016/Tests/convert-function-test.Bug-3460.stable.err @@ -1,3275 +1,3240 @@ -stderr of test 'convert-function-test.Bug-3460` in directory 'sql/test/BugTracker-2016` itself: - - -# 19:10:34 > -# 19:10:34 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=37752" "--set" "mapi_usock=/var/tmp/mtest-10540/.s.monetdb.37752" "--set" "monet_prompt=" "--forcemito" "--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2016" "--set" "embedded_r=yes" -# 19:10:34 > - -# builtin opt gdk_dbpath = /export/scratch2/dinther/INSTALL/var/monetdb5/dbfarm/demo -# builtin opt gdk_debug = 0 -# builtin opt gdk_vmtrim = no -# builtin opt monet_prompt = > -# builtin opt monet_daemon = no -# builtin opt mapi_port = 50000 -# builtin opt mapi_open = false -# builtin opt mapi_autosense = false -# builtin opt sql_optimizer = default_pipe -# builtin opt sql_debug = 0 -# cmdline opt gdk_nr_threads = 0 -# cmdline opt mapi_open = true -# cmdline opt mapi_port = 37752 -# cmdline opt mapi_usock = /var/tmp/mtest-10540/.s.monetdb.37752 -# cmdline opt monet_prompt = -# cmdline opt gdk_dbpath = /export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2016 -# cmdline opt embedded_r = yes -# cmdline opt gdk_debug = 536870922 - -# 19:10:35 > -# 19:10:35 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-10540" "--port=37752" -# 19:10:35 > - -MAPI = (monetdb) /var/tmp/mtest-10540/.s.monetdb.37752 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, bit) from T_BOOLEAN; -- BIT not valid data type ERROR = !Type (bit) unknown in: "select v, convert(v, bit)" - !syntax error, unexpected FROM in: "from" + !syntax error in: "from" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-24770/.s.monetdb.36959 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, hugeint) from T_BOOLEAN; ERROR = !Type (hugeint) unknown in: "select v, convert(v, hugeint)" - !syntax error, unexpected FROM in: "from" + !syntax error in: "from" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-24770/.s.monetdb.36959 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, float) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and double(53,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, float(24)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and real(24,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, real) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and real(24,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, double) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and double(53,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, double precision) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and double(53,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, numeric) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(18,3) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, decimal) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(18,3) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, numeric(7)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(7,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, decimal(9)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(9,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, numeric(12,0)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(12,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, decimal(15,3)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(15,3) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, varchar) from T_BOOLEAN; -- missing length specification ERROR = !CHARACTER VARYING needs a mandatory length specification in: "select v, convert(v, varchar)" - !syntax error, unexpected FROM in: "from" -CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 + !syntax error in: "from" +CODE = 42000 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, longvarchar) from T_BOOLEAN; -- LONGVARCHAR not valid data type ERROR = !Type (longvarchar) unknown in: "select v, convert(v, longvarchar)" - !syntax error, unexpected FROM in: "from" + !syntax error in: "from" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, long varchar) from T_BOOLEAN; -- LONG VARCHAR not valid data type ERROR = !Type (long) unknown in: "select v, convert(v, long varchar" - !syntax error, unexpected ')' in: ")" + !syntax error in: ")" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, Binary) from T_BOOLEAN; -- BINARY not valid data type -ERROR = !syntax error, unexpected ')', expecting LARGE in: "select v, convert(v, binary)" -CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +ERROR = !syntax error in: "select v, convert(v, binary)" +CODE = 42000 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, varBinary) from T_BOOLEAN; -- VARBINARY not valid data type ERROR = !Type (varbinary) unknown in: "select v, convert(v, varbinary)" - !syntax error, unexpected FROM in: "from" + !syntax error in: "from" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, longvarBinary) from T_BOOLEAN; -- LONGVARBINARY not valid data type ERROR = !Type (longvarbinary) unknown in: "select v, convert(v, longvarbinary)" - !syntax error, unexpected FROM in: "from" + !syntax error in: "from" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, Blob) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and blob(0,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, date) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and date(0,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, time) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and time(1,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, timestamp) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and timestamp(7,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-29584/.s.monetdb.33398 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, time with time zone) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and timetz(1,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-29584/.s.monetdb.33398 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, convert(v, timestamp with time zone) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and timestamptz(7,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as bit) from T_BOOLEAN; -- BIT not valid data type ERROR = !Type (bit) unknown in: "select v, cast(v as bit)" - !syntax error, unexpected FROM in: "from" + !syntax error in: "from" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-24770/.s.monetdb.36959 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as hugeint) from T_BOOLEAN; ERROR = !Type (hugeint) unknown in: "select v, cast(v as hugeint)" - !syntax error, unexpected FROM in: "from" + !syntax error in: "from" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-24770/.s.monetdb.36959 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as float) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and double(53,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as float(24)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and real(24,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as real) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and real(24,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as double) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and double(53,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as double precision) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and double(53,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as numeric) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(18,3) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as decimal) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(18,3) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as numeric(7)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(7,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as decimal(9)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(9,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as numeric(12,0)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(12,0) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as decimal(15,3)) from T_BOOLEAN; -- conversion not supported ERROR = !types boolean(1,0) and decimal(15,3) are not equal for column 'v' CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as varchar) from T_BOOLEAN; ERROR = !CHARACTER VARYING needs a mandatory length specification in: "select v, cast(v as varchar)" - !syntax error, unexpected FROM in: "from" -CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 + !syntax error in: "from" +CODE = 42000 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as longvarchar) from T_BOOLEAN; -- LONGVARCHAR not valid data type ERROR = !Type (longvarchar) unknown in: "select v, cast(v as longvarchar)" - !syntax error, unexpected FROM in: "from" + !syntax error in: "from" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as long varchar) from T_BOOLEAN; -- LONG VARCHAR not valid data type ERROR = !Type (long) unknown in: "select v, cast(v as long varchar" - !syntax error, unexpected ')' in: ")" + !syntax error in: ")" CODE = 22000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 QUERY = SELECT v, cast(v as Binary) from T_BOOLEAN; -- BINARY not valid data type -ERROR = !syntax error, unexpected ')', expecting LARGE in: "select v, cast(v as binary)" -CODE = 42000 -MAPI = (monetdb) /var/tmp/mtest-30274/.s.monetdb.37685 +ERROR = !syntax error in: "select v, cast(v as binary)" +CODE = 42000 +MAPI = (monetdb) /var/tmp/mtest-146634/.s.monetdb.36912 _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list