MonetDB: Oct2014 - Make test independent of contents of system t...
Changeset: a40581d0ac73 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a40581d0ac73 Modified Files: sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out Branch: Oct2014 Log Message: Make test independent of contents of system tables. diffs (truncated from 2085 to 300 lines): diff --git a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql --- a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql +++ b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql @@ -1,44 +1,24 @@ -SELECT tbl.action FROM sys.keys tbl; -SELECT tbl.action FROM tmp.keys tbl; +create table keywords ( + action integer, + default integer, + schema integer, + start integer, + statement integer, + user integer +); +insert into keywords values (1, 2, 3, 4, 5, 6); -SELECT tbl.default FROM sys._columns tbl; -SELECT tbl.default FROM sys.columns tbl; -SELECT tbl.default FROM tmp._columns tbl; +SELECT tbl.action FROM sys.keywords tbl; +SELECT tbl.default FROM sys.keywords tbl; +SELECT tbl.schema FROM sys.keywords tbl; +SELECT tbl.start FROM sys.keywords tbl; +SELECT tbl.statement FROM sys.keywords tbl; +SELECT tbl.user FROM sys.keywords tbl; -SELECT tbl.schema FROM sys.statistics tbl; -SELECT tbl.schema FROM sys.storage tbl; -SELECT tbl.schema FROM sys.storagemodel tbl; -SELECT tbl.schema FROM sys.storagemodelinput tbl; -SELECT tbl.schema FROM sys.tablestoragemodel tbl; +SELECT action FROM sys.keywords; +SELECT default FROM sys.keywords; +SELECT schema FROM sys.keywords; +SELECT start FROM sys.keywords; +SELECT statement FROM sys.keywords; -SELECT tbl.start FROM sys.querylog_calls tbl; -SELECT tbl.start FROM sys.querylog_history tbl; -SELECT tbl.start FROM sys.sequences tbl; - -SELECT tbl.statement FROM sys.triggers tbl; -SELECT tbl.statement FROM tmp.triggers tbl; - -SELECT tbl.user FROM sys.connections tbl; -SELECT tbl.user FROM sys.queue tbl; -SELECT tbl.user FROM sys.sessions tbl; -SELECT tbl.user FROM sys.tracelog tbl; - -SELECT action FROM sys.keys; -SELECT action FROM tmp.keys; - -SELECT default FROM sys._columns; -SELECT default FROM sys.columns; -SELECT default FROM tmp._columns; - -SELECT schema FROM sys.statistics; -SELECT schema FROM sys.storage; -SELECT schema FROM sys.storagemodel; -SELECT schema FROM sys.storagemodelinput; -SELECT schema FROM sys.tablestoragemodel; - -SELECT start FROM sys.querylog_calls; -SELECT start FROM sys.querylog_history; -SELECT start FROM sys.sequences; - -SELECT statement FROM sys.triggers; -SELECT statement FROM tmp.triggers; +drop table keywords; diff --git a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out --- a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out +++ b/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out @@ -29,1949 +29,83 @@ Ready. # 18:58:09 mclient -lsql -ftest -Eutf-8 -i -e --host=/var/tmp/mtest-21543 --port=39106 # 18:58:09 -#SELECT tbl.action FROM sys.keys tbl; +#create table keywords ( +# action integer, +# default integer, +# schema integer, +# start integer, +# statement integer, +# user integer +#); +#insert into keywords values (1, 2, 3, 4, 5, 6); +[ 1] +#SELECT tbl.action FROM sys.keywords tbl; % sys.tbl # table_name % action # name % int # type -% 3 # length -[ -1 ] -[ -1 ] -[ 514 ] -[ -1 ] -[ 514 ] -[ -1 ] -[ 514 ] -#SELECT tbl.action FROM tmp.keys tbl; -% tmp.tbl # table_name +% 1 # length +[ 1] +#SELECT tbl.default FROM sys.keywords tbl; +% sys.tbl # table_name +% default # name +% int # type +% 1 # length +[ 2] +#SELECT tbl.schema FROM sys.keywords tbl; +% sys.tbl # table_name +% schema # name +% int # type +% 1 # length +[ 3] +#SELECT tbl.start FROM sys.keywords tbl; +% sys.tbl # table_name +% start # name +% int # type +% 1 # length +[ 4] +#SELECT tbl.statement FROM sys.keywords tbl; +% sys.tbl # table_name +% statement # name +% int # type +% 1 # length +[ 5] +#SELECT tbl.user FROM sys.keywords tbl; +% sys.tbl # table_name +% user # name +% int # type +% 1 # length +[ 6] +#SELECT action FROM sys.keywords; +% sys.keywords # table_name % action # name % int # type % 1 # length -#SELECT tbl.default FROM sys._columns tbl; -% sys.tbl # table_name +[ 1] +#SELECT default FROM sys.keywords; +% sys.keywords # table_name % default # name -% varchar # type -% 0 # length -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL ] -[ NULL
MonetDB: Oct2014 - Simplify test script: let Mtest start server.
Changeset: 181fc03e9520 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=181fc03e9520 Added Files: sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py Removed Files: sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py Modified Files: sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out Branch: Oct2014 Log Message: Simplify test script: let Mtest start server. diffs (90 lines): diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py rename from sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py rename to sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py --- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py +++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py @@ -4,31 +4,16 @@ try: except ImportError: import process -def server_start(): -sys.stderr.write('#mserver\n') -sys.stderr.flush() -srv = process.server(stdin = process.PIPE, - stdout = process.PIPE, stderr = process.PIPE) -return srv - -def client(lang, user = 'monetdb', passwd = 'monetdb'): +def main(): sys.stderr.write('#client\n') sys.stderr.flush() -clt = process.client(lang, user = user, passwd = passwd, +clt = process.client('sql', user = 'monetdb', passwd = 'monetdb', stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) currenttime = time.strftime('%H:%M:%S', time.localtime(time.time())) #SQL command for checking the localtime sqlcommand = select (localtime() - time '%s' time '00:00:20') and (time '%s' - localtime() time '00:00:20'); % (currenttime, currenttime) -return clt.communicate(sqlcommand) - -def main(): -srv = server_start() -out, err = client('sql') - -sys.stdout.write(out) -sys.stderr.write(err) -out, err = srv.communicate() +out, err = clt.communicate(sqlcommand) sys.stdout.write(out) sys.stderr.write(err) diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out --- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out +++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out @@ -5,13 +5,7 @@ stdout of test 'currenttime.Bug-2781` in # 14:00:10 /usr/bin/python currenttime.Bug-2781.py currenttime.Bug-2781 # 14:00:10 -#select (localtime() - time '14:00:10' time '00:00:20') and (time '14:00:10' - localtime() time '00:00:20'); -% . # table_name -% sql_sub_localtime # name -% boolean # type -% 5 # length -[ true ] -# MonetDB 5 server v11.13.6 +# MonetDB 5 server v11.19.10 (hg id: 68ab398acb08) # This is an unreleased version # Serving database 'mTests_test_BugTracker-2012', using 8 threads # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked @@ -23,6 +17,9 @@ stdout of test 'currenttime.Bug-2781` in # MonetDB/GIS module loaded # MonetDB/JAQL module loaded # MonetDB/SQL module loaded +# MonetDB/R module loaded + +Ready. # SQL catalog created, loading sql scripts once # loading sql script: 09_like.sql # loading sql script: 10_math.sql @@ -47,7 +44,18 @@ stdout of test 'currenttime.Bug-2781` in # loading sql script: 80_udf.sql # loading sql script: 99_system.sql -# 14:00:10 -# 14:00:10 Done. -# 14:00:10 +# 09:58:27 +# 09:58:27 /usr/bin/python2 currenttime.Bug-2781.SQL.py currenttime.Bug-2781 +# 09:58:27 +#select (localtime() - time '09:58:27' time '00:00:20') and (time '09:58:27' - localtime() time '00:00:20'); +% .L # table_name +% sql_sub_localtime # name +% boolean # type +% 5 # length +[ true ] + +# 09:58:28 +# 09:58:28 Done. +# 09:58:28 + ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Merge with Oct2014 branch.
Changeset: 8add83d764f0 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8add83d764f0 Added Files: sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py Removed Files: sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py Modified Files: sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.stable.out Branch: default Log Message: Merge with Oct2014 branch. diffs (truncated from 586 to 300 lines): diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris +++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris @@ -67,7 +67,7 @@ stderr of test 'overflow.SF-2853458` in # 22:26:13 mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561 # 22:26:13 -MAPI = (monetdb) /var/tmp/mtest-9389/.s.monetdb.34946 +MAPI = (monetdb) /var/tmp/mtest-3249/.s.monetdb.34957 QUERY = select cast(power(2,64) as bigint); ERROR = !overflow in conversion of 1.8446744073709552e+19 to lng. diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py rename from sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py rename to sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py --- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.py +++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py @@ -4,31 +4,16 @@ try: except ImportError: import process -def server_start(): -sys.stderr.write('#mserver\n') -sys.stderr.flush() -srv = process.server(stdin = process.PIPE, - stdout = process.PIPE, stderr = process.PIPE) -return srv - -def client(lang, user = 'monetdb', passwd = 'monetdb'): +def main(): sys.stderr.write('#client\n') sys.stderr.flush() -clt = process.client(lang, user = user, passwd = passwd, +clt = process.client('sql', user = 'monetdb', passwd = 'monetdb', stdin = process.PIPE, stdout = process.PIPE, stderr = process.PIPE) currenttime = time.strftime('%H:%M:%S', time.localtime(time.time())) #SQL command for checking the localtime -sqlcommand = select (localtime() - time '%s' time '00:00:20') and (time '%s' - localtime() time '00:00:20'); % (currenttime, currenttime) -return clt.communicate(sqlcommand) - -def main(): -srv = server_start() -out, err = client('sql') - -sys.stdout.write(out) -sys.stderr.write(err) -out, err = srv.communicate() +sqlcommand = select localtime() between (time '%s' - interval '20' second) and (time '%s' + interval '20' second); % (currenttime, currenttime) +out, err = clt.communicate(sqlcommand) sys.stdout.write(out) sys.stderr.write(err) diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out --- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out +++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out @@ -5,13 +5,7 @@ stdout of test 'currenttime.Bug-2781` in # 14:00:10 /usr/bin/python currenttime.Bug-2781.py currenttime.Bug-2781 # 14:00:10 -#select (localtime() - time '14:00:10' time '00:00:20') and (time '14:00:10' - localtime() time '00:00:20'); -% . # table_name -% sql_sub_localtime # name -% boolean # type -% 5 # length -[ true ] -# MonetDB 5 server v11.13.6 +# MonetDB 5 server v11.19.10 (hg id: 68ab398acb08) # This is an unreleased version # Serving database 'mTests_test_BugTracker-2012', using 8 threads # Compiled for x86_64-unknown-linux-gnu/64bit with 64bit OIDs dynamically linked @@ -23,6 +17,9 @@ stdout of test 'currenttime.Bug-2781` in # MonetDB/GIS module loaded # MonetDB/JAQL module loaded # MonetDB/SQL module loaded +# MonetDB/R module loaded + +Ready. # SQL catalog created, loading sql scripts once # loading sql script: 09_like.sql # loading sql script: 10_math.sql @@ -46,7 +43,18 @@ stdout of test 'currenttime.Bug-2781` in # loading sql script: 80_udf.sql # loading sql script: 99_system.sql -# 14:00:10 -# 14:00:10 Done. -# 14:00:10 +# 09:58:27 +# 09:58:27 /usr/bin/python2 currenttime.Bug-2781.SQL.py currenttime.Bug-2781 +# 09:58:27 +#select (localtime() - time '09:58:27' time '00:00:20') and (time '09:58:27' - localtime() time '00:00:20'); +% .L # table_name +% and_=_localtime # name +% boolean # type +% 5 # length +[ true ] + +# 09:58:28 +# 09:58:28 Done. +# 09:58:28 + diff --git a/sql/test/BugTracker-2015/Tests/reserved_keywords.Bug-3613.sql
MonetDB: Oct2014 - Use BETWEEN and properly typed arguments in t...
Changeset: 5de6ae63e7a4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5de6ae63e7a4 Modified Files: sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out Branch: Oct2014 Log Message: Use BETWEEN and properly typed arguments in test. diffs (24 lines): diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py --- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py +++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.SQL.py @@ -12,7 +12,7 @@ def main(): stdout = process.PIPE, stderr = process.PIPE) currenttime = time.strftime('%H:%M:%S', time.localtime(time.time())) #SQL command for checking the localtime -sqlcommand = select (localtime() - time '%s' time '00:00:20') and (time '%s' - localtime() time '00:00:20'); % (currenttime, currenttime) +sqlcommand = select localtime() between (time '%s' - interval '20' second) and (time '%s' + interval '20' second); % (currenttime, currenttime) out, err = clt.communicate(sqlcommand) sys.stdout.write(out) sys.stderr.write(err) diff --git a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out --- a/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out +++ b/sql/test/BugTracker-2012/Tests/currenttime.Bug-2781.stable.out @@ -50,7 +50,7 @@ Ready. #select (localtime() - time '09:58:27' time '00:00:20') and (time '09:58:27' - localtime() time '00:00:20'); % .L # table_name -% sql_sub_localtime # name +% and_=_localtime # name % boolean # type % 5 # length [ true ] ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Oct2014 - Approve Solaris output.
Changeset: 1b648ac7342d for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1b648ac7342d Modified Files: sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.Solaris Branch: Oct2014 Log Message: Approve Solaris output. diffs (26 lines): diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris +++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.err.Solaris @@ -67,7 +67,7 @@ stderr of test 'overflow.SF-2853458` in # 22:26:13 mclient -lsql -umonetdb -Pmonetdb --host=alf --port=35561 # 22:26:13 -MAPI = (monetdb) /var/tmp/mtest-9389/.s.monetdb.34946 +MAPI = (monetdb) /var/tmp/mtest-3249/.s.monetdb.34957 QUERY = select cast(power(2,64) as bigint); ERROR = !overflow in conversion of 1.8446744073709552e+19 to lng. diff --git a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.Solaris b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.Solaris --- a/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.Solaris +++ b/sql/test/BugTracker-2009/Tests/overflow.SF-2853458.stable.out.Solaris @@ -25,8 +25,8 @@ Ready. # 22:26:13 #select cast(power(2,63) as bigint); -% . # table_name -% power_single_value # name +% .L1 # table_name +% L1 # name % bigint # type % 19 # length [ 9223372036854775807 ] ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Oct2014 - Add some final newlines.
Changeset: 5af76f2a3564 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5af76f2a3564 Modified Files: clients/R/MonetDB.R/man/mc.Rd clients/R/MonetDB.R/man/monetdbRtype.Rd sql/backends/monet5/Tests/rapi01.sql sql/backends/monet5/Tests/rapi04.sql sql/backends/monet5/Tests/rapi11.sql Branch: Oct2014 Log Message: Add some final newlines. diffs (50 lines): diff --git a/clients/R/MonetDB.R/man/mc.Rd b/clients/R/MonetDB.R/man/mc.Rd --- a/clients/R/MonetDB.R/man/mc.Rd +++ b/clients/R/MonetDB.R/man/mc.Rd @@ -33,4 +33,4 @@ mc(dbname=demo, user=monetdb, passwo \examples{ \dontrun{ con - mc(dbname=demo,hostname=localhost) -}} \ No newline at end of file +}} diff --git a/clients/R/MonetDB.R/man/monetdbRtype.Rd b/clients/R/MonetDB.R/man/monetdbRtype.Rd --- a/clients/R/MonetDB.R/man/monetdbRtype.Rd +++ b/clients/R/MonetDB.R/man/monetdbRtype.Rd @@ -16,4 +16,4 @@ \value{ String containing the R data type for the DB data type, e.g. \code{character} or \code{numeric}. -} \ No newline at end of file +} diff --git a/sql/backends/monet5/Tests/rapi01.sql b/sql/backends/monet5/Tests/rapi01.sql --- a/sql/backends/monet5/Tests/rapi01.sql +++ b/sql/backends/monet5/Tests/rapi01.sql @@ -7,4 +7,4 @@ language R { SELECT i,d FROM rapi01(42) AS R WHERE i40; DROP FUNCTION rapi01; -ROLLBACK; \ No newline at end of file +ROLLBACK; diff --git a/sql/backends/monet5/Tests/rapi04.sql b/sql/backends/monet5/Tests/rapi04.sql --- a/sql/backends/monet5/Tests/rapi04.sql +++ b/sql/backends/monet5/Tests/rapi04.sql @@ -17,4 +17,4 @@ SELECT * FROM ts WHERE moon(ts,52.3,4.8) DROP FUNCTION moon; DROP TABLE ts; -ROLLBACK; \ No newline at end of file +ROLLBACK; diff --git a/sql/backends/monet5/Tests/rapi11.sql b/sql/backends/monet5/Tests/rapi11.sql --- a/sql/backends/monet5/Tests/rapi11.sql +++ b/sql/backends/monet5/Tests/rapi11.sql @@ -36,4 +36,4 @@ SELECT rapi11f(geneid,patientid,expr_val DROP FUNCTION rapi11f; DROP TABLE rapi11t; -ROLLBACK; \ No newline at end of file +ROLLBACK; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - Add some casts.
Changeset: fc79f6e5dbac for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=fc79f6e5dbac Modified Files: gdk/gdk_search.c Branch: default Log Message: Add some casts. diffs (18 lines): diff --git a/gdk/gdk_search.c b/gdk/gdk_search.c --- a/gdk/gdk_search.c +++ b/gdk/gdk_search.c @@ -244,11 +244,11 @@ BATcheckhash(BAT *b) fstat(fd, st) == 0 st.st_size = (off_t) ((hdata[1] + hdata[2]) * hdata[3] + 5 * SIZEOF_SIZE_T) HEAPload(hp, nme, ext, 0) = 0) { - h-lim = hdata[1]; + h-lim = (BUN) hdata[1]; h-type = ATOMtype(b-ttype); - h-mask = hdata[2] - 1; + h-mask = (BUN) (hdata[2] - 1); h-heap = hp; - h-width = hdata[3]; + h-width = (int) hdata[3]; switch (h-width) { case BUN2: h-nil = (BUN) BUN2_NONE; ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: geo - Add an extra column to convert_matrix for the EC_...
Changeset: cca80fa262fd for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=cca80fa262fd Modified Files: sql/common/sql_types.c Branch: geo Log Message: Add an extra column to convert_matrix for the EC_GEOM value. diffs (44 lines): diff --git a/sql/common/sql_types.c b/sql/common/sql_types.c --- a/sql/common/sql_types.c +++ b/sql/common/sql_types.c @@ -90,23 +90,23 @@ int bits2digits(int bits) /* 3 casts are allowed (requires dynamic checks) (sofar not used) */ static int convert_matrix[EC_MAX][EC_MAX] = { -/* EC_ANY */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* NULL */ -/* EC_TABLE */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, -/* EC_BIT */ { 0, 0, 1, 1, 1, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0 }, -/* EC_CHAR */ { 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, -/* EC_STRING */{ 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, -/* EC_BLOB */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, -/* EC_POS */ { 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 }, -/* EC_NUM */ { 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0 }, -/* EC_MONTH*/ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0 }, -/* EC_SEC*/ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0 }, -/* EC_DEC */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0 }, -/* EC_FLT */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 3, 1, 1, 0, 0, 0, 0 }, -/* EC_TIME */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0 }, -/* EC_DATE */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0 }, -/* EC_TSTAMP */{ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0 }, -/* EC_GEOM */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0 }, -/* EC_EXTERNAL*/{ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +/* EC_ANY */ { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 }, /* NULL */ +/* EC_TABLE */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, +/* EC_BIT */ { 0, 0, 1, 1, 1, 0, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, +/* EC_CHAR */ { 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, +/* EC_STRING */{ 2, 2, 2, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2 }, +/* EC_BLOB */ { 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, +/* EC_POS */ { 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, +/* EC_NUM */ { 0, 0, 2, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, +/* EC_MONTH*/ { 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0 }, +/* EC_SEC*/ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 0 }, +/* EC_DEC */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0 }, +/* EC_FLT */ { 0, 0, 0, 1, 1, 0, 1, 1, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, +/* EC_TIME */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0 }, +/* EC_DATE */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0 }, +/* EC_TSTAMP */{ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0 }, +/* EC_GEOM */ { 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0 }, +/* EC_EXTERNAL*/{ 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; int sql_type_convert (int from, int to) ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: Oct2014 - Coverity-inspired changes.
Changeset: e9e22e3bcb5f for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e9e22e3bcb5f Modified Files: clients/mapilib/mapi.c clients/odbc/driver/SQLBrowseConnect.c clients/odbc/driver/SQLGetDescField.c clients/odbc/driver/SQLGetInfo.c clients/odbc/driver/SQLGetStmtAttr.c gdk/gdk_bbp.c gdk/gdk_storage.c Branch: Oct2014 Log Message: Coverity-inspired changes. All but one were false positives. :-( diffs (240 lines): diff --git a/clients/mapilib/mapi.c b/clients/mapilib/mapi.c --- a/clients/mapilib/mapi.c +++ b/clients/mapilib/mapi.c @@ -4289,8 +4289,11 @@ mapi_query_part(MapiHdl hdl, const char char *q; if (sz 512 - (q = realloc(hdl-query, sz + size + 1)) != NULL) - hdl-query = strncat(q, query, size); + (q = realloc(hdl-query, sz + size + 1)) != NULL) { + strncpy(q + sz, query, size); + q[sz + size] = 0; + hdl-query = q; + } } if (mid-trace == MAPI_TRACE) { diff --git a/clients/odbc/driver/SQLBrowseConnect.c b/clients/odbc/driver/SQLBrowseConnect.c --- a/clients/odbc/driver/SQLBrowseConnect.c +++ b/clients/odbc/driver/SQLBrowseConnect.c @@ -66,8 +66,10 @@ MNDBBrowseConnect(ODBCDbc *dbc, SQLSMALLINT len = 0; char buf[256]; int n; + SQLRETURN rc; +#ifdef ODBCDEBUG int allocated = 0; - SQLRETURN rc; +#endif fixODBCstring(InConnectionString, StringLength1, SQLSMALLINT, addDbcError, dbc, return SQL_ERROR); @@ -82,32 +84,37 @@ MNDBBrowseConnect(ODBCDbc *dbc, return SQL_ERROR; } - dsn = dbc-dsn; - uid = dbc-uid; - pwd = dbc-pwd; - host = dbc-host; + dsn = dbc-dsn ? strdup(dbc-dsn) : NULL; + uid = dbc-uid ? strdup(dbc-uid) : NULL; + pwd = dbc-pwd ? strdup(dbc-pwd) : NULL; + host = dbc-host ? strdup(dbc-host) : NULL; port = dbc-port; - dbname = dbc-dbname; + dbname = dbc-dbname ? strdup(dbc-dbname) : NULL; while ((n = ODBCGetKeyAttr(InConnectionString, StringLength1, key, attr)) 0) { if (strcasecmp(key, dsn) == 0 dsn == NULL) { + if (dsn) + free(dsn); dsn = attr; - allocated |= 1; } else if (strcasecmp(key, uid) == 0 uid == NULL) { + if (uid) + free(uid); uid = attr; - allocated |= 2; } else if (strcasecmp(key, pwd) == 0 pwd == NULL) { + if (pwd) + free(pwd); pwd = attr; - allocated |= 4; } else if (strcasecmp(key, host) == 0 host == NULL) { + if (host) + free(host); host = attr; - allocated |= 8; } else if (strcasecmp(key, port) == 0 port == 0) { port = atoi(attr); free(attr); } else if (strcasecmp(key, database) == 0 dbname == NULL) { + if (dbname) + free(dbname); dbname = attr; - allocated |= 16; #ifdef ODBCDEBUG } else if (strcasecmp(key, logfile) == 0 getenv(ODBCDEBUG) == NULL) { @@ -115,7 +122,7 @@ MNDBBrowseConnect(ODBCDbc *dbc, if (ODBCdebug) free((void *) ODBCdebug); /* discard const */ ODBCdebug = attr; - allocated |= 32; + allocated = 1; #endif } else free(attr); @@ -131,7 +138,6 @@ MNDBBrowseConnect(ODBCDbc *dbc, uid = strdup(buf); if (uid == NULL) goto nomem; - allocated |= 2; } } if (pwd == NULL) { @@ -140,7 +146,6 @@ MNDBBrowseConnect(ODBCDbc *dbc, pwd = strdup(buf); if (pwd == NULL) goto nomem; - allocated |= 4; } } if (host == NULL) { @@ -149,7 +154,6 @@ MNDBBrowseConnect(ODBCDbc *dbc, host = strdup(buf); if (host == NULL) goto nomem; - allocated |= 8; } } if (port == 0) { @@
MonetDB: default - approved output
Changeset: 20ccf1982260 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=20ccf1982260 Modified Files: sql/test/BugTracker-2014/Tests/python-microseconds.Bug-3439.stable.out Branch: default Log Message: approved output diffs (12 lines): diff --git a/sql/test/BugTracker-2014/Tests/python-microseconds.Bug-3439.stable.out b/sql/test/BugTracker-2014/Tests/python-microseconds.Bug-3439.stable.out --- a/sql/test/BugTracker-2014/Tests/python-microseconds.Bug-3439.stable.out +++ b/sql/test/BugTracker-2014/Tests/python-microseconds.Bug-3439.stable.out @@ -55,7 +55,7 @@ Ready. [(datetime.datetime(2014, 4, 24, 19, 12, 12, 415000),)] [(datetime.date(2014, 4, 24),)] [(datetime.time(17, 12, 12),)] -[(datetime.time(17, 12, 12),)] +[(datetime.time(19, 12, 12),)] # 17:15:02 # 17:15:02 Done. ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - approved output
Changeset: ff3e80f0202c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ff3e80f0202c Modified Files: clients/Tests/exports.stable.out Branch: default Log Message: approved output diffs (21 lines): diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -2225,7 +2225,7 @@ void freeSymbolList(Symbol s); void freeVariable(MalBlkPtr mb, int varid); str fstrcmp0_impl(dbl *ret, str *string1, str *string2); str fstrcmp_impl(dbl *ret, str *string1, str *string2, dbl *minimum); -str function2str(MalBlkPtr mb, int flg); +str function2str(MalBlkPtr mb); void garbageCollector(Client cntxt, MalBlkPtr mb, MalStkPtr stk, int flag); void garbageElement(Client cntxt, ValPtr v); str generatorRef; @@ -2385,7 +2385,7 @@ int logger_exit_wrap(logger *L); int logger_find_bat_wrap(int *bid, logger *L, str nme); int logger_restart_wrap(logger *L); str lookupRef; -str mal2str(MalBlkPtr mb, int flg, int first, int last); +str mal2str(MalBlkPtr mb, int first, int last); malType malAnyBatType(malType t1, malType t2); int malAtomSize(int size, int align, char *name); int malBootstrap(void); ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
MonetDB: default - removed no longer used macro
Changeset: 6817dd7c1dd1 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6817dd7c1dd1 Modified Files: sql/include/sql_catalog.h Branch: default Log Message: removed no longer used macro diffs (11 lines): diff --git a/sql/include/sql_catalog.h b/sql/include/sql_catalog.h --- a/sql/include/sql_catalog.h +++ b/sql/include/sql_catalog.h @@ -353,7 +353,6 @@ typedef enum idx_type { } idx_type; #define hash_index(t) (t == hash_idx || t == oph_idx ) -#define idx_is_column(t) (hash_index(t) || t == join_idx || t == no_idx) #define idx_has_column(t) (hash_index(t) || t == join_idx) typedef struct sql_idx { ___ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list