Changeset: 0434c1df9af2 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0434c1df9af2
Modified Files:
sql/src/backends/monet5/sql.mx
sql/src/server/rel_optimizer.mx
sql/src/server/rel_schema.mx
sql/src/server/rel_select.mx
sql/src/storage/bat/bat_storage.mx
sql/src/test/BugDay_2005-10-06_2.9.3/Tests/All
sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908--performance.stable.out
sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908.stable.out
sql/src/test/BugTracker-2010/Tests/All
sql/src/test/BugTracker-2010/Tests/rank-over-crash.SF-2926454.stable.err
sql/src/test/BugTracker-2010/Tests/rank-over-crash.SF-2926454.stable.out
sql/src/test/BugTracker/Tests/union_order.stable.err
sql/src/test/Dependencies/Tests/Dependencies.stable.out
sql/src/test/Tests/All
sql/src/test/Tests/trace.stable.out
sql/src/test/copy/Tests/overflow_error.stable.err
sql/src/test/leaks/Tests/check0.stable.out
sql/src/test/leaks/Tests/check1.stable.out
sql/src/test/leaks/Tests/check2.stable.out
sql/src/test/leaks/Tests/check3.stable.out
sql/src/test/leaks/Tests/check4.stable.out
sql/src/test/leaks/Tests/check5.stable.out
sql/src/test/leaks/Tests/drop3.stable.out
sql/src/test/leaks/Tests/select1.stable.out
sql/src/test/leaks/Tests/select2.stable.out
sql/src/test/leaks/Tests/temp1.stable.out
sql/src/test/leaks/Tests/temp2.stable.out
sql/src/test/leaks/Tests/temp3.stable.out
sql/src/test/octopus/Tests/All
sql/src/test/sql_xml/Tests/All
Branch: default
Log Message:
Merge with Jun2010 branch.
diffs (truncated from 595 to 300 lines):
diff -r adb0111d066c -r 0434c1df9af2 MonetDB5/src/optimizer/opt_mergetable.mx
--- a/MonetDB5/src/optimizer/opt_mergetable.mx Fri Jul 02 15:54:34 2010 +0200
+++ b/MonetDB5/src/optimizer/opt_mergetable.mx Mon Jul 05 10:42:47 2010 +0200
@@ -1729,8 +1729,11 @@
The slice operation can also be piggy backed onto the mat.pack using it
as a property of the MAT. Pushing it through
would be feasible as well, provided the start of the slice is a constant 0.
+
+Disabled as a slice is used also for offset where we need the oposite
+of the slice part. y= x.slice(). x.diff(y);
@c
- if (match > 0 && getModuleId(p) == algebraRef &&
+ if (0 && match > 0 && getModuleId(p) == algebraRef &&
getFunctionId(p) == sliceRef &&
(m = isMATalias(getArg(p, 1), mat, mtop)) >= 0)
{
diff -r adb0111d066c -r 0434c1df9af2 sql/src/backends/monet5/sql.mx
--- a/sql/src/backends/monet5/sql.mx Fri Jul 02 15:54:34 2010 +0200
+++ b/sql/src/backends/monet5/sql.mx Mon Jul 05 10:42:47 2010 +0200
@@ -787,13 +787,13 @@
(e,g) := group.new(gp);
m := aggr.max(e);
c0 := calc.isnil(m);
- c0 := calc.not(c0);
+ c01 := calc.not(c0);
c1 := calc.>(m,1:wrd);
- c1 := calc.and(c0,c1);
+ c11 := calc.and(c01,c1);
ms := calc.str(m);
msg := str.+("zero_or_one: cardinality violation (", ms);
- msg := str.+(msg, ">1)");
- sql.assert(c1, msg);
+ msg1 := str.+(msg, ">1)");
+ sql.assert(c11, msg1);
return zero_or_one := b;
end sql.zero_or_one;
@@ -4848,7 +4848,7 @@
throw(SQL, "s...@1rank", "Cannot access descriptor");
if (!(BATtordered(b) & GDK_SORTED) && !(BATtordered(b) &
GDK_SORTED_REV))
throw(SQL, "s...@1rank", "bat not sorted");
-
+
bi = bat_iterator(b);
cmp = BATatoms[b->ttype].atomCmp;
cur = BUNtail(bi, BUNfirst(b));
diff -r adb0111d066c -r 0434c1df9af2 sql/src/server/rel_select.mx
--- a/sql/src/server/rel_select.mx Fri Jul 02 15:54:34 2010 +0200
+++ b/sql/src/server/rel_select.mx Mon Jul 05 10:42:47 2010 +0200
@@ -4203,11 +4203,15 @@
{
if (column_e->token == SQL_TABLE) {
char *tname = column_e->data.lval->h->data.sval;
- list *exps = rel_table_projections(sql, rel, tname);
- if (exps)
+ list *exps;
+
+ if ((exps = rel_table_projections(sql, rel, tname)) != NULL)
return exps;
+ if (!tname)
+ return sql_error(sql, 02,
+ "Table expression without table name");
return sql_error(sql, 02,
- "Column expression Table '%s' unknown", tname);
+ "Column expression Table '%s' unknown", tname);
}
return NULL;
}
diff -r adb0111d066c -r 0434c1df9af2 sql/src/storage/bat/bat_storage.mx
--- a/sql/src/storage/bat/bat_storage.mx Fri Jul 02 15:54:34 2010 +0200
+++ b/sql/src/storage/bat/bat_storage.mx Mon Jul 05 10:42:47 2010 +0200
@@ -123,9 +123,15 @@
BAT *b;
assert(access == RDONLY || access == RD_INS);
- if (temp || access == RD_INS || !bat->bid) {
+ if (temp || access == RD_INS) {
assert(bat->ibid);
b = temp_descriptor(bat->ibid);
+ } else if (!bat->bid) {
+ int tt = 0;
+ b = temp_descriptor(bat->ibid);
+ tt = b->ttype;
+ bat_destroy(b);
+ b = e_BAT(tt);
} else {
b = temp_descriptor(bat->bid);
bat_set_access(b, BAT_READ);
diff -r adb0111d066c -r 0434c1df9af2 sql/src/storage/bat/bat_utils.mx
--- a/sql/src/storage/bat/bat_utils.mx Fri Jul 02 15:54:34 2010 +0200
+++ b/sql/src/storage/bat/bat_utils.mx Mon Jul 05 10:42:47 2010 +0200
@@ -53,6 +53,7 @@
extern log_bid ebat2real(log_bid b, oid ibase);
extern log_bid e_bat(int type);
+extern BAT *e_BAT(int type);
extern log_bid e_ubat(int type);
extern log_bid ebat_copy(log_bid b, oid ibase, int temp);
extern log_bid eubat_copy(log_bid b, int temp);
@@ -234,6 +235,14 @@
return temp_create(ebats[type]);
}
+BAT *
+e_BAT(int type)
+{
+ if (!ebats[type])
+ ebats[type] = BATnew(TYPE_void, type, 0);
+ return temp_descriptor(ebats[type]->batCacheid);
+}
+
log_bid
e_ubat(int type)
{
diff -r adb0111d066c -r 0434c1df9af2
sql/src/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.out
--- a/sql/src/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.out
Fri Jul 02 15:54:34 2010 +0200
+++ b/sql/src/test/BugTracker-2009/Tests/POWER_vs_prod.SF-2596114.stable.out
Mon Jul 05 10:42:47 2010 +0200
@@ -41,7 +41,7 @@
_15:bat[:oid,:oid] := sql.bind_dbat(_2,"sys","sf_2596114",1);
_16 := bat.reverse(_15);
_17 := algebra.kdifference(_14,_16);
- _18:bat[:oid,:dbl] := batmmath.pow(_17,2:dbl);
+ _18:bat[:oid,:dbl] := batmmath.pow(_17,2);
exit _36;
_19 := sql.resultSet(1,1,_18);
sql.rsColumn(_19,"sys.","power_x","double",53,0,_18);
diff -r adb0111d066c -r 0434c1df9af2
sql/src/test/BugTracker-2009/Tests/alter_table_drop_constraint.SF-2803477.stable.err
---
a/sql/src/test/BugTracker-2009/Tests/alter_table_drop_constraint.SF-2803477.stable.err
Fri Jul 02 15:54:34 2010 +0200
+++
b/sql/src/test/BugTracker-2009/Tests/alter_table_drop_constraint.SF-2803477.stable.err
Mon Jul 05 10:42:47 2010 +0200
@@ -71,6 +71,9 @@
# 21:50:59 > mclient -lsql -umonetdb -Pmonetdb --host=alf --port=38418
# 21:50:59 >
+MAPI = mone...@alf:32448
+QUERY = DROP INDEX UNQ_VALUE_C;
+ERROR = !DROP INDEX: no such index 'unq_value_c'
# 21:50:59 >
# 21:50:59 > Done.
diff -r adb0111d066c -r 0434c1df9af2
sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908--performance.stable.out
---
a/sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908--performance.stable.out
Fri Jul 02 15:54:34 2010 +0200
+++
b/sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908--performance.stable.out
Mon Jul 05 10:42:47 2010 +0200
@@ -21,11 +21,10 @@
Over..
-# 11:17:13 >
-# 11:17:13 > mclient -lsql -ftest -i -e --host=alf --port=39432
-# 11:17:13 >
+# 20:57:34 >
+# 20:57:34 > mclient -lsql -ftest -i -e --host=alf --port=32448
+# 20:57:34 >
-TABLE sys.url_test
CREATE TABLE "sys"."triggers" (
"id" int,
"name" varchar(1024),
diff -r adb0111d066c -r 0434c1df9af2
sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908.stable.out
--- a/sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908.stable.out
Fri Jul 02 15:54:34 2010 +0200
+++ b/sql/src/test/BugTracker-2009/Tests/dumping_tables.SF-2776908.stable.out
Mon Jul 05 10:42:47 2010 +0200
@@ -21,16 +21,15 @@
Over..
-# 11:17:12 >
-# 11:17:12 > ./dumping_tables.SF-2776908.SQL.sh dumping_tables.SF-2776908
-# 11:17:12 >
+# 20:57:34 >
+# 20:57:34 > ./dumping_tables.SF-2776908.SQL.sh dumping_tables.SF-2776908
+# 20:57:34 >
-# 11:17:12 >
-# 11:17:12 > Mtimeout -timeout 60 mclient -lsql -ftest -i -e --host=alf
--port=39432 -i <
/net/alf.ins.cwi.nl/export/scratch1/niels/MonetDB/sql/src/test/BugTracker-2009/Tests/../dumping_tables.SF-2776908.sql
-# 11:17:12 >
+# 20:57:34 >
+# 20:57:34 > Mtimeout -timeout 60 mclient -lsql -ftest -i -e --host=alf
--port=32448 -i <
/net/alf.ins.cwi.nl/export/scratch1/niels/rc/MonetDB/sql/src/test/BugTracker-2009/Tests/../dumping_tables.SF-2776908.sql
+# 20:57:34 >
-TABLE sys.url_test
CREATE TABLE "sys"."triggers" (
"id" int,
"name" varchar(1024),
diff -r adb0111d066c -r 0434c1df9af2 sql/src/test/BugTracker-2010/Tests/All
--- a/sql/src/test/BugTracker-2010/Tests/All Fri Jul 02 15:54:34 2010 +0200
+++ b/sql/src/test/BugTracker-2010/Tests/All Mon Jul 05 10:42:47 2010 +0200
@@ -15,3 +15,4 @@
multiple-updates-in-transaction.Bug-2543
limit_in_prepare.Bug-2552
select_star.Bug-2563
+delete_insert.Bug-2529
diff -r adb0111d066c -r 0434c1df9af2
sql/src/test/BugTracker-2010/Tests/delete_insert.Bug-2529.sql
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/delete_insert.Bug-2529.sql Mon Jul
05 10:42:47 2010 +0200
@@ -0,0 +1,37 @@
+START TRANSACTION;
+CREATE TABLE user_record (
+ name VARCHAR(64),
+ uid VARCHAR(32) PRIMARY KEY
+);
+CREATE TABLE user_record_insertion (
+ name VARCHAR(64),
+ uid VARCHAR(32)
+);
+CREATE TABLE user_record_insertion2 (
+ name VARCHAR(64),
+ uid VARCHAR(32)
+);
+COMMIT;
+START TRANSACTION;
+DELETE
+ FROM user_record_insertion;
+COPY 10 RECORDS INTO user_record_insertion FROM STDIN USING DELIMITERS
',','\n';
+Steven Teague,d5329b8f
+Chrystal Whitman,20cbc561
+Elisabeth Luetten,4e0bfbea
+Jimmy Roark,6b0e43bd
+Vern Marrero,c2d113ad
+Shelly Rankin,198118fe
+Randall Kaiser,f76bfe86
+Rusty Wuerzen,9c29633b
+Wilfredo Rosenbaum,e5c469cb
+Cecil Herrington,000c14c7
+
+INSERT INTO user_record_insertion2 (name,uid)
+SELECT name,uid FROM user_record_insertion;
+INSERT INTO user_record (name,uid)
+SELECT name,uid FROM user_record_insertion2;
+COMMIT;
+DROP TABLE user_record_insertion2;
+DROP TABLE user_record_insertion;
+DROP TABLE user_record;
diff -r adb0111d066c -r 0434c1df9af2
sql/src/test/BugTracker-2010/Tests/delete_insert.Bug-2529.stable.err
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sql/src/test/BugTracker-2010/Tests/delete_insert.Bug-2529.stable.err
Mon Jul 05 10:42:47 2010 +0200
@@ -0,0 +1,78 @@
+stderr of test 'delete_insert.Bug-2529` in directory
'src/test/BugTracker-2010` itself:
+
+
+# 20:59:20 >
+# 20:59:20 > mserver5
"--config=/ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf" --debug=10
--set gdk_nr_threads=0 --set
"monet_mod_path=/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin"
--set "gdk_dbfarm=/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm"
--set mapi_open=true --set xrpc_open=true --set mapi_port=32448 --set
xrpc_port=47541 --set monet_prompt= --set mal_listing=2 --trace
"--dbname=mTests_src_test_BugTracker-2010" --set mal_listing=0 ; echo ; echo
Over..
+# 20:59:20 >
+
+# builtin opt gdk_arch = 64bitx86_64-unknown-linux-gnu
+# builtin opt gdk_version = 1.38.0
+# builtin opt prefix = /ufs/niels/scratch/rc/Linux-x86_64
+# builtin opt exec_prefix = ${prefix}
+# builtin opt gdk_dbname = demo
+# builtin opt gdk_dbfarm = ${prefix}/var/MonetDB/dbfarm
+# builtin opt gdk_debug = 0
+# builtin opt gdk_alloc_map = no
+# builtin opt gdk_vmtrim = yes
+# builtin opt monet_admin = adm
+# builtin opt monet_prompt = >
+# builtin opt monet_welcome = yes
+# builtin opt monet_mod_path = ${exec_prefix}/lib/MonetDB
+# builtin opt monet_daemon = no
+# builtin opt host = localhost
+# builtin opt mapi_port = 50000
+# builtin opt mapi_clients = 2
+# builtin opt mapi_open = false
+# builtin opt mapi_autosense = false
+# builtin opt sql_debug = 0
+# builtin opt standoff_ns =
+# builtin opt standoff_start = start
+# builtin opt standoff_end = end
+# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64
+# config opt config = ${prefix}/etc/monetdb5.conf
+# config opt prefix = /ufs/niels/scratch/rc/Linux-x86_64
+# config opt exec_prefix = ${prefix}
+# config opt gdk_dbfarm = ${prefix}/var/MonetDB5/dbfarm
+# config opt monet_mod_path =
${exec_prefix}/lib/MonetDB5:${exec_prefix}/lib/MonetDB5/lib:${exec_prefix}/lib/MonetDB5/bin
+# config opt mero_pidfile = ${prefix}/var/run/MonetDB/merovingian.pid
+# config opt mero_controlport = 50001
+# config opt sql_optimizer = default_pipe
+# config opt minimal_pipe = inline,remap,deadcode,multiplex,garbageCollector
+# config opt default_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt nov2009_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt replication_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,replication,multiplex,garbageCollector
+# config opt accumulator_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,accumulators,dataflow,history,multiplex,garbageCollector
+# config opt recycler_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,deadcode,recycle,reduce,dataflow,history,multiplex,garbageCollector
+# config opt cracker_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,selcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt sidcrack_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,sidcrack,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt datacell_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,deadcode,constants,commonTerms,joinPath,datacell,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt octopus_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mitosis,mergetable,deadcode,constants,commonTerms,joinPath,octopus,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt mapreduce_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mapreduce,mergetable,deadcode,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt datacyclotron_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,datacyclotron,mergetable,deadcode,constants,commonTerms,joinPath,reorder,deadcode,reduce,dataflow,history,replication,multiplex,garbageCollector
+# config opt derive_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,derivePath,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt dictionary_pipe =
inline,remap,dictionary,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,history,multiplex,garbageCollector
+# config opt compression_pipe =
inline,remap,evaluate,costModel,coercions,emptySet,aliases,mergetable,deadcode,constants,commonTerms,joinPath,deadcode,reduce,dataflow,compression,dataflow,history,multiplex,garbageCollector
+# cmdline opt config = /ufs/niels/scratch/rc/Linux-x86_64/etc/monetdb5.conf
+# cmdline opt gdk_nr_threads = 0
+# cmdline opt monet_mod_path =
/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/lib:/ufs/niels/scratch/rc/Linux-x86_64/lib/MonetDB5/bin
+# cmdline opt gdk_dbfarm =
/ufs/niels/scratch/rc/Linux-x86_64/var/MonetDB5/dbfarm
+# cmdline opt mapi_open = true
+# cmdline opt xrpc_open = true
+# cmdline opt mapi_port = 32448
+# cmdline opt xrpc_port = 47541
+# cmdline opt monet_prompt =
+# cmdline opt mal_listing = 2
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list