Changeset: 1542e2ce8126 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1542e2ce8126 Added Files: sql/test/BugTracker-2016/Tests/storagemodel.stable.out.Windows Removed Files: sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit sql/test/BugTracker-2016/Tests/storagemodel.stable.out.int128 Modified Files: monetdb5/mal/mal_resource.h sql/backends/monet5/sql.c sql/test/BugTracker-2016/Tests/storagemodel.sql sql/test/BugTracker-2016/Tests/storagemodel.stable.err sql/test/BugTracker-2016/Tests/storagemodel.stable.out Branch: default Log Message:
Merge with Dec2016 branch. diffs (truncated from 470 to 300 lines): diff --git a/monetdb5/mal/mal_resource.h b/monetdb5/mal/mal_resource.h --- a/monetdb5/mal/mal_resource.h +++ b/monetdb5/mal/mal_resource.h @@ -18,7 +18,7 @@ //#define heapinfo(X,Id) (((X) && (X)->base && ((X)->parentid == 0 || (X)->parentid == Id)) ? (X)->free : 0) #define heapinfo(X,Id) (((X) && (X)->base ) ? (X)->free : 0) -#define hashinfo(X,Id) ( (X)? heapinfo((X)->heap, Id):0) +#define hashinfo(X,Id) ((X) && (X) != (Hash *) 1 ? heapinfo((X)->heap, Id) : 0) #define USE_MAL_ADMISSION #ifdef USE_MAL_ADMISSION diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c --- a/sql/backends/monet5/sql.c +++ b/sql/backends/monet5/sql.c @@ -4038,7 +4038,7 @@ sql_storage(Client cntxt, MalBlkPtr mb, bitval = bit_nil; BUNappend(key, &bitval, FALSE); - sz = bn->torderidx ? bn->torderidx->free : 0; + sz = bn->torderidx && bn->torderidx != (Heap *) 1 ? bn->torderidx->free : 0; BUNappend(oidx, &sz, FALSE); BBPunfix(bn->batCacheid); } @@ -4126,7 +4126,7 @@ sql_storage(Client cntxt, MalBlkPtr mb, if (!bitval && bn->tnokey[0] == 0 && bn->tnokey[1] == 0) bitval = bit_nil; BUNappend(key, &bitval, FALSE); - sz = bn->torderidx ? bn->torderidx->free : 0; + sz = bn->torderidx && bn->torderidx != (Heap *) 1 ? bn->torderidx->free : 0; BUNappend(oidx, &sz, FALSE); BBPunfix(bn->batCacheid); } diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.sql b/sql/test/BugTracker-2016/Tests/storagemodel.sql --- a/sql/test/BugTracker-2016/Tests/storagemodel.sql +++ b/sql/test/BugTracker-2016/Tests/storagemodel.sql @@ -12,17 +12,19 @@ select * from storagemodel() where "tabl drop table bug3923; -crate schema bug3923schema; + +create schema bug3923schema; +set schema bug3923schema; create table bug3923(i integer); -- skip columns location, count, columnsize. -select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, imprints, sorted from storage('sys','_tables'); +select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, imprints, sorted from sys.storage('sys','_tables'); -call storagemodelinit(); -update storagemodelinput set "count" =10000 where "table" ='bug3923'; -update storagemodelinput set "distinct" =10 where "table" ='bug3923' and "column" ='i'; +call sys.storagemodelinit(); +update sys.storagemodelinput set "count" =10000 where "table" ='bug3923'; +update sys.storagemodelinput set "distinct" =10 where "table" ='bug3923' and "column" ='i'; -select * from storagemodel() where "table" = 'bug3923'; +select * from sys.storagemodel() where "table" = 'bug3923'; drop table bug3923; diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.err b/sql/test/BugTracker-2016/Tests/storagemodel.stable.err --- a/sql/test/BugTracker-2016/Tests/storagemodel.stable.err +++ b/sql/test/BugTracker-2016/Tests/storagemodel.stable.err @@ -28,9 +28,6 @@ stderr of test 'storagemodel` in directo # 23:38:44 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-21747" "--port=30783" # 23:38:44 > -MAPI = (monetdb) /var/tmp/mtest-545/.s.monetdb.36257 -QUERY = crate schema bug3923schema; -ERROR = !syntax error, unexpected IDENT in: "crate" # 23:38:44 > # 23:38:44 > "Done." diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out --- a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out +++ b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out @@ -112,8 +112,8 @@ Ready. % .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1 # table_name % schema, table, column, type, count, columnsize, heapsize, hashes, imprints, sorted, revsorted, unique, orderidx # name % clob, clob, clob, clob, bigint, bigint, bigint, bigint, bigint, boolean, boolean, boolean, bigint # type -% 3, 7, 1, 3, 5, 5, 1, 1, 4, 5, 5, 5, 1 # length -[ "sys", "bug3923", "i", "int", 10000, 40000, 0, 0, 1200, true, true, NULL, 0 ] +% 13, 7, 1, 3, 5, 5, 1, 1, 4, 5, 5, 5, 1 # length +[ "bug3923schema", "bug3923", "i", "int", 10000, 40000, 0, 0, 1200, true, true, NULL, 0 ] #drop table bug3923; # 23:38:44 > diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit deleted file mode 100644 --- a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.32bit +++ /dev/null @@ -1,122 +0,0 @@ -stdout of test 'storagemodel` in directory 'sql/test/BugTracker-2016` itself: - - -# 23:38:43 > -# 23:38:43 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=30783" "--set" "mapi_usock=/var/tmp/mtest-21747/.s.monetdb.30783" "--set" "monet_prompt=" "--forcemito" "--dbpath=/export/scratch1/mk/default//Linux/var/MonetDB/mTests_sql_test_BugTracker-2016" "--set" "embedded_r=yes" -# 23:38:43 > - -# MonetDB 5 server v11.22.0 -# 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-2015 MonetDB B.V., all rights reserved -# Visit http://www.monetdb.org/ for further information -# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:30783/ -# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-21747/.s.monetdb.30783 -# MonetDB/GIS module loaded -# Start processing logs sql/sql_logs version 52200 -# Finished processing logs sql/sql_logs -# 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_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 - -# 23:38:44 > -# 23:38:44 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-21747" "--port=30783" -# 23:38:44 > - -#create table bug3923(i integer); -#select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, imprints, sorted from storage('sys','_tables'); -% .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3 # table_name -% schema, table, column, type, mode, typewidth, hashes, phash, imprints, sorted # name -% clob, clob, clob, clob, clob, int, bigint, boolean, bigint, boolean # type -% 3, 7, 13, 8, 8, 2, 1, 5, 1, 5 # length -[ "sys", "_tables", "id", "int", "writable", 4, 0, false, 0, true ] -[ "sys", "_tables", "name", "varchar", "writable", 9, 0, false, 0, false ] -[ "sys", "_tables", "schema_id", "int", "writable", 4, 0, false, 0, NULL ] -[ "sys", "_tables", "query", "varchar", "writable", 42, 0, false, 0, NULL ] -[ "sys", "_tables", "type", "smallint", "writable", 2, 0, false, 0, NULL ] -[ "sys", "_tables", "system", "boolean", "writable", 1, 0, false, 0, NULL ] -[ "sys", "_tables", "commit_action", "smallint", "writable", 2, 0, false, 0, NULL ] -[ "sys", "_tables", "access", "smallint", "writable", 2, 0, false, 0, true ] -#update storagemodelinput set "count" =10000 where "table" ='bug3923'; -[ 1 ] -#update storagemodelinput set "distinct" =10 where "table" ='bug3923' and "column" ='i'; -[ 1 ] -#select * from storagemodel() where "table" = 'bug3923'; -% .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1 # table_name -% schema, table, column, type, count, columnsize, heapsize, hashes, imprints, sorted, revsorted, unique, orderidx # name -% clob, clob, clob, clob, bigint, bigint, bigint, bigint, bigint, boolean, boolean, boolean, bigint # type -% 3, 7, 1, 3, 5, 5, 1, 1, 4, 5, 5, 5, 1 # length -[ "sys", "bug3923", "i", "int", 10000, 40000, 0, 0, 1200, true, true, NULL, 0 ] -#drop table bug3923; -#create table bug3923(i integer); -#select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, imprints, sorted from storage('sys','_tables'); -% .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3 # table_name -% schema, table, column, type, mode, typewidth, hashes, phash, imprints, sorted # name -% clob, clob, clob, clob, clob, int, bigint, boolean, bigint, boolean # type -% 3, 7, 13, 8, 8, 2, 4, 5, 1, 5 # length -[ "sys", "_tables", "id", "int", "writable", 4, 2580, false, 0, NULL ] -[ "sys", "_tables", "name", "varchar", "writable", 8, 0, false, 0, false ] -[ "sys", "_tables", "schema_id", "int", "writable", 4, 0, false, 0, NULL ] -[ "sys", "_tables", "query", "varchar", "writable", 41, 0, false, 0, NULL ] -[ "sys", "_tables", "type", "smallint", "writable", 2, 0, false, 0, NULL ] -[ "sys", "_tables", "system", "boolean", "writable", 1, 0, false, 0, NULL ] -[ "sys", "_tables", "commit_action", "smallint", "writable", 2, 0, false, 0, NULL ] -[ "sys", "_tables", "access", "smallint", "writable", 2, 0, false, 0, true ] -#update storagemodelinput set "count" =10000 where "table" ='bug3923'; -[ 1 ] -#update storagemodelinput set "distinct" =10 where "table" ='bug3923' and "column" ='i'; -[ 1 ] -#select * from storagemodel() where "table" = 'bug3923'; -% .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1, .L1 # table_name -% schema, table, column, type, count, columnsize, heapsize, hashes, imprints, sorted, revsorted, unique, orderidx # name -% clob, clob, clob, clob, bigint, bigint, bigint, bigint, bigint, boolean, boolean, boolean, bigint # type -% 3, 7, 1, 3, 5, 5, 1, 1, 4, 5, 5, 5, 1 # length -[ "sys", "bug3923", "i", "int", 10000, 40000, 0, 0, 1200, true, true, NULL, 0 ] -#drop table bug3923; - -# 23:38:44 > -# 23:38:44 > "Done." -# 23:38:44 > - diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.Windows b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.Windows new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2016/Tests/storagemodel.stable.out.Windows @@ -0,0 +1,122 @@ +stdout of test 'storagemodel` in directory 'sql/test/BugTracker-2016` itself: + + +# 23:38:43 > +# 23:38:43 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=30783" "--set" "mapi_usock=/var/tmp/mtest-21747/.s.monetdb.30783" "--set" "monet_prompt=" "--forcemito" "--dbpath=/export/scratch1/mk/default//Linux/var/MonetDB/mTests_sql_test_BugTracker-2016" "--set" "embedded_r=yes" +# 23:38:43 > + +# MonetDB 5 server v11.22.0 +# 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-2015 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://vienna.da.cwi.nl:30783/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-21747/.s.monetdb.30783 +# MonetDB/GIS module loaded +# Start processing logs sql/sql_logs version 52200 +# Finished processing logs sql/sql_logs +# 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_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 + +# 23:38:44 > +# 23:38:44 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-21747" "--port=30783" +# 23:38:44 > + +#create table bug3923(i integer); +#select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, imprints, sorted from storage('sys','_tables'); +% .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3, .L3 # table_name +% schema, table, column, type, mode, typewidth, hashes, phash, imprints, sorted # name +% clob, clob, clob, clob, clob, int, bigint, boolean, bigint, boolean # type +% 3, 7, 13, 8, 8, 2, 1, 5, 1, 5 # length +[ "sys", "_tables", "id", "int", "writable", 4, 0, false, 0, true ] +[ "sys", "_tables", "name", "varchar", "writable", 9, 0, false, 0, false ] +[ "sys", "_tables", "schema_id", "int", "writable", 4, 0, false, 0, NULL ] +[ "sys", "_tables", "query", "varchar", "writable", 55, 0, false, 0, NULL ] +[ "sys", "_tables", "type", "smallint", "writable", 2, 0, false, 0, NULL ] +[ "sys", "_tables", "system", "boolean", "writable", 1, 0, false, 0, NULL ] _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list