Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory
sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv19446/src/backends/monet5
Modified Files:
sql_gencode.mx sql_scenario.mx
Log Message:
more protection against to deep recursion
Index: sql_scenario.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_scenario.mx,v
retrieving revision 1.366
retrieving revision 1.367
diff -u -d -r1.366 -r1.367
--- sql_scenario.mx 28 Nov 2009 19:56:30 -0000 1.366
+++ sql_scenario.mx 29 Nov 2009 14:22:21 -0000 1.367
@@ -527,6 +527,7 @@
static str
SQLstatementIntern(Client c, str *expr, str nme, int execute, bit output)
{
+ int pstatus = 0;
int err = 0;
mvc *o, *m;
int ac, sizevars, topvars;
@@ -551,6 +552,7 @@
m = sql->mvc;
ac = m->session->auto_commit;
SQLtrans(m);
+ pstatus = m->session->status;
if (!m->sa)
m->sa = sa_create();
@@ -613,12 +615,8 @@
MSinitClientPrg(c,"user",nme);
if (!s && (err = mvc_status(m))) {
- stream_printf(c->fdout, "%s\n", m->errstr);
- if( m->errstr)
- msg = createException(PARSE, "SQLparser", "%s",
m->errstr);
- else
- msg = createException(PARSE, "SQLparser",
"Semantic errors");
- *m->errstr = 0;
+ msg = createException(PARSE, "SQLparser", "%s",
m->errstr);
+ handle_error(m, c->fdout, pstatus);
sqlcleanup(m, err);
/* restore the state */
freeSymbol(c->curprg);
Index: sql_gencode.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_gencode.mx,v
retrieving revision 1.343
retrieving revision 1.344
diff -u -d -r1.343 -r1.344
--- sql_gencode.mx 29 Nov 2009 09:32:22 -0000 1.343
+++ sql_gencode.mx 29 Nov 2009 14:22:21 -0000 1.344
@@ -550,7 +550,9 @@
/* FIXME: this needs a proper solution, but at least this avoids
* crashing, which is just a wee bit better */
showException(SQL, "sql", "too many nested operators");
- return(0);
+ if (sql->client->exception_buf)
+ longjmp(*sql->client->exception_buf, -1);
+ assert(0);
}
if (s) {
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins