Changeset: 5aa87722f76a for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5aa87722f76a Removed Files: sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Darwin.32bit sql/benchmarks/tpch/fileleak/Tests/delete_all_nogeom.SQL.py.src sql/benchmarks/tpch/fileleak/Tests/delete_all_nogeom.stable.err sql/benchmarks/tpch/fileleak/Tests/delete_all_nogeom.stable.out sql/benchmarks/tpch/fileleak/Tests/leaks_nogeom.SQL.py.src sql/benchmarks/tpch/fileleak/Tests/leaks_nogeom.stable.err sql/benchmarks/tpch/fileleak/Tests/leaks_nogeom.stable.out Modified Files: sql/backends/monet5/sql_result.c sql/benchmarks/tpch/fileleak/Tests/All sql/benchmarks/tpch/fileleak/Tests/delete_all.SQL.py sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Windows sql/benchmarks/tpch/fileleak/Tests/leaks.SQL.py sql/benchmarks/tpch/fileleak/Tests/leaks.stable.out sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.sql sql/test/BugTracker-2010/Tests/limit_in_prepare.Bug-2552.stable.out sql/test/BugTracker/Tests/bind_with_cast.SF-1720934.stable.out Branch: default Log Message:
Merge with Feb2013 branch. diffs (truncated from 675 to 300 lines): diff --git a/sql/backends/monet5/sql_result.c b/sql/backends/monet5/sql_result.c --- a/sql/backends/monet5/sql_result.c +++ b/sql/backends/monet5/sql_result.c @@ -752,14 +752,15 @@ mvc_export_prepare(mvc *c, stream *out, int len2 = 1, len3 = 1; sql_arg *a; sql_subtype *t; + sql_rel *r = q->rel; if (!out) return 0; - if (is_project(q->rel->op) && q->rel->exps) { + if (is_topn(r->op)) + r = r->l; + if (r && is_project(r->op) && r->exps) { unsigned int max2 = 10, max3 = 10; /* to help calculate widths */ - sql_rel *r = q->rel; - nrows += list_length(r->exps); for (n = r->exps->h; n; n = n->next) { @@ -828,9 +829,7 @@ mvc_export_prepare(mvc *c, stream *out, return -1; } - if (is_project(q->rel->op) && q->rel->exps) { - sql_rel *r = q->rel; - + if (r && is_project(r->op) && r->exps) { for (n = r->exps->h; n; n = n->next) { const char *name, *rname, *schema = NULL; sql_exp *e = n->data; diff --git a/sql/benchmarks/tpch/fileleak/Tests/All b/sql/benchmarks/tpch/fileleak/Tests/All --- a/sql/benchmarks/tpch/fileleak/Tests/All +++ b/sql/benchmarks/tpch/fileleak/Tests/All @@ -2,7 +2,5 @@ create check0 load check1 -HAVE_GEOM?delete_all -!HAVE_GEOM?delete_all_nogeom -HAVE_GEOM?leaks -!HAVE_GEOM?leaks_nogeom +delete_all +leaks diff --git a/sql/benchmarks/tpch/fileleak/Tests/delete_all.SQL.py b/sql/benchmarks/tpch/fileleak/Tests/delete_all.SQL.py --- a/sql/benchmarks/tpch/fileleak/Tests/delete_all.SQL.py +++ b/sql/benchmarks/tpch/fileleak/Tests/delete_all.SQL.py @@ -11,21 +11,19 @@ dbh = monetdb.sql.Connection(hostname=ho cursor = dbh.cursor(); -cursor.execute('select p.*, "location", "count" from storage(), (select value from env() where name = \'gdk_dbpath\') as p where "table"=\'lineitem\';'); +cursor.execute('select p.*, "location", "count", "column" from storage(), (select value from env() where name = \'gdk_dbpath\') as p where "table"=\'lineitem\' order by "column"'); res = (cursor.fetchall()) -for (dbpath, fn, count) in res: - f = fn +for (dbpath, fn, count, column) in res: fn = os.path.join(dbpath, 'bat', fn + '.tail'); - print(f, int(os.path.getsize(fn)), count) + print(column, int(os.path.getsize(fn)), count) cursor.execute('delete from lineitem;'); -cursor.execute('select "location", "count" from storage() where "table" = \'lineitem\';'); +cursor.execute('select "column", "count" from storage() where "table" = \'lineitem\' order by "column"'); print(cursor.fetchall()) -cursor.execute('select p.*, "location", "count" from storage(), (select value from env() where name = \'gdk_dbpath\') as p where "table"=\'lineitem\';'); +cursor.execute('select p.*, "location", "count", "column" from storage(), (select value from env() where name = \'gdk_dbpath\') as p where "table"=\'lineitem\' order by "column"'); res = (cursor.fetchall()) -for (dbpath, fn, count) in res: - f = fn +for (dbpath, fn, count, column) in res: fn = os.path.join(dbpath, 'bat', fn + '.tail'); - print(f, int(os.path.getsize(fn)), count) + print(column, int(os.path.getsize(fn)), count) diff --git a/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out b/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out --- a/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out +++ b/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out @@ -25,39 +25,39 @@ Ready. # 13:16:19 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-24961" "--port=30091" # 13:16:19 > -(u'12/1205', 262144, 60175) -(u'12/1206', 262144, 60175) -(u'12/1207', 262144, 60175) -(u'12/1210', 262144, 60175) -(u'12/1211', 262144, 60175) -(u'12/1212', 524288, 60175) -(u'12/1213', 524288, 60175) -(u'12/1214', 524288, 60175) -(u'12/1215', 60175, 60175) -(u'12/1216', 60175, 60175) -(u'12/1217', 262144, 60175) -(u'12/1220', 262144, 60175) -(u'12/1221', 262144, 60175) -(u'12/1222', 60175, 60175) -(u'12/1223', 60175, 60175) -(u'12/1224', 262144, 60175) -[(u'12/1205', 0), (u'12/1206', 0), (u'12/1207', 0), (u'12/1210', 0), (u'12/1211', 0), (u'12/1212', 0), (u'12/1213', 0), (u'12/1214', 0), (u'12/1215', 0), (u'12/1216', 0), (u'12/1217', 0), (u'12/1220', 0), (u'12/1221', 0), (u'12/1222', 0), (u'12/1223', 0), (u'12/1224', 0)] -(u'12/1205', 262144, 0) -(u'12/1206', 262144, 0) -(u'12/1207', 262144, 0) -(u'12/1210', 262144, 0) -(u'12/1211', 262144, 0) -(u'12/1212', 524288, 0) -(u'12/1213', 524288, 0) -(u'12/1214', 524288, 0) -(u'12/1215', 60175, 0) -(u'12/1216', 60175, 0) -(u'12/1217', 262144, 0) -(u'12/1220', 262144, 0) -(u'12/1221', 262144, 0) -(u'12/1222', 60175, 0) -(u'12/1223', 60175, 0) -(u'12/1224', 262144, 0) +(u'l_comment', 262144, 60175) +(u'l_commitdate', 262144, 60175) +(u'l_discount', 524288, 60175) +(u'l_extendedprice', 524288, 60175) +(u'l_linenumber', 262144, 60175) +(u'l_linestatus', 60175, 60175) +(u'l_orderkey', 262144, 60175) +(u'l_partkey', 262144, 60175) +(u'l_quantity', 262144, 60175) +(u'l_receiptdate', 262144, 60175) +(u'l_returnflag', 60175, 60175) +(u'l_shipdate', 262144, 60175) +(u'l_shipinstruct', 60175, 60175) +(u'l_shipmode', 60175, 60175) +(u'l_suppkey', 262144, 60175) +(u'l_tax', 524288, 60175) +[(u'l_comment', 0), (u'l_commitdate', 0), (u'l_discount', 0), (u'l_extendedprice', 0), (u'l_linenumber', 0), (u'l_linestatus', 0), (u'l_orderkey', 0), (u'l_partkey', 0), (u'l_quantity', 0), (u'l_receiptdate', 0), (u'l_returnflag', 0), (u'l_shipdate', 0), (u'l_shipinstruct', 0), (u'l_shipmode', 0), (u'l_suppkey', 0), (u'l_tax', 0)] +(u'l_comment', 262144, 0) +(u'l_commitdate', 262144, 0) +(u'l_discount', 524288, 0) +(u'l_extendedprice', 524288, 0) +(u'l_linenumber', 262144, 0) +(u'l_linestatus', 60175, 0) +(u'l_orderkey', 262144, 0) +(u'l_partkey', 262144, 0) +(u'l_quantity', 262144, 0) +(u'l_receiptdate', 262144, 0) +(u'l_returnflag', 60175, 0) +(u'l_shipdate', 262144, 0) +(u'l_shipinstruct', 60175, 0) +(u'l_shipmode', 60175, 0) +(u'l_suppkey', 262144, 0) +(u'l_tax', 524288, 0) # 13:16:20 > # 13:16:20 > "Done." diff --git a/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Darwin.32bit b/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Darwin.32bit deleted file mode 100644 --- a/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Darwin.32bit +++ /dev/null @@ -1,65 +0,0 @@ -stdout of test 'delete_all` in directory 'sql/benchmarks/tpch/fileleak` itself: - - -# 13:16:19 > -# 13:16:19 > "mserver5" "--debug=10" "--set" "gdk_nr_threads=0" "--set" "mapi_open=true" "--set" "mapi_port=30091" "--set" "mapi_usock=/var/tmp/mtest-24961/.s.monetdb.30091" "--set" "monet_prompt=" "--forcemito" "--set" "mal_listing=2" "--dbpath=/home/niels/scratch/rc-clean/Linux-x86_64/var/MonetDB/mTests_sql_benchmarks_tpch_fileleak" "--set" "mal_listing=0" -# 13:16:19 > - -# MonetDB 5 server v11.15.12 -# This is an unreleased version -# Serving database 'mTests_sql_benchmarks_tpch_fileleak', using 4 threads -# Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked -# Found 3.775 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://niels.nesco.mine.nu:30091/ -# Listening for UNIX domain connection requests on mapi:monetdb:///var/tmp/mtest-24961/.s.monetdb.30091 -# MonetDB/GIS module loaded -# MonetDB/JAQL module loaded -# MonetDB/SQL module loaded - -Ready. - -# 13:16:19 > -# 13:16:19 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-24961" "--port=30091" -# 13:16:19 > - -(u'12/1204', 262144, 60175) -(u'12/1205', 262144, 60175) -(u'12/1206', 262144, 60175) -(u'12/1207', 262144, 60175) -(u'12/1210', 262144, 60175) -(u'12/1211', 524288, 60175) -(u'12/1212', 524288, 60175) -(u'12/1213', 524288, 60175) -(u'12/1214', 60175, 60175) -(u'12/1215', 60175, 60175) -(u'12/1216', 262144, 60175) -(u'12/1217', 262144, 60175) -(u'12/1220', 262144, 60175) -(u'12/1221', 60175, 60175) -(u'12/1222', 60175, 60175) -(u'12/1223', 262144, 60175) -[(u'12/1204', 0), (u'12/1205', 0), (u'12/1206', 0), (u'12/1207', 0), (u'12/1210', 0), (u'12/1211', 0), (u'12/1212', 0), (u'12/1213', 0), (u'12/1214', 0), (u'12/1215', 0), (u'12/1216', 0), (u'12/1217', 0), (u'12/1220', 0), (u'12/1221', 0), (u'12/1222', 0), (u'12/1223', 0)] -(u'12/1204', 262144, 0) -(u'12/1205', 262144, 0) -(u'12/1206', 262144, 0) -(u'12/1207', 262144, 0) -(u'12/1210', 262144, 0) -(u'12/1211', 524288, 0) -(u'12/1212', 524288, 0) -(u'12/1213', 524288, 0) -(u'12/1214', 60175, 0) -(u'12/1215', 60175, 0) -(u'12/1216', 262144, 0) -(u'12/1217', 262144, 0) -(u'12/1220', 262144, 0) -(u'12/1221', 60175, 0) -(u'12/1222', 60175, 0) -(u'12/1223', 262144, 0) - -# 13:16:20 > -# 13:16:20 > "Done." -# 13:16:20 > - diff --git a/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Windows b/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Windows --- a/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Windows +++ b/sql/benchmarks/tpch/fileleak/Tests/delete_all.stable.out.Windows @@ -25,39 +25,39 @@ Ready. # 13:16:19 > "mclient" "-lsql" "-ftest" "-Eutf-8" "-i" "-e" "--host=/var/tmp/mtest-24961" "--port=30091" # 13:16:19 > -(u'12\\1204', 240700, 60175) -(u'12\\1205', 240700, 60175) -(u'12\\1206', 240700, 60175) -(u'12\\1207', 240700, 60175) -(u'12\\1210', 240700, 60175) -(u'12\\1211', 524288, 60175) -(u'12\\1212', 524288, 60175) -(u'12\\1213', 524288, 60175) -(u'12\\1214', 60175, 60175) -(u'12\\1215', 60175, 60175) -(u'12\\1216', 240700, 60175) -(u'12\\1217', 240700, 60175) -(u'12\\1220', 240700, 60175) -(u'12\\1221', 60175, 60175) -(u'12\\1222', 60175, 60175) -(u'12\\1223', 240700, 60175) -[(u'12\\1204', 0), (u'12\\1205', 0), (u'12\\1206', 0), (u'12\\1207', 0), (u'12\\1210', 0), (u'12\\1211', 0), (u'12\\1212', 0), (u'12\\1213', 0), (u'12\\1214', 0), (u'12\\1215', 0), (u'12\\1216', 0), (u'12\\1217', 0), (u'12\\1220', 0), (u'12\\1221', 0), (u'12\\1222', 0), (u'12\\1223', 0)] -(u'12\\1204', 240700, 0) -(u'12\\1205', 240700, 0) -(u'12\\1206', 240700, 0) -(u'12\\1207', 240700, 0) -(u'12\\1210', 240700, 0) -(u'12\\1211', 524288, 0) -(u'12\\1212', 524288, 0) -(u'12\\1213', 524288, 0) -(u'12\\1214', 60175, 0) -(u'12\\1215', 60175, 0) -(u'12\\1216', 240700, 0) -(u'12\\1217', 240700, 0) -(u'12\\1220', 240700, 0) -(u'12\\1221', 60175, 0) -(u'12\\1222', 60175, 0) -(u'12\\1223', 240700, 0) +(u'l_comment', 240700, 60175) +(u'l_commitdate', 240700, 60175) +(u'l_discount', 524288, 60175) +(u'l_extendedprice', 524288, 60175) +(u'l_linenumber', 240700, 60175) +(u'l_linestatus', 60175, 60175) +(u'l_orderkey', 240700, 60175) +(u'l_partkey', 240700, 60175) +(u'l_quantity', 240700, 60175) +(u'l_receiptdate', 240700, 60175) +(u'l_returnflag', 60175, 60175) +(u'l_shipdate', 240700, 60175) +(u'l_shipinstruct', 60175, 60175) +(u'l_shipmode', 60175, 60175) +(u'l_suppkey', 240700, 60175) +(u'l_tax', 524288, 60175) +[(u'l_comment', 0), (u'l_commitdate', 0), (u'l_discount', 0), (u'l_extendedprice', 0), (u'l_linenumber', 0), (u'l_linestatus', 0), (u'l_orderkey', 0), (u'l_partkey', 0), (u'l_quantity', 0), (u'l_receiptdate', 0), (u'l_returnflag', 0), (u'l_shipdate', 0), (u'l_shipinstruct', 0), (u'l_shipmode', 0), (u'l_suppkey', 0), (u'l_tax', 0)] +(u'l_comment', 240700, 0) +(u'l_commitdate', 240700, 0) +(u'l_discount', 524288, 0) +(u'l_extendedprice', 524288, 0) +(u'l_linenumber', 240700, 0) +(u'l_linestatus', 60175, 0) +(u'l_orderkey', 240700, 0) +(u'l_partkey', 240700, 0) +(u'l_quantity', 240700, 0) +(u'l_receiptdate', 240700, 0) +(u'l_returnflag', 60175, 0) +(u'l_shipdate', 240700, 0) +(u'l_shipinstruct', 60175, 0) +(u'l_shipmode', 60175, 0) +(u'l_suppkey', 240700, 0) +(u'l_tax', 524288, 0) # 13:16:20 > # 13:16:20 > "Done." _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list