Changeset: 4af0978e96e1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4af0978e96e1 Added Files: sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.err sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out sql/test/orderidx/Tests/oidx_all_types.sql sql/test/orderidx/Tests/oidx_all_types.stable.err sql/test/orderidx/Tests/oidx_all_types.stable.out sql/test/orderidx/Tests/oidx_hge_type.sql sql/test/orderidx/Tests/oidx_hge_type.stable.err sql/test/orderidx/Tests/oidx_hge_type.stable.out.int128 Modified Files: sql/test/BugTracker-2017/Tests/All sql/test/orderidx/Tests/All Branch: default Log Message:
Merge with Dec2016 diffs (truncated from 2329 to 300 lines): diff --git a/sql/test/BugTracker-2017/Tests/All b/sql/test/BugTracker-2017/Tests/All --- a/sql/test/BugTracker-2017/Tests/All +++ b/sql/test/BugTracker-2017/Tests/All @@ -38,3 +38,4 @@ cast_boolean_to_string.Bug-6110 modulo.Bug-6225 one-plus-nil.Bug-6243 with-alias-bug.6246 +crash_after_oidx_on_sys_statistics.Bug-6251 diff --git a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.sql @@ -0,0 +1,20 @@ +DELETE FROM sys.statistics; + +-- fill sys.statistics +ANALYZE sys.statistics; +SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY column_id; + +-- update the values of: sample, count, unique, nils, minval, maxval, sorted, revsorted of sys.statistics +ANALYZE sys.statistics; +SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY column_id; + +-- ALTER TABLE sys.statistics SET READ ONLY; + +CREATE ORDERED INDEX stat_oidx ON sys.statistics (width); +SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY column_id; +-- now mserver5 is crashed !! + +-- ALTER TABLE sys.statistics SET READ WRITE; + +DELETE FROM sys.statistics; + diff --git a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.err b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.err @@ -0,0 +1,39 @@ +stderr of test 'crash_after_oidx_on_sys_statistics.Bug-6251` in directory 'sql/test/BugTracker-2017` itself: + + +# 17:38:14 > +# 17:38:14 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=32740" "--set" "mapi_usock=/var/tmp/mtest-1294/.s.monetdb.32740" "--set" "monet_prompt=" "--forcemito" "--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2017" "--set" "embedded_r=yes" "--set" "embedded_py=true" +# 17:38:14 > + +# 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 = 32740 +# cmdline opt mapi_usock = /var/tmp/mtest-1294/.s.monetdb.32740 +# cmdline opt monet_prompt = +# cmdline opt gdk_dbpath = /export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2017 +# cmdline opt embedded_r = yes +# cmdline opt embedded_py = true +# cmdline opt gdk_debug = 536870922 + + + +# 17:47:38 > +# 17:47:38 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-1768" "--port=38565" +# 17:47:38 > + + + +# 17:38:15 > +# 17:38:15 > "Done." +# 17:38:15 > + diff --git a/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2017/Tests/crash_after_oidx_on_sys_statistics.Bug-6251.stable.out @@ -0,0 +1,129 @@ +stdout of test 'crash_after_oidx_on_sys_statistics.Bug-6251` in directory 'sql/test/BugTracker-2017` itself: + + +# 17:38:14 > +# 17:38:14 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=32740" "--set" "mapi_usock=/var/tmp/mtest-1294/.s.monetdb.32740" "--set" "monet_prompt=" "--forcemito" "--dbpath=/export/scratch2/dinther/INSTALL/var/MonetDB/mTests_sql_test_BugTracker-2017" "--set" "embedded_r=yes" "--set" "embedded_py=true" +# 17:38:14 > + +# MonetDB 5 server v11.25.12 +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2017', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 128bit integers +# Found 15.589 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2017 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:32740/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-1294/.s.monetdb.32740 +# MonetDB/GIS module loaded +# MonetDB/SQL module loaded +# MonetDB/Python 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: 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_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 + +# 17:38:15 > +# 17:38:15 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-1294" "--port=32740" +# 17:38:15 > + +#DELETE FROM sys.statistics; +[ 0 ] +#SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY column_id; +% sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics # table_name +% type, width, sample, count, unique, nils, sorted, revsorted # name +% clob, int, bigint, bigint, bigint, bigint, boolean, boolean # type +% 9, 1, 1, 1, 1, 1, 5, 5 # length +[ "int", 4, 0, 0, 0, 0, true, true ] +[ "clob", 1, 0, 0, 0, 0, true, true ] +[ "int", 4, 0, 0, 0, 0, true, true ] +[ "timestamp", 8, 0, 0, 0, 0, true, true ] +[ "bigint", 8, 0, 0, 0, 0, true, true ] +[ "bigint", 8, 0, 0, 0, 0, true, true ] +[ "bigint", 8, 0, 0, 0, 0, true, true ] +[ "bigint", 8, 0, 0, 0, 0, true, true ] +[ "clob", 1, 0, 0, 0, 0, true, true ] +[ "clob", 1, 0, 0, 0, 0, true, true ] +[ "boolean", 1, 0, 0, 0, 0, true, true ] +[ "boolean", 1, 0, 0, 0, 0, true, true ] +#SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY column_id; +% sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics # table_name +% type, width, sample, count, unique, nils, sorted, revsorted # name +% clob, int, bigint, bigint, bigint, bigint, boolean, boolean # type +% 9, 1, 2, 2, 2, 1, 5, 5 # length +[ "int", 4, 12, 12, 12, 0, true, false ] +[ "clob", 1, 12, 12, 5, 0, false, false ] +[ "int", 4, 12, 12, 3, 0, false, false ] +[ "timestamp", 8, 12, 12, 1, 0, true, true ] +[ "bigint", 8, 12, 12, 1, 0, true, true ] +[ "bigint", 8, 12, 12, 1, 0, true, true ] +[ "bigint", 8, 12, 12, 1, 0, true, true ] +[ "bigint", 8, 12, 12, 1, 0, true, true ] +[ "clob", 1, 12, 12, 1, 0, true, true ] +[ "clob", 1, 12, 12, 1, 0, true, true ] +[ "boolean", 1, 12, 12, 1, 0, true, true ] +[ "boolean", 1, 12, 12, 1, 0, true, true ] +#CREATE ORDERED INDEX stat_oidx ON sys.statistics (width); +#SELECT /*column_id,*/ type, width, /*stamp,*/ "sample", count, "unique", nils, /*minval,*/ /*maxval,*/ sorted, revsorted FROM sys.statistics ORDER BY column_id; +% sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics, sys.statistics # table_name +% type, width, sample, count, unique, nils, sorted, revsorted # name +% clob, int, bigint, bigint, bigint, bigint, boolean, boolean # type +% 9, 1, 2, 2, 2, 1, 5, 5 # length +[ "int", 4, 12, 12, 12, 0, true, false ] +[ "clob", 1, 12, 12, 5, 0, false, false ] +[ "int", 4, 12, 12, 3, 0, false, false ] +[ "timestamp", 8, 12, 12, 1, 0, true, true ] +[ "bigint", 8, 12, 12, 1, 0, true, true ] +[ "bigint", 8, 12, 12, 1, 0, true, true ] +[ "bigint", 8, 12, 12, 1, 0, true, true ] +[ "bigint", 8, 12, 12, 1, 0, true, true ] +[ "clob", 1, 12, 12, 1, 0, true, true ] +[ "clob", 1, 12, 12, 1, 0, true, true ] +[ "boolean", 1, 12, 12, 1, 0, true, true ] +[ "boolean", 1, 12, 12, 1, 0, true, true ] +#DELETE FROM sys.statistics; +[ 12 ] + +# 17:38:15 > +# 17:38:15 > "Done." +# 17:38:15 > + diff --git a/sql/test/orderidx/Tests/All b/sql/test/orderidx/Tests/All --- a/sql/test/orderidx/Tests/All +++ b/sql/test/orderidx/Tests/All @@ -1,2 +1,4 @@ simpletable smalltable +oidx_all_types +HAVE_HGE?oidx_hge_type diff --git a/sql/test/orderidx/Tests/oidx_all_types.sql b/sql/test/orderidx/Tests/oidx_all_types.sql new file mode 100644 --- /dev/null +++ b/sql/test/orderidx/Tests/oidx_all_types.sql @@ -0,0 +1,308 @@ +-- first create a table for all basic data types and fill it with some data rows (including duplicate rows) +create table all_types ( + "boolean" boolean, + "tinyint" tinyint, + "smallint" smallint, + "int" int, + "bigint" bigint, + "double" double, + "real" real, + "decimal" decimal, + "decimal9" decimal(9), + "decimal83" decimal(8,3), + "float" float, + "float9" float(9), + "float83" float(8,3), + "date" date, + "iY" interval year, + "iYM" interval year to month, + "iM" interval month, + "id" interval day, + "idh" interval day to hour, + "idm" interval day to minute, + "ids" interval day to second, + "ih" interval hour, + "ihm" interval hour to minute, + "ihs" interval hour to second, + "im" interval minute, + "ims" interval minute to second, + "is" interval second, + "timestamp" timestamp, + "timestamp5" timestamp(5), + "timestampzone" timestamp with time zone, + "timestamp5zone" timestamp(5) with time zone, + "time" time, + "time5" time(5), + "timezone" time with time zone, + "time5zone" time(5) with time zone, + "blob" blob, + "blob100" blob(100), + "clob" clob, + "clob100" clob(100), + "character" character, + "varchar100" character varying(100), + "character10" character(10), + "inet" inet, + "inet9" inet(9), + "json" json, + "json10" json(10), + "url" url, + "url55" URL(55), + "uuid" uuid +); + +insert into all_types values (true, 10, 10000, 1000000, + 10000000000, 1e30, 1e20, 1, 123456789, 12345.678, 3.1415, 3.1415, + 3.1415, date '2009-04-15', interval '2' year, interval '18' month, + interval '3' month, interval '20' day, interval '30' hour, + interval '2000' minute, interval '100000' second, interval '10' hour, + interval '100' minute, interval '2000' second, interval '10' minute, + interval '100' second, interval '10' second, + timestamp '1995-07-15 07:30', timestamp '1995-07-15 07:30', + timestamp '1995-07-15 07:30', timestamp '1995-07-15 07:30', + time '07:30', time '07:30', time '07:30', time '07:30', + blob '123456', blob '123456', + '123456', '123456', 'x', 'varchar', '0123456789', + '127.0.0.0', '127.127.127.255', + '{"a": 123}', '{"b": 456}', + 'www.monetdb.org/Documentation/Manuals/SQLreference/BuiltinTypes', + 'www.monetdb.org/Documentation/Manuals/SQLreference/URLtype', + 'ae106ad4-81fd-4f1a-85e8-5efface60da4'); + +insert into all_types values (false, -10, -10000, -1000000, + -10000000000, -1e30, -1e20, -1, -123456789, -12345.678, -3.1415, -3.1415, + -3.1415, date '2005-04-15', interval '-2' year, interval '-18' month, + interval '-3' month, interval '-20' day, interval '-30' hour, + interval '-2000' minute, interval '-100000' second, interval '-10' hour, _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list