Changeset: ba73b2c5ad5e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ba73b2c5ad5e Modified Files: monetdb5/optimizer/opt_wrapper.c sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out sql/test/Tests/systemfunctions_nogeom.stable.out sql/test/mapi/Tests/php_monetdb_nogeom.stable.out Branch: default Log Message:
Merge with Feb2013 branch. diffs (124 lines): diff --git a/monetdb5/optimizer/opt_wrapper.c b/monetdb5/optimizer/opt_wrapper.c --- a/monetdb5/optimizer/opt_wrapper.c +++ b/monetdb5/optimizer/opt_wrapper.c @@ -155,9 +155,7 @@ str OPTwrapper (Client cntxt, MalBlkPtr s= findSymbol(cntxt->nspace, putName(modnme,strlen(modnme)),putName(fcnnme,strlen(fcnnme))); if( s == NULL) { - char buf[1024]; - snprintf(buf,1024, "%s.%s",modnme,fcnnme); - throw(MAL, optimizer, RUNTIME_OBJECT_UNDEFINED ":%s", buf); + throw(MAL, optimizer, RUNTIME_OBJECT_UNDEFINED ":%s.%s", modnme, fcnnme); } mb = s->def; stk= 0; diff --git a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out --- a/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out +++ b/sql/test/BugTracker-2012/Tests/predicate_select.Bug-3090_nogeom.stable.out @@ -47,20 +47,18 @@ Ready. [ 2130, "idxs", 2102, NULL, 0, true, 2, false, 0 ] [ 2135, "triggers", 2102, NULL, 0, true, 2, false, 0 ] [ 2146, "objects", 2102, NULL, 0, true, 2, false, 0 ] -[ 5062, "tables", 2000, "SELECT * FROM (SELECT p.*, 0 AS \"temporary\" FROM \"sys\".\"_tables\" AS p UNION ALL SELECT t.*, 1 AS \"temporary\" FROM \"tmp\".\"_tables\" AS t) AS tables where tables.type < 2;", 1, true, 0, false, 0 ] +[ 5062, "tables", 2000, "SELECT * FROM (SELECT p.*, 0 AS \"temporary\" FROM \"sys\".\"_tables\" AS p UNION ALL SELECT t.*, 1 AS \"temporary\" FROM \"tmp\".\"_tables\" AS t) AS tables where tables.type <> 2;", 1, true, 0, false, 0 ] [ 5072, "columns", 2000, "SELECT * FROM (SELECT p.* FROM \"sys\".\"_columns\" AS p UNION ALL SELECT t.* FROM \"tmp\".\"_columns\" AS t) AS columns;", 1, true, 0, false, 0 ] [ 5092, "db_user_info", 2000, NULL, 0, true, 0, false, 0 ] [ 5100, "users", 2000, "SELECT u.\"name\" AS \"name\", ui.\"fullname\", ui.\"default_schema\" FROM db_users() AS u LEFT JOIN \"sys\".\"db_user_info\" AS ui ON u.\"name\" = ui.\"name\" ;", 1, true, 0, false, 0 ] [ 5104, "user_role", 2000, NULL, 0, true, 0, false, 0 ] [ 5107, "auths", 2000, NULL, 0, true, 0, false, 0 ] [ 5111, "privileges", 2000, NULL, 0, true, 0, false, 0 ] -[ 5264, "queryhistory", 2000, NULL, 0, true, 0, false, 0 ] -[ 5278, "callhistory", 2000, NULL, 0, true, 0, false, 0 ] -[ 5295, "querylog", 2000, "create view querylog as\nselect qd.*, ql.ctime, ql.arguments, ql.exec, ql.result, ql.foot, ql.memory, ql.tuples, ql.inblock, ql.oublock from queryhistory qd, callhistory ql\nwhere qd.id = ql.id;", 1, true, 0, false, 0 ] -[ 5836, "storagemodelinput", 2000, NULL, 0, true, 0, false, 0 ] -[ 5877, "tablestoragemodel", 2000, "-- A summary of the table storage requirement is is available as a table view.\n-- The auxillary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select \"schema\",\"table\",max(count) as \"count\",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(indices) as indices,\n\tsum(case when sorted = false then 8 * count else 0 end) as auxillary\nfrom sys.storagemodel() group by \"schema\",\"table\";", 1, true, 0, false, 0 ] -[ 5899, "systemfunctions", 2000, NULL, 0, true, 0, false, 0 ] -[ 6008, "r", 2000, NULL, 0, false, 0, false, 0 ] +[ 5298, "history", 5255, "create view querylog.history as\nselect qd.*, ql.\"start\",ql.\"stop\", ql.arguments, ql.tuples, ql.run, ql.ship, ql.cpu, ql.space, ql.io \nfrom querylog.catalog() qd, querylog.calls() ql\nwhere qd.id = ql.id and qd.owner = user;", 1, false, 0, false, 0 ] +[ 5828, "storagemodelinput", 2000, NULL, 0, true, 0, false, 0 ] +[ 5869, "tablestoragemodel", 2000, "-- A summary of the table storage requirement is is available as a table view.\n-- The auxillary column denotes the maximum space if all non-sorted columns\n-- would be augmented with a hash (rare situation)\ncreate view sys.tablestoragemodel\nas select \"schema\",\"table\",max(count) as \"count\",\n\tsum(columnsize) as columnsize,\n\tsum(heapsize) as heapsize,\n\tsum(indices) as indices,\n\tsum(case when sorted = false then 8 * count else 0 end) as auxillary\nfrom sys.storagemodel() group by \"schema\",\"table\";", 1, true, 0, false, 0 ] +[ 5891, "systemfunctions", 2000, NULL, 0, true, 0, false, 0 ] +[ 6000, "r", 2000, NULL, 0, false, 0, false, 0 ] # 18:53:13 > # 18:53:13 > "Done." diff --git a/sql/test/Tests/systemfunctions_nogeom.stable.out b/sql/test/Tests/systemfunctions_nogeom.stable.out --- a/sql/test/Tests/systemfunctions_nogeom.stable.out +++ b/sql/test/Tests/systemfunctions_nogeom.stable.out @@ -48,7 +48,10 @@ Ready. % sys.s, sys.f, sys.a, sys.a, sys. # table_name % schema, function, argno, argtype, definition # name % varchar, varchar, int, varchar, varchar # type -% 3, 35, 1, 9, 1582 # length +% 8, 35, 1, 9, 1582 # length +[ "querylog", "calls", 0, "table", "-- Each query call is stored in the table calls\n-- At regular intervals the query history table should be cleaned.\n-- This can be done manually on the SQL console, or be integrated\n-- in the keepQuery and keepCall upon need.\n-- The parameters are geared at understanding the resource claims\n-- They reflect the effect of the total workload mix during execution.\n-- The 'cpu' gives the average cpu load percentage over all cores on the \n-- server during execution phase. \n-- increasing cpu load indicates better use of multi-cores.\n-- The 'io' indicate IOs during complete query run.\n-- The 'space' is the total amount of intermediates created in MB.\n-- Reducing the space component improves performance/\n-- All timing in usec and all storage in bytes.\n\ncreate function querylog.calls()\nreturns table(\n\tid oid,\t\t\t\t -- references query plan\n\t\"start\" timestamp,\t-- time the statement was started\n\t\"stop\" timestamp,\t-- time th e statement was completely finished\n\targuments string,\t-- actual call structure\n\ttuples wrd,\t\t\t-- number of tuples in the result set\n\trun bigint,\t\t-- time spent (in usec) until the result export\n\tship bigint,\t\t-- time spent (in usec) to ship the result set\n\tcpu int, \t\t-- average cpu load percentage during execution\n\tio int,\t\t\t-- percentage time waiting for IO to finish \n\tspace bigint\t\t-- total storage size of intermediates created (in MB)\n)\nexternal name sql.querylog_calls;" ] +[ "querylog", "catalog", 0, "table", "create function querylog.catalog()\nreturns table(\n\tid oid,\n\towner string,\n\tdefined timestamp,\n\tquery string,\n\tpipe string,\n\tmal int,\t\t\t-- size of MAL plan\n\toptimize bigint \t-- time in usec\n)\nexternal name sql.querylog_catalog;" ] +[ "querylog", "init", 0, "smallint", "create procedure querylog.init(threshold smallint)\nexternal name sql.querylog_init_threshold;" ] [ "sys", "abbrev", 0, "clob", "create function \"abbrev\" (p inet) returns clob\n\texternal name inet.\"abbrev\";" ] [ "sys", "abbrev", 1, "inet", "" ] [ "sys", "alpha", 0, "double", "create function alpha(pdec double, pradius double)\nreturns double external name sql.alpha;" ] @@ -172,20 +175,6 @@ Ready. [ "sys", "indexsize", 2, "bigint", "" ] [ "sys", "isaurl", 0, "boolean", "create function isaurl(theurl url) returns bool\n\texternal name url.\"isaURL\";" ] [ "sys", "isaurl", 1, "url", "" ] -[ "sys", "keepcall", 0, "wrd", "-- the signature is used in the kernel, don't change it\ncreate procedure keepcall(\n\tid wrd, \t\t\t-- references query plan\n\tctime timestamp,\t-- time the first statement was executed\n\targuments string,\n\txtime bigint,\t\t-- time from the first statement until result export\n\trtime bigint,\t\t-- time to ship the result to the client\n\tfoot bigint, \t\t-- footprint for all bats in the plan\n\tmemory bigint,\t\t-- storage size of intermediates created\n\ttuples wrd,\t\t\t-- number of tuples in the result set\n\tinblock bigint,\t\t-- number of physical blocks read\n\toublock bigint\t\t-- number of physical blocks written\n)\nbegin\n\tinsert into callhistory\n\tvalues( id, ctime, arguments, xtime, rtime, \n\t\tfoot, memory, tuples, inblock, oublock );\nend;" ] -[ "sys", "keepcall", 1, "timestamp", "" ] -[ "sys", "keepcall", 2, "clob", "" ] -[ "sys", "keepcall", 3, "bigint", "" ] -[ "sys", "keepcall", 4, "bigint", "" ] -[ "sys", "keepcall", 5, "bigint", "" ] -[ "sys", "keepcall", 6, "bigint", "" ] -[ "sys", "keepcall", 7, "wrd", "" ] -[ "sys", "keepcall", 8, "bigint", "" ] -[ "sys", "keepcall", 9, "bigint", "" ] -[ "sys", "keepquery", 0, "wrd", "-- the signature is used in the kernel, don't change it\ncreate procedure keepquery(\n\ti wrd,\n\tquery string,\n\tparse bigint,\n\toptimize bigint) \nbegin\n\tinsert into queryhistory\n\tvalues(i, now(), user, query, parse, optimize);\nend;" ] -[ "sys", "keepquery", 1, "clob", "" ] -[ "sys", "keepquery", 2, "bigint", "" ] -[ "sys", "keepquery", 3, "bigint", "" ] [ "sys", "like", 0, "clob", "create filter function \"like\"(val string, pat string, esc string) external name algebra.likesubselect;" ] [ "sys", "like", 1, "clob", "" ] [ "sys", "like", 2, "clob", "" ] diff --git a/sql/test/mapi/Tests/php_monetdb_nogeom.stable.out b/sql/test/mapi/Tests/php_monetdb_nogeom.stable.out --- a/sql/test/mapi/Tests/php_monetdb_nogeom.stable.out +++ b/sql/test/mapi/Tests/php_monetdb_nogeom.stable.out @@ -55,9 +55,7 @@ users user_role auths privileges -queryhistory -callhistory -querylog +history storagemodelinput tablestoragemodel systemfunctions @@ -81,21 +79,19 @@ 2123 keys 2102 0 true 2 false 0 2130 idxs 2102 0 true 2 false 0 2135 triggers 2102 0 true 2 false 0 2146 objects 2102 0 true 2 false 0 -5062 tables 2000 SELECT * FROM (SELECT p.*, 0 AS "temporary" FROM "sys"."_tables" AS p UNION ALL SELECT t.*, 1 AS "temporary" FROM "tmp"."_tables" AS t) AS tables where tables.type < 2; 1 true 0 false 0 +5062 tables 2000 SELECT * FROM (SELECT p.*, 0 AS "temporary" FROM "sys"."_tables" AS p UNION ALL SELECT t.*, 1 AS "temporary" FROM "tmp"."_tables" AS t) AS tables where tables.type <> 2; 1 true 0 false 0 5072 columns 2000 SELECT * FROM (SELECT p.* FROM "sys"."_columns" AS p UNION ALL SELECT t.* FROM "tmp"."_columns" AS t) AS columns; 1 true 0 false 0 5092 db_user_info 2000 0 true 0 false 0 5100 users 2000 SELECT u."name" AS "name", ui."fullname", ui."default_schema" FROM db_users() AS u LEFT JOIN "sys"."db_user_info" AS ui ON u."name" = ui."name" ; 1 true 0 false 0 5104 user_role 2000 0 true 0 false 0 5107 auths 2000 0 true 0 false 0 5111 privileges 2000 0 true 0 false 0 -5264 queryhistory 2000 0 true 0 false 0 -5278 callhistory 2000 0 true 0 false 0 -5295 querylog 2000 create view querylog asnselect qd.*, ql.ctime, ql.arguments, ql.exec, ql.result, ql.foot, ql.memory, ql.tuples, ql.inblock, ql.oublock from queryhistory qd, callhistory qlnwhere qd.id = ql.id; 1 true 0 false 0 -5836 storagemodelinput 2000 0 true 0 false 0 -5877 tablestoragemodel 2000 -- A summary of the table storage requirement is is available as a table view.n-- The auxillary column denotes the maximum space if all non-sorted columnsn-- would be augmented with a hash (rare situation)ncreate view sys.tablestoragemodelnas select "schema","table",max(count) as "count",ntsum(columnsize) as columnsize,ntsum(heapsize) as heapsize,ntsum(indices) as indices,ntsum(case when sorted = false then 8 * count else 0 end) as auxillarynfrom sys.storagemodel() group by "schema","table"; 1 true 0 false 0 -5899 systemfunctions 2000 0 true 0 false 0 +5298 history 5255 create view querylog.history asnselect qd.*, ql."start",ql."stop", ql.arguments, ql.tuples, ql.run, ql.ship, ql.cpu, ql.space, ql.io nfrom querylog.catalog() qd, querylog.calls() qlnwhere qd.id = ql.id and qd.owner = user; 1 false 0 false 0 +5828 storagemodelinput 2000 0 true 0 false 0 +5869 tablestoragemodel 2000 -- A summary of the table storage requirement is is available as a table view.n-- The auxillary column denotes the maximum space if all non-sorted columnsn-- would be augmented with a hash (rare situation)ncreate view sys.tablestoragemodelnas select "schema","table",max(count) as "count",ntsum(columnsize) as columnsize,ntsum(heapsize) as heapsize,ntsum(indices) as indices,ntsum(case when sorted = false then 8 * count else 0 end) as auxillarynfrom sys.storagemodel() group by "schema","table"; 1 true 0 false 0 +5891 systemfunctions 2000 0 true 0 false 0 -# 11:52:05 > -# 11:52:05 > "Done." -# 11:52:05 > +# 13:19:55 > +# 13:19:55 > "Done." +# 13:19:55 > _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list