Changeset: 7a7be64856c0 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=7a7be64856c0 Added Files: sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.sql sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.stable.err sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.stable.out Modified Files: sql/test/BugTracker-2016/Tests/All Branch: Jun2016 Log Message:
Add test for Bug 4058. diffs (254 lines): diff --git a/sql/test/BugTracker-2016/Tests/All b/sql/test/BugTracker-2016/Tests/All --- a/sql/test/BugTracker-2016/Tests/All +++ b/sql/test/BugTracker-2016/Tests/All @@ -42,3 +42,4 @@ innerjoin-leftjoin-or.Bug-4049 create_merge_table_withdata.Bug-4041 timestamp_with_tz_fromstr.Bug-4019 CREATE_INDEX_breaks_table_queries.Bug-4053 +concat_2_integers.Bug-4058 diff --git a/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.sql b/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.sql @@ -0,0 +1,49 @@ +START TRANSACTION; + +CREATE TABLE "sys"."test_bug4058" ( + "f1" INTEGER NOT NULL, + "f2" INTEGER NOT NULL, + "f3" CHARACTER LARGE OBJECT NOT NULL, + "f4" BOOLEAN NOT NULL +); + +INSERT INTO "sys"."test_bug4058" VALUES +(81,1310,'V',true), +(303,1205,'V',true), +(601,1502,'V',true), +(839,1312,'A',true), +(408,1302,'G',false), +(665,1410,'V',true), +(267,1604,'A',true), +(556,1208,'G',false), +(386,1409,'G',false), +(831,1606,'A',true), +(681,1509,'G',false), +(784,1511,'A',true), +(777,1503,'A',true), +(781,1407,'V',true), +(682,1402,'V',true), +(796,1507,'V',true), +(743,1505,'V',true), +(715,1409,'G',false), +(769,1402,'A',true), +(760,1511,'A',true); + +select * from "sys"."test_bug4058" limit 10; + + +create table "sys"."test_bug4058_tmp" as ( select * from "sys"."test_bug4058" limit 10); + +select * from (select * from "sys"."test_bug4058" where f3='V' AND f4=true) as tmp where f1||f2 NOT IN (select f1||f2 from "sys"."test_bug4058_tmp"); -- WORKS + +select * from (select * from "sys"."test_bug4058" where f1||f2 NOT IN (select f1||f2 from "sys"."test_bug4058_tmp")) as tmp where f3='V' AND f4=true; +-- DOES NOT WORK: dev/sql/backends/monet5/rel_bin.c:702: exp_bin: Assertion `0' failed. + +select * from "sys"."test_bug4058" where f3='V' AND f4=true AND f1||f2 NOT IN (select f1||f2 from "sys"."test_bug4058_tmp"); +-- DOES NOT WORK: dev/sql/backends/monet5/rel_bin.c:702: exp_bin: Assertion `0' failed. + +DROP TABLE "sys"."test_bug4058_tmp"; +DROP TABLE "sys"."test_bug4058"; + +ROLLBACK; + diff --git a/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.stable.err b/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.stable.err @@ -0,0 +1,35 @@ +stderr of test 'concat_2_integers.Bug-4058` in directory 'sql/test/BugTracker-2016` itself: + + +# 12:52:17 > +# 12:52:17 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=31290" "--set" "mapi_usock=/var/tmp/mtest-18307/.s.monetdb.31290" "--set" "monet_prompt=" "--forcemito" "--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2016" "--set" "embedded_r=yes" +# 12:52:17 > + +# 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 = 31290 +# cmdline opt mapi_usock = /var/tmp/mtest-18307/.s.monetdb.31290 +# 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 + +# 12:52:18 > +# 12:52:18 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-18307" "--port=31290" +# 12:52:18 > + + +# 13:01:11 > +# 13:01:11 > "Done." +# 13:01:11 > + diff --git a/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.stable.out b/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2016/Tests/concat_2_integers.Bug-4058.stable.out @@ -0,0 +1,147 @@ +stdout of test 'concat_2_integers.Bug-4058` in directory 'sql/test/BugTracker-2016` itself: + + +# 12:52:17 > +# 12:52:17 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=31290" "--set" "mapi_usock=/var/tmp/mtest-18307/.s.monetdb.31290" "--set" "monet_prompt=" "--forcemito" "--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2016" "--set" "embedded_r=yes" +# 12:52:17 > + +# MonetDB 5 server v11.23.8 +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2016', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs and 128bit integers dynamically linked +# Found 15.589 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2016 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://toulouse.da.cwi.nl:31290/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-18307/.s.monetdb.31290 +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded +# MonetDB/R module loaded + +Ready. +# SQL catalog created, loading sql scripts once +# loading sql script: 09_like.sql +# loading sql script: 10_math.sql +# loading sql script: 11_times.sql +# loading sql script: 12_url.sql +# loading sql script: 13_date.sql +# loading sql script: 14_inet.sql +# loading sql script: 15_querylog.sql +# loading sql script: 16_tracelog.sql +# loading sql script: 17_temporal.sql +# loading sql script: 20_vacuum.sql +# loading sql script: 21_dependency_functions.sql +# loading sql script: 22_clients.sql +# loading sql script: 23_skyserver.sql +# loading sql script: 24_zorder.sql +# loading sql script: 25_debug.sql +# loading sql script: 26_sysmon.sql +# loading sql script: 27_rejects.sql +# loading sql script: 39_analytics.sql +# loading sql script: 39_analytics_hge.sql +# loading sql script: 40_geom.sql +# loading sql script: 40_json.sql +# loading sql script: 40_json_hge.sql +# loading sql script: 41_md5sum.sql +# loading sql script: 45_uuid.sql +# loading sql script: 46_gsl.sql +# loading sql script: 46_profiler.sql +# loading sql script: 51_sys_schema_extension.sql +# loading sql script: 72_fits.sql +# loading sql script: 74_netcdf.sql +# loading sql script: 75_lidar.sql +# loading sql script: 75_shp.sql +# loading sql script: 75_storagemodel.sql +# loading sql script: 80_statistics.sql +# loading sql script: 80_udf.sql +# loading sql script: 80_udf_hge.sql +# loading sql script: 85_bam.sql +# loading sql script: 90_generator.sql +# loading sql script: 90_generator_hge.sql +# loading sql script: 99_system.sql + +# 12:52:18 > +# 12:52:18 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-18307" "--port=31290" +# 12:52:18 > + +#START TRANSACTION; +#CREATE TABLE "sys"."test_bug" ( +# "f1" INTEGER NOT NULL, +# "f2" INTEGER NOT NULL, +# "f3" CHARACTER LARGE OBJECT NOT NULL, +# "f4" BOOLEAN NOT NULL +#); +#INSERT INTO "sys"."test_bug4058" VALUES +#(81,1310,'V',true), +#(303,1205,'V',true), +#(601,1502,'V',true), +#(839,1312,'A',true), +#(408,1302,'G',false), +#(665,1410,'V',true), +#(267,1604,'A',true), +#(556,1208,'G',false), +#(386,1409,'G',false), +#(831,1606,'A',true), +#(681,1509,'G',false), +#(784,1511,'A',true), +#(777,1503,'A',true), +#(781,1407,'V',true), +#(682,1402,'V',true), +#(796,1507,'V',true), +#(743,1505,'V',true), +#(715,1409,'G',false), +#(769,1402,'A',true), +#(760,1511,'A',true); +[ 20 ] +#select * from "sys"."test_bug4058" limit 10; +% sys.test_bug4058, sys.test_bug4058, sys.test_bug4058, sys.test_bug4058 # table_name +% f1, f2, f3, f4 # name +% int, int, clob, boolean # type +% 3, 4, 1, 5 # length +[ 81, 1310, "V", true ] +[ 303, 1205, "V", true ] +[ 601, 1502, "V", true ] +[ 839, 1312, "A", true ] +[ 408, 1302, "G", false ] +[ 665, 1410, "V", true ] +[ 267, 1604, "A", true ] +[ 556, 1208, "G", false ] +[ 386, 1409, "G", false ] +[ 831, 1606, "A", true ] +#create table "sys"."test_bug4058_tmp" as ( select * from "sys"."test_bug4058" limit 10); +#select * from (select * from "sys"."test_bug4058" where f3='V' AND f4=true) as tmp where f1||f2 NOT IN (select f1||f2 from "sys"."test_bug4058_tmp"); -- WORKS +% sys.tmp, sys.tmp, sys.tmp, sys.tmp # table_name +% f1, f2, f3, f4 # name +% int, int, clob, boolean # type +% 3, 4, 1, 5 # length +[ 781, 1407, "V", true ] +[ 682, 1402, "V", true ] +[ 796, 1507, "V", true ] +[ 743, 1505, "V", true ] +#sselect * from (select * from "sys"."test_bug4058" where f1||f2 NOT IN (select f1||f2 from "sys"."test_bug4058_tmp")) as tmp where f3='V' AND f4=true; +% sys.tmp, sys.tmp, sys.tmp, sys.tmp # table_name +% f1, f2, f3, f4 # name +% int, int, clob, boolean # type +% 3, 4, 1, 5 # length +[ 781, 1407, "V", true ] +[ 682, 1402, "V", true ] +[ 796, 1507, "V", true ] +[ 743, 1505, "V", true ] +#sselect * from "sys"."test_bug4058" where f3='V' AND f4=true AND f1||f2 NOT IN (select f1||f2 from "sys"."test_bug4058_tmp"); +% sys.tmp, sys.tmp, sys.tmp, sys.tmp # table_name +% f1, f2, f3, f4 # name +% int, int, clob, boolean # type +% 3, 4, 1, 5 # length +[ 781, 1407, "V", true ] +[ 682, 1402, "V", true ] +[ 796, 1507, "V", true ] +[ 743, 1505, "V", true ] +#DROP TABLE "sys"."test_bug4058_tmp"; +#DROP TABLE "sys"."test_bug4058"; +#ROLLBACK; + +# 12:52:18 > +# 12:52:18 > "Done." +# 12:52:18 > + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list