Update of /cvsroot/monetdb/sql/src/backends/monet5
In directory 
sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv4218/src/backends/monet5

Modified Files:
        sql_result.mx 
Log Message:
propagated changes of Sunday Apr 25 2010
from the Feb2010 branch to the development trunk

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2010/04/25 - nielsnes: src/backends/monet5/sql_result.mx,1.134.2.2
  passing error's from tablet via mvc structure into sql layer
  approving related tests
  
  added test for problem overflow error not reported on client (only dumped
  on server)
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: sql_result.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/backends/monet5/sql_result.mx,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -d -r1.135 -r1.136
--- sql_result.mx       18 Jan 2010 13:35:38 -0000      1.135
+++ sql_result.mx       25 Apr 2010 20:59:14 -0000      1.136
@@ -27,6 +27,7 @@
 #include <sql_mvc.h>
 #include <sql_catalog.h>
 #include <sql_qc.h>
+#include <sql_parser.h>                /* sql_error */
 #include "mal_client.h"
 
 extern int mvc_export_affrows(mvc *m, stream *s, lng val, str w);
@@ -429,24 +430,22 @@
        Column *fmt;
 
        if (!t) {
-               showException(SQL,"sql", "table %s not found", tname);
+               sql_error(m, 500, "table %s not found", tname);
                m->type = -1;
                return NULL;
        }
        if (!bs) {
-               showException(IO,"sql", "no stream (pointer) provided");
-
+               sql_error(m, 500, "no stream (pointer) provided");
                m->type = -1;
                return NULL;
        }
        if (stream_errnr(bs->s)) {
-               showException(IO,"sql", "stream not open %d", 
stream_errnr(bs->s));
-
+               sql_error(m, 500, "stream not open %d", stream_errnr(bs->s));
                m->type = -1;
                return NULL;
        }
        if (offset < 0 || offset > (lng) BUN_MAX) {
-               showException(SQL,"sql","offset out of range");
+               sql_error(m, 500, "offset out of range");
                m->type = -1;
                return NULL;
        }
@@ -501,8 +500,8 @@
                        if (SQLload_file(cntxt, &as, bs, out, sep, rsep, 
ssep?ssep[0]:0, offset, sz) != BUN_NONE && !as.error)
                                bats = TABLETcollect_bats(&as);
                }
-               if (as.error)
-                       showException(SQL, "sql", as.error);
+               if (as.error) 
+                       sql_error(m, 500, "%s", as.error);
                TABLETdestroy_format(&as);
        }
        return bats;


------------------------------------------------------------------------------
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to