Changeset: 4110d59d15bd for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4110d59d15bd Modified Files: clients/mapiclient/mclient.c monetdb5/modules/mal/pcre.c sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql Branch: default Log Message:
Merged from Aug2011 diffs (142 lines): diff --git a/clients/ChangeLog.Aug2011 b/clients/ChangeLog.Aug2011 --- a/clients/ChangeLog.Aug2011 +++ b/clients/ChangeLog.Aug2011 @@ -1,6 +1,10 @@ # ChangeLog file for clients # This file is updated with Maddlog +* Fri Aug 26 2011 Fabian Groffen <[email protected]> +- Made error messages from the server in mclient go to stderr, instead + of stdout. + * Thu Aug 18 2011 Sjoerd Mullender <[email protected]> - Implemented SQL_ATTR_METADATA_ID attribute. The attribute is used in SQLColumns, SQLProcedures, and SQLTablePrivileges. diff --git a/clients/mapiclient/mclient.c b/clients/mapiclient/mclient.c --- a/clients/mapiclient/mclient.c +++ b/clients/mapiclient/mclient.c @@ -1373,8 +1373,9 @@ format_result(Mapi mid, MapiHdl hdl, cha do { /* handle errors first */ if ((reply = mapi_result_error(hdl)) != NULL) { + mnstr_flush(toConsole); if (formatter == TABLEformatter) { - mnstr_printf(toConsole, "%s", reply); + fprintf(stderr, "%s", reply); } else { mapi_explain_result(hdl, stderr); } diff --git a/clients/odbc/samples/odbcsample1.c b/clients/odbc/samples/odbcsample1.c --- a/clients/odbc/samples/odbcsample1.c +++ b/clients/odbc/samples/odbcsample1.c @@ -18,6 +18,9 @@ */ #ifdef _MSC_VER +/* suppress deprecation warning for snprintf */ +#define _CRT_SECURE_NO_WARNINGS + #include <WTypes.h> #endif #include <stdio.h> diff --git a/gdk/gdk_storage.c b/gdk/gdk_storage.c --- a/gdk/gdk_storage.c +++ b/gdk/gdk_storage.c @@ -91,6 +91,11 @@ GDKcreatedir(const char *dir) GDKcreatedir(path); ret = mkdir(path, 0755); IODEBUG THRprintf(GDKout, "#mkdir %s = %d\n", path, ret); + if (ret < 0 && (dirp = opendir(path)) != NULL) { + /* resolve race */ + ret = 0; + closedir(dirp); + } } *r = DIR_SEP; } diff --git a/monetdb5/modules/mal/pcre.c b/monetdb5/modules/mal/pcre.c --- a/monetdb5/modules/mal/pcre.c +++ b/monetdb5/modules/mal/pcre.c @@ -319,8 +319,11 @@ my_pcre_malloc(size_t s) static void my_pcre_free(void *blk) { - size_t *sz = (size_t *) blk; + size_t *sz; + if (blk == NULL) + return; + sz = (size_t *) blk; sz -= 1; GDKfree(sz); } diff --git a/sql/jdbc/tests/Tests/Test_PSlargeamount.timeout b/sql/jdbc/tests/Tests/Test_PSlargeamount.timeout --- a/sql/jdbc/tests/Tests/Test_PSlargeamount.timeout +++ b/sql/jdbc/tests/Tests/Test_PSlargeamount.timeout @@ -1,1 +1,1 @@ -8 +9 diff --git a/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql b/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql --- a/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql +++ b/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.sql @@ -59,19 +59,23 @@ create function GetTrace() TRACE select x,y from slice_test limit 1; -- When mitosis was activated (i.e., the MAL plan contains mat.*() statements, --- then there sould also be at least one mat.slice() statement. +-- then there sould also be at least one mat.slice() (or mat.pack()) statement. +WITH TheTrace AS ( SELECT * FROM GetTrace() ) SELECT count(*) FROM -( SELECT count(*) AS mat FROM GetTrace() WHERE stmt LIKE '% := mat.%' ) as m, -( SELECT count(*) AS mat_slice FROM GetTrace() WHERE stmt LIKE '% := mat.slice(%' ) as ms -WHERE ( mat = 0 AND mat_slice = 0 ) OR ( mat > 0 AND mat_slice > 0 ); +( SELECT count(*) AS mat FROM TheTrace WHERE stmt LIKE '% := mat.%' ) as m, +( SELECT count(*) AS mat_slice FROM TheTrace WHERE stmt LIKE '% := mat.slice(%' ) as ms, +( SELECT count(*) AS mat_pack FROM TheTrace WHERE stmt LIKE '% := mat.pack(%' ) as mp +WHERE ( mat = 0 AND mat_slice+mat_pack = 0 ) OR ( mat > 0 AND mat_slice+mat_pack > 0 ); TRACE select cast(x as string)||'-bla-'||cast(y as string) from slice_test limit 1; -- When mitosis was activated (i.e., the MAL plan contains mat.*() statements, --- then there sould also be at least one mat.slice() statement. +-- then there sould also be at least one mat.slice() (or mat.pack()) statement. +WITH TheTrace AS ( SELECT * FROM GetTrace() ) SELECT count(*) FROM -( SELECT count(*) AS mat FROM GetTrace() WHERE stmt LIKE '% := mat.%' ) as m, -( SELECT count(*) AS mat_slice FROM GetTrace() WHERE stmt LIKE '% := mat.slice(%' ) as ms -WHERE ( mat = 0 AND mat_slice = 0 ) OR ( mat > 0 AND mat_slice > 0 ); +( SELECT count(*) AS mat FROM TheTrace WHERE stmt LIKE '% := mat.%' ) as m, +( SELECT count(*) AS mat_slice FROM TheTrace WHERE stmt LIKE '% := mat.slice(%' ) as ms, +( SELECT count(*) AS mat_pack FROM TheTrace WHERE stmt LIKE '% := mat.pack(%' ) as mp +WHERE ( mat = 0 AND mat_slice+mat_pack = 0 ) OR ( mat > 0 AND mat_slice+mat_pack > 0 ); drop function GetTrace; diff --git a/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out b/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out --- a/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out +++ b/sql/test/BugTracker-2010/Tests/mat.slice_limit1.Bug-2645.stable.out @@ -109,10 +109,10 @@ Over.. #( SELECT count(*) AS mat_slice FROM GetTrace() WHERE stmt LIKE '% := mat.slice(%' ) as ms #WHERE ( mat = 0 AND mat_slice = 0 ) OR ( mat > 0 AND mat_slice > 0 ); % .m # table_name -% L6 # name +% L7 # name % wrd # type % 1 # length -[ 0 ] +[ 1 ] #TRACE select cast(x as string)||'-bla-'||cast(y as string) from slice_test limit 1; % sys. # table_name % concat_concat_x # name @@ -124,10 +124,10 @@ Over.. #( SELECT count(*) AS mat_slice FROM GetTrace() WHERE stmt LIKE '% := mat.slice(%' ) as ms #WHERE ( mat = 0 AND mat_slice = 0 ) OR ( mat > 0 AND mat_slice > 0 ); % .m # table_name -% L6 # name +% L7 # name % wrd # type % 1 # length -[ 0 ] +[ 1 ] #drop function GetTrace; #drop table slice_test; _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
