Changeset: 5e821c5bed12 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5e821c5bed12 Added Files: sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.out Modified Files: sql/test/BugTracker-2018/Tests/All Branch: Mar2018 Log Message:
Test for bug 6599. diffs (198 lines): diff --git a/sql/test/BugTracker-2018/Tests/All b/sql/test/BugTracker-2018/Tests/All --- a/sql/test/BugTracker-2018/Tests/All +++ b/sql/test/BugTracker-2018/Tests/All @@ -55,3 +55,4 @@ concat-str-int.Bug-6583 nested-merge-tables.Bug-6585 sqlitelogictest-complex-expression.Bug-6589 sqlitelogictest-complex-case-not-in.Bug-6594 +multiple-count.Bug-6599 diff --git a/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.sql @@ -0,0 +1,24 @@ +start transaction; + +CREATE TABLE "sys"."unitTestDontDelete" ( + "A" VARCHAR(255), + "B" BIGINT, + "C" DOUBLE, + "D" TIMESTAMP +); +INSERT INTO "sys"."unitTestDontDelete" VALUES (NULL, NULL, NULL, NULL); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 0, 0.5, '2013-06-10 11:10:10.000000'); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 1, 1.5, '2013-06-11 12:11:11.000000'); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 2, 2.5, '2013-06-12 13:12:12.000000'); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 3, 3.5, '2013-06-13 14:13:13.000000'); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 4, 4.5, '2013-06-14 15:14:14.000000'); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 5, 5.5, '2013-06-15 16:15:15.000000'); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 6, 6.5, '2013-06-16 17:16:16.000000'); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 7, 7.5, '2013-06-17 18:17:17.000000'); +INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 8, 8.5, '2013-06-18 19:18:18.000000'); + +select count(*) as "c3_recordcount" from "unitTestDontDelete" as "t2" where "t2"."A" = 'Nope'; + +select count(*) as "c3_recordcount", count(distinct "t2"."B") as "c7_b__unique_count_" from "unitTestDontDelete" as "t2" where "t2"."A" = 'Nope'; + +rollback; diff --git a/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.err @@ -0,0 +1,37 @@ +stderr of test 'multiple-count.Bug-6599` in directory 'sql/test/BugTracker-2018` itself: + + +# 15:27:37 > +# 15:27:37 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=32594" "--set" "mapi_usock=/var/tmp/mtest-4889/.s.monetdb.32594" "--set" "monet_prompt=" "--forcemito" "--dbpath=/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2018" "--set" "embedded_r=yes" "--set" "embedded_py=true" "--set" "embedded_c=true" +# 15:27:37 > + +# builtin opt gdk_dbpath = /ufs/sjoerd/@Monet-stable/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 = 32594 +# cmdline opt mapi_usock = /var/tmp/mtest-4889/.s.monetdb.32594 +# cmdline opt monet_prompt = +# cmdline opt gdk_dbpath = /ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2018 +# cmdline opt embedded_r = yes +# cmdline opt embedded_py = true +# cmdline opt embedded_c = true +# cmdline opt gdk_debug = 553648138 + +# 15:27:37 > +# 15:27:37 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-4889" "--port=32594" +# 15:27:37 > + + +# 15:27:38 > +# 15:27:38 > "Done." +# 15:27:38 > + diff --git a/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.out b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2018/Tests/multiple-count.Bug-6599.stable.out @@ -0,0 +1,114 @@ +stdout of test 'multiple-count.Bug-6599` in directory 'sql/test/BugTracker-2018` itself: + + +# 15:27:37 > +# 15:27:37 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=32594" "--set" "mapi_usock=/var/tmp/mtest-4889/.s.monetdb.32594" "--set" "monet_prompt=" "--forcemito" "--dbpath=/ufs/sjoerd/@Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2018" "--set" "embedded_r=yes" "--set" "embedded_py=true" "--set" "embedded_c=true" +# 15:27:37 > + +# MonetDB 5 server v11.29.4 +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2018', using 8 threads +# Compiled for x86_64-pc-linux-gnu/64bit with 128bit integers +# Found 62.695 GiB available main-memory. +# Copyright (c) 1993 - July 2008 CWI. +# Copyright (c) August 2008 - 2018 MonetDB B.V., all rights reserved +# Visit https://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://methuselah.da.cwi.nl:32594/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-4889/.s.monetdb.32594 +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded +# MonetDB/Python2 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: 18_index.sql +# loading sql script: 20_vacuum.sql +# loading sql script: 21_dependency_functions.sql +# loading sql script: 21_dependency_views.sql +# loading sql script: 22_clients.sql +# loading sql script: 23_skyserver.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_profiler.sql +# loading sql script: 51_sys_schema_extension.sql +# loading sql script: 60_wlcr.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 + +# 15:27:37 > +# 15:27:37 > "mclient" "-lsql" "-ftest" "-tnone" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-4889" "--port=32594" +# 15:27:37 > + +#start transaction; +#CREATE TABLE "sys"."unitTestDontDelete" ( +# "A" VARCHAR(255), +# "B" BIGINT, +# "C" DOUBLE, +# "D" TIMESTAMP +#); +#INSERT INTO "sys"."unitTestDontDelete" VALUES (NULL, NULL, NULL, NULL); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 0, 0.5, '2013-06-10 11:10:10.000000'); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 1, 1.5, '2013-06-11 12:11:11.000000'); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 2, 2.5, '2013-06-12 13:12:12.000000'); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 3, 3.5, '2013-06-13 14:13:13.000000'); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 4, 4.5, '2013-06-14 15:14:14.000000'); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 5, 5.5, '2013-06-15 16:15:15.000000'); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 6, 6.5, '2013-06-16 17:16:16.000000'); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat2', 7, 7.5, '2013-06-17 18:17:17.000000'); +[ 1 ] +#INSERT INTO "sys"."unitTestDontDelete" VALUES ('Cat1', 8, 8.5, '2013-06-18 19:18:18.000000'); +[ 1 ] +#select count(*) as "c3_recordcount" from "unitTestDontDelete" as "t2" where "t2"."A" = 'Nope'; +% sys.L4 # table_name +% c3_recordcount # name +% bigint # type +% 1 # length +[ 0 ] +#select count(*) as "c3_recordcount", count(distinct "t2"."B") as "c7_b__unique_count_" from "unitTestDontDelete" as "t2" where "t2"."A" = 'Nope'; +% sys.L4, sys.L7 # table_name +% c3_recordcount, c7_b__unique_count_ # name +% bigint, bigint # type +% 1, 1 # length +[ 0, 0 ] +#rollback; + +# 15:27:38 > +# 15:27:38 > "Done." +# 15:27:38 > + _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list