Changeset: 579d80b75012 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=579d80b75012 Modified Files: sql/backends/monet5/sql_scenario.c Branch: malerrors Log Message:
Patching the lower errors to comply for SQL. diffs (25 lines): diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -1240,5 +1240,21 @@ SQLCacheRemove(Client c, str nme) str SQLcallback(Client c, str msg){ + if(msg && (strstr(msg, "MALexception") || strstr(msg,"GDKexception"))) { + // massage the error to comply with SQL + char *s; + s= strchr(msg,(int)':'); + if (s ) + s= strchr(msg,(int)':'); + if( s){ + char newerr[1024]; + s++; + strncpy(newerr, msg, s - msg); + newerr[s-msg] = 0; + snprintf(newerr + (s-msg), 1024 -(s-msg), "SQLSTATE HY020 !%s",s); + GDKfree(msg); + msg = GDKstrdup(newerr); + } + } return MALcallback(c,msg); } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list