Changeset: 349489ad0ecb for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=349489ad0ecb Modified Files: clients/Tests/MAL-signatures.stable.out clients/Tests/MAL-signatures.stable.out.int128 clients/mapiclient/mclient.c monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows monetdb5/modules/mal/01_batcalc.mal sql/jdbc/tests/Tests/Test_CisValid.stable.err sql/jdbc/tests/Tests/Test_Rmetadata.stable.out sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.sql sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.stable.out Branch: default Log Message:
Merge with Jun2016 branch. diffs (252 lines): diff --git a/clients/Tests/MAL-signatures.stable.out b/clients/Tests/MAL-signatures.stable.out --- a/clients/Tests/MAL-signatures.stable.out +++ b/clients/Tests/MAL-signatures.stable.out @@ -24438,6 +24438,18 @@ pattern batcalc.ifthenelse(b:bat[:bit],v address CMDifthen; comment If-then-else operation to assemble a conditional result +pattern batcalc.ifthenelse(v:bit,b1:bat[:any_1],v2:any_1):bat[:any_1] +address CMDifthen; +comment If-then-else operation to assemble a conditional result + +pattern batcalc.ifthenelse(v:bit,v1:any_1,b2:bat[:any_1]):bat[:any_1] +address CMDifthen; +comment If-then-else operation to assemble a conditional result + +pattern batcalc.ifthenelse(v:bit,b1:bat[:any_1],b2:bat[:any_1]):bat[:any_1] +address CMDifthen; +comment If-then-else operation to assemble a conditional result + pattern batcalc.int_noerror(b:bat[:str],s:bat[:oid]):bat[:int] address CMDconvert_int; comment cast from str to int with candidates list diff --git a/clients/Tests/MAL-signatures.stable.out.int128 b/clients/Tests/MAL-signatures.stable.out.int128 --- a/clients/Tests/MAL-signatures.stable.out.int128 +++ b/clients/Tests/MAL-signatures.stable.out.int128 @@ -31600,6 +31600,18 @@ pattern batcalc.ifthenelse(b:bat[:bit],v address CMDifthen; comment If-then-else operation to assemble a conditional result +pattern batcalc.ifthenelse(v:bit,b1:bat[:any_1],v2:any_1):bat[:any_1] +address CMDifthen; +comment If-then-else operation to assemble a conditional result + +pattern batcalc.ifthenelse(v:bit,v1:any_1,b2:bat[:any_1]):bat[:any_1] +address CMDifthen; +comment If-then-else operation to assemble a conditional result + +pattern batcalc.ifthenelse(v:bit,b1:bat[:any_1],b2:bat[:any_1]):bat[:any_1] +address CMDifthen; +comment If-then-else operation to assemble a conditional result + pattern batcalc.int_noerror(b:bat[:str],s:bat[:oid]):bat[:int] address CMDconvert_int; comment cast from str to int with candidates list diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -2195,7 +2195,11 @@ doFile(Mapi mid, stream *fp, int useinse #endif (void) save_history; /* not used if no readline */ - if (getFile(fp) && isatty(fileno(getFile(fp)))) { + if (getFile(fp) && isatty(fileno(getFile(fp))) +#ifdef WIN32 /* isatty may not give expected result */ + && formatter != TESTformatter +#endif + ) { interactive = 1; setPrompt(); prompt = promptbuf; diff --git a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows --- a/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows +++ b/monetdb5/extras/mal_optimizer_template/Tests/opt_sql_append.stable.out.Windows @@ -56,7 +56,7 @@ Ready. % def # name % clob # type % 541 # length -[ "optimizer.inline();optimizer.candidates();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.aliases();optimizer.pushselect();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.garbageCollector();" ] +[ "optimizer.inline();optimizer.candidates();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.pushselect();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.garbageCollector();" ] #explain copy into ttt from 'a:\tmp/xyz'; % .explain # table_name % mal # name @@ -90,7 +90,7 @@ end user.s4_1; % def # name % clob # type % 564 # length -[ "optimizer.inline();optimizer.candidates();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.aliases();optimizer.pushselect();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.sql_append();optimizer.garbageCollector();" ] +[ "optimizer.inline();optimizer.candidates();optimizer.remap();optimizer.costModel();optimizer.coercions();optimizer.evaluate();optimizer.pushselect();optimizer.aliases();optimizer.mitosis();optimizer.mergetable();optimizer.deadcode();optimizer.aliases();optimizer.constants();optimizer.commonTerms();optimizer.projectionpath();optimizer.deadcode();optimizer.reorder();optimizer.reduce();optimizer.matpack();optimizer.dataflow();optimizer.querylog();optimizer.multiplex();optimizer.generator();optimizer.profiler();optimizer.sql_append();optimizer.garbageCollector();" ] #explain copy into ttt from 'Z:/tmp/xyz'; % .explain # table_name % mal # name diff --git a/monetdb5/modules/mal/01_batcalc.mal b/monetdb5/modules/mal/01_batcalc.mal --- a/monetdb5/modules/mal/01_batcalc.mal +++ b/monetdb5/modules/mal/01_batcalc.mal @@ -21075,6 +21075,18 @@ pattern str_noerror(b:bat[:str],s:bat[:o address CMDconvert_str comment "cast from str to str with candidates list"; +pattern ifthenelse(v:bit, b1:bat[:any_1], b2:bat[:any_1]) :bat[:any_1] +address CMDifthen +comment "If-then-else operation to assemble a conditional result"; + +pattern ifthenelse(v:bit, v1:any_1, b2:bat[:any_1]) :bat[:any_1] +address CMDifthen +comment "If-then-else operation to assemble a conditional result"; + +pattern ifthenelse(v:bit, b1:bat[:any_1], v2:any_1) :bat[:any_1] +address CMDifthen +comment "If-then-else operation to assemble a conditional result"; + pattern ifthenelse(b:bat[:bit], v1:any_1, v2:any_1) :bat[:any_1] address CMDifthen comment "If-then-else operation to assemble a conditional result"; diff --git a/sql/jdbc/tests/Tests/Test_CisValid.stable.err b/sql/jdbc/tests/Tests/Test_CisValid.stable.err --- a/sql/jdbc/tests/Tests/Test_CisValid.stable.err +++ b/sql/jdbc/tests/Tests/Test_CisValid.stable.err @@ -36,8 +36,8 @@ stderr of test 'Test_CisValid` in direct # 23:03:08 > java.sql.SQLException: SELECT: no such table 'doesnotexist' - at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2603) - at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:2351) + at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.executeQuery(MonetConnection.java:2602) + at nl.cwi.monetdb.jdbc.MonetConnection$ResponseList.processQuery(MonetConnection.java:2350) at nl.cwi.monetdb.jdbc.MonetStatement.internalExecute(MonetStatement.java:507) at nl.cwi.monetdb.jdbc.MonetStatement.execute(MonetStatement.java:345) at Test_CisValid.main(Test_CisValid.java:23) diff --git a/sql/jdbc/tests/Tests/Test_Rmetadata.stable.out b/sql/jdbc/tests/Tests/Test_Rmetadata.stable.out --- a/sql/jdbc/tests/Tests/Test_Rmetadata.stable.out +++ b/sql/jdbc/tests/Tests/Test_Rmetadata.stable.out @@ -116,7 +116,7 @@ Colnr 5. name myclob type 2005 typename clob - precision 0 + precision 11 scale 0 catalogname null schemaname sys diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.sql b/sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.sql --- a/sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.sql +++ b/sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.sql @@ -2,7 +2,7 @@ create table bug3923(i integer); -- skip columns location, count, columnsize. -select "schema", "table", "column", "type", "mode", typewidth, heapsize, hashes, phash, "imprints", sorted from storage() where "table"= '_tables'; +select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, "imprints", sorted from storage() where "table"= '_tables'; call storagemodelinit(); update storagemodelinput set "count" =10000 where "table" ='bug3923'; @@ -15,7 +15,8 @@ drop table bug3923; crate schema bug3923schema; create table bug3923(i integer); -select * from storage() where "table"= '_tables'; +-- skip columns location, count, columnsize. +select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, "imprints", sorted from storage() where "table"= '_tables'; call storagemodelinit(); update storagemodelinput set "count" =10000 where "table" ='bug3923'; diff --git a/sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.stable.out b/sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.stable.out --- a/sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.stable.out +++ b/sql/test/BugTracker-2016/Tests/storagemodel.Bug-3923.stable.out @@ -66,27 +66,27 @@ Ready. # 23:38:44 > #create table bug3923(i integer); -#select "schema", "table", "column", "type", "mode", typewidth, heapsize, hashes, phash, imprints, sorted from storage() where "table"= '_tables'; -% .L, .L, .L, .L, .L, .L, .L, .L, .L, .L, .L # table_name -% schema, table, column, type, mode, typewidth, heapsize, hashes, phash, imprints, sorted # name -% clob, clob, clob, clob, clob, int, bigint, bigint, boolean, bigint, boolean # type -% 3, 7, 13, 8, 8, 2, 5, 1, 5, 1, 5 # length -[ "sys", "_tables", "id", "int", "writable", 4, 0, 0, false, 0, true ] -[ "sys", "_tables", "name", "varchar", "writable", 8, 9712, 0, false, 0, false ] -[ "sys", "_tables", "schema_id", "int", "writable", 4, 0, 0, false, 0, false ] -[ "sys", "_tables", "query", "varchar", "writable", 45, 11161, 0, false, 0, false ] -[ "sys", "_tables", "type", "smallint", "writable", 2, 0, 0, false, 0, false ] -[ "sys", "_tables", "system", "boolean", "writable", 1, 0, 0, false, 0, false ] -[ "sys", "_tables", "commit_action", "smallint", "writable", 2, 0, 0, false, 0, false ] -[ "sys", "_tables", "access", "smallint", "writable", 2, 0, 0, false, 0, true ] -[ "tmp", "_tables", "id", "int", "writable", 4, 0, 0, false, 0, true ] -[ "tmp", "_tables", "name", "varchar", "writable", 1, 8192, 0, false, 0, true ] -[ "tmp", "_tables", "schema_id", "int", "writable", 4, 0, 0, false, 0, true ] -[ "tmp", "_tables", "query", "varchar", "writable", 1, 8192, 0, false, 0, true ] -[ "tmp", "_tables", "type", "smallint", "writable", 2, 0, 0, false, 0, true ] -[ "tmp", "_tables", "system", "boolean", "writable", 1, 0, 0, false, 0, true ] -[ "tmp", "_tables", "commit_action", "smallint", "writable", 2, 0, 0, false, 0, true ] -[ "tmp", "_tables", "access", "smallint", "writable", 2, 0, 0, false, 0, true ] +#select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, "imprints", sorted from storage() where "table"= '_tables'; +% .L, .L, .L, .L, .L, .L, .L, .L, .L, .L # 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", 8, 0, false, 0, false ] +[ "sys", "_tables", "schema_id", "int", "writable", 4, 0, false, 0, false ] +[ "sys", "_tables", "query", "varchar", "writable", 45, 0, false, 0, false ] +[ "sys", "_tables", "type", "smallint", "writable", 2, 0, false, 0, false ] +[ "sys", "_tables", "system", "boolean", "writable", 1, 0, false, 0, false ] +[ "sys", "_tables", "commit_action", "smallint", "writable", 2, 0, false, 0, false ] +[ "sys", "_tables", "access", "smallint", "writable", 2, 0, false, 0, true ] +[ "tmp", "_tables", "id", "int", "writable", 4, 0, false, 0, true ] +[ "tmp", "_tables", "name", "varchar", "writable", 1, 0, false, 0, true ] +[ "tmp", "_tables", "schema_id", "int", "writable", 4, 0, false, 0, true ] +[ "tmp", "_tables", "query", "varchar", "writable", 1, 0, false, 0, true ] +[ "tmp", "_tables", "type", "smallint", "writable", 2, 0, false, 0, true ] +[ "tmp", "_tables", "system", "boolean", "writable", 1, 0, false, 0, true ] +[ "tmp", "_tables", "commit_action", "smallint", "writable", 2, 0, false, 0, true ] +[ "tmp", "_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'; @@ -99,27 +99,27 @@ Ready. [ "sys", "bug3923", "i", "int", 10000, 40000, 0, 0, 1200, true, 0 ] #drop table bug3923; #create table bug3923(i integer); -#select * from storage() where "table"= '_tables'; -% ., ., ., ., ., ., ., ., ., ., ., ., ., ., . # table_name -% schema, table, column, type, mode, location, count, typewidth, columnsize, heapsize, hashes, phash, imprints, sorted, orderidx # name -% clob, clob, clob, clob, clob, clob, bigint, int, bigint, bigint, bigint, boolean, bigint, boolean, bigint # type -% 3, 7, 13, 8, 8, 6, 2, 2, 3, 5, 4, 5, 1, 5, 1 # length -[ "sys", "_tables", "id", "int", "writable", "01/157", 58, 4, 232, 0, 2600, false, 0, false, 0 ] -[ "sys", "_tables", "name", "varchar", "writable", "01/160", 58, 8, 116, 9712, 0, false, 0, false, 0 ] -[ "sys", "_tables", "schema_id", "int", "writable", "01/161", 58, 4, 232, 0, 0, false, 0, false, 0 ] -[ "sys", "_tables", "query", "varchar", "writable", "01/162", 58, 45, 116, 11161, 0, false, 0, false, 0 ] -[ "sys", "_tables", "type", "smallint", "writable", "01/163", 58, 2, 116, 0, 0, false, 0, false, 0 ] -[ "sys", "_tables", "system", "boolean", "writable", "01/164", 58, 1, 58, 0, 0, false, 0, false, 0 ] -[ "sys", "_tables", "commit_action", "smallint", "writable", "01/165", 58, 2, 116, 0, 0, false, 0, false, 0 ] -[ "sys", "_tables", "access", "smallint", "writable", "01/166", 58, 2, 116, 0, 0, false, 0, true, 0 ] -[ "tmp", "_tables", "id", "int", "writable", "02/236", 0, 4, 0, 0, 0, false, 0, true, 0 ] -[ "tmp", "_tables", "name", "varchar", "writable", "02/237", 0, 1, 0, 8192, 0, false, 0, true, 0 ] -[ "tmp", "_tables", "schema_id", "int", "writable", "02/240", 0, 4, 0, 0, 0, false, 0, true, 0 ] -[ "tmp", "_tables", "query", "varchar", "writable", "02/241", 0, 1, 0, 8192, 0, false, 0, true, 0 ] -[ "tmp", "_tables", "type", "smallint", "writable", "02/242", 0, 2, 0, 0, 0, false, 0, true, 0 ] -[ "tmp", "_tables", "system", "boolean", "writable", "02/243", 0, 1, 0, 0, 0, false, 0, true, 0 ] -[ "tmp", "_tables", "commit_action", "smallint", "writable", "02/244", 0, 2, 0, 0, 0, false, 0, true, 0 ] -[ "tmp", "_tables", "access", "smallint", "writable", "02/245", 0, 2, 0, 0, 0, false, 0, true, 0 ] +#select "schema", "table", "column", "type", "mode", typewidth, hashes, phash, "imprints", sorted from storage() where "table"= '_tables'; +% .L, .L, .L, .L, .L, .L, .L, .L, .L, .L # 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, 2600, false, 0, false ] +[ "sys", "_tables", "name", "varchar", "writable", 8, 0, false, 0, false ] +[ "sys", "_tables", "schema_id", "int", "writable", 4, 0, false, 0, false ] +[ "sys", "_tables", "query", "varchar", "writable", 45, 0, false, 0, false ] +[ "sys", "_tables", "type", "smallint", "writable", 2, 0, false, 0, false ] +[ "sys", "_tables", "system", "boolean", "writable", 1, 0, false, 0, false ] +[ "sys", "_tables", "commit_action", "smallint", "writable", 2, 0, false, 0, false ] +[ "sys", "_tables", "access", "smallint", "writable", 2, 0, false, 0, true ] +[ "tmp", "_tables", "id", "int", "writable", 4, 0, false, 0, true ] +[ "tmp", "_tables", "name", "varchar", "writable", 1, 0, false, 0, true ] +[ "tmp", "_tables", "schema_id", "int", "writable", 4, 0, false, 0, true ] +[ "tmp", "_tables", "query", "varchar", "writable", 1, 0, false, 0, true ] +[ "tmp", "_tables", "type", "smallint", "writable", 2, 0, false, 0, true ] +[ "tmp", "_tables", "system", "boolean", "writable", 1, 0, false, 0, true ] +[ "tmp", "_tables", "commit_action", "smallint", "writable", 2, 0, false, 0, true ] +[ "tmp", "_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'; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list