Changeset: 03dd19de93ec for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=03dd19de93ec Added Files: sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.py sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.err sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.out Modified Files: gdk/gdk_storage.c monetdb5/modules/mal/Tests/All sql/test/BugTracker-2013/Tests/All Branch: default Log Message:
merge with default diffs (truncated from 310 to 300 lines): diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -408,7 +408,7 @@ GDKload(const char *nme, const char *ext GDKfilepath(path, BATDIR, nme, ext); if (stat(path, &st) >= 0 && - (maxsize < (size_t) st.st_size || + (maxsize <= (size_t) st.st_size || /* mmap storage is auto-extended here */ GDKextend(path, maxsize) == 0)) { int mod = MMAP_READ | MMAP_WRITE | MMAP_SEQUENTIAL | MMAP_SYNC; diff --git a/sql/test/BugTracker-2013/Tests/All b/sql/test/BugTracker-2013/Tests/All --- a/sql/test/BugTracker-2013/Tests/All +++ b/sql/test/BugTracker-2013/Tests/All @@ -16,3 +16,4 @@ aggregates-typing-issues.Bug-3277 numeric-column-orderby.Bug-3278 numeric-column-alias.Bug-3279 median-null.Bug-3280 +corrupt-after-restart.Bug-3282 diff --git a/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.py b/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.py new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.py @@ -0,0 +1,58 @@ +try: + from MonetDBtesting import process +except ImportError: + import process + +import sys + +s = process.server(stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) +c = process.client('sql', stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) +out, err = c.communicate('''create table table3282 (i int); +insert into table3282 values (0); +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +insert into table3282 select * from table3282; +select * from table3282 offset 2097140; +''') +sys.stdout.write(out) +sys.stderr.write(err) +out, err = s.communicate() +sys.stdout.write(out) +sys.stderr.write(err) +s = process.server(stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) +c = process.client('sql', stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) +out, err = c.communicate('''select * from table3282 offset 2097140; +''') +sys.stdout.write(out) +sys.stderr.write(err) +out, err = s.communicate() +sys.stdout.write(out) +sys.stderr.write(err) +s = process.server(stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) +c = process.client('sql', stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) +out, err = c.communicate('''select * from table3282 offset 2097140; +drop table table3282; +''') +sys.stdout.write(out) +sys.stderr.write(err) +out, err = s.communicate() +sys.stdout.write(out) +sys.stderr.write(err) diff --git a/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.err b/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.err new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.err @@ -0,0 +1,46 @@ +stderr of test 'corrupt-after-restart.Bug-3282` in directory 'sql/test/BugTracker-2013` itself: + + +# 15:30:46 > +# 15:30:46 > "/usr/bin/python2" "corrupt-after-restart.Bug-3282.py" "corrupt-after-restart.Bug-3282" +# 15:30:46 > + +# builtin opt gdk_dbpath = /ufs/sjoerd/Monet-stable/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = yes +# 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 = 36108 +# cmdline opt mapi_usock = /var/tmp/mtest-6963/.s.monetdb.36108 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /ufs/sjoerd/Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2013 +# builtin opt gdk_dbpath = /ufs/sjoerd/Monet-stable/var/monetdb5/dbfarm/demo +# builtin opt gdk_debug = 0 +# builtin opt gdk_vmtrim = yes +# 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 = 36108 +# cmdline opt mapi_usock = /var/tmp/mtest-6963/.s.monetdb.36108 +# cmdline opt monet_prompt = +# cmdline opt mal_listing = 2 +# cmdline opt gdk_dbpath = /ufs/sjoerd/Monet-stable/var/MonetDB/mTests_sql_test_BugTracker-2013 + +# 15:30:49 > +# 15:30:49 > "Done." +# 15:30:49 > + diff --git a/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.out b/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.out new file mode 100644 --- /dev/null +++ b/sql/test/BugTracker-2013/Tests/corrupt-after-restart.Bug-3282.stable.out @@ -0,0 +1,171 @@ +stdout of test 'corrupt-after-restart.Bug-3282` in directory 'sql/test/BugTracker-2013` itself: + + +# 15:30:46 > +# 15:30:46 > "/usr/bin/python2" "corrupt-after-restart.Bug-3282.py" "corrupt-after-restart.Bug-3282" +# 15:30:46 > + +#create table table3282 (i int); +#insert into table3282 values (0); +[ 1 ] +#insert into table3282 select * from table3282; +[ 1 ] +#insert into table3282 select * from table3282; +[ 2 ] +#insert into table3282 select * from table3282; +[ 4 ] +#insert into table3282 select * from table3282; +[ 8 ] +#insert into table3282 select * from table3282; +[ 16 ] +#insert into table3282 select * from table3282; +[ 32 ] +#insert into table3282 select * from table3282; +[ 64 ] +#insert into table3282 select * from table3282; +[ 128 ] +#insert into table3282 select * from table3282; +[ 256 ] +#insert into table3282 select * from table3282; +[ 512 ] +#insert into table3282 select * from table3282; +[ 1024 ] +#insert into table3282 select * from table3282; +[ 2048 ] +#insert into table3282 select * from table3282; +[ 4096 ] +#insert into table3282 select * from table3282; +[ 8192 ] +#insert into table3282 select * from table3282; +[ 16384 ] +#insert into table3282 select * from table3282; +[ 32768 ] +#insert into table3282 select * from table3282; +[ 65536 ] +#insert into table3282 select * from table3282; +[ 131072 ] +#insert into table3282 select * from table3282; +[ 262144 ] +#insert into table3282 select * from table3282; +[ 524288 ] +#insert into table3282 select * from table3282; +[ 1048576 ] +#select * from table3282 offset 2097140; +% sys.table3282 # table_name +% i # name +% int # type +% 1 # length +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +# MonetDB 5 server v11.15.8 (hg id: 44d3106c446a+) +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2013', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 15.629 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://madrid.ins.cwi.nl:36108/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-6963/.s.monetdb.36108 +# MonetDB/GIS module loaded +# MonetDB/JAQL module loaded +# MonetDB/SQL module loaded +# 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_history.sql +# loading sql script: 16_tracelog.sql +# loading sql script: 17_compress.sql +# loading sql script: 18_dictionary.sql +# loading sql script: 19_cluster.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: 39_analytics.sql +# loading sql script: 40_geom.sql +# loading sql script: 75_storagemodel.sql +# loading sql script: 80_udf.sql +# loading sql script: 99_system.sql +#select * from table3282 offset 2097140; +% sys.table3282 # table_name +% i # name +% int # type +% 1 # length +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +# MonetDB 5 server v11.15.8 (hg id: 44d3106c446a+) +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2013', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 15.629 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information +# Listening for connection requests on mapi:monetdb://madrid.ins.cwi.nl:35383/ +# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-8634/.s.monetdb.35383 +# MonetDB/GIS module loaded +# MonetDB/JAQL module loaded +# MonetDB/SQL module loaded +#select * from table3282 offset 2097140; +% sys.table3282 # table_name +% i # name +% int # type +% 1 # length +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +[ 0 ] +#drop table table3282; +# MonetDB 5 server v11.15.8 (hg id: 44d3106c446a+) +# This is an unreleased version +# Serving database 'mTests_sql_test_BugTracker-2013', using 8 threads +# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked +# Found 15.629 GiB available main-memory. +# Copyright (c) 1993-July 2008 CWI. +# Copyright (c) August 2008-2013 MonetDB B.V., all rights reserved +# Visit http://www.monetdb.org/ for further information _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list