Update of /cvsroot/monetdb/sql/src/backends/monet5/merovingian
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6150

Modified Files:
        merovingian_controlrunner.c 
Log Message:
be a bit more diagnostic

U merovingian_controlrunner.c
Index: merovingian_controlrunner.c
===================================================================
RCS file: 
/cvsroot/monetdb/sql/src/backends/monet5/merovingian/merovingian_controlrunner.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- merovingian_controlrunner.c 20 Aug 2009 16:13:51 -0000      1.2
+++ merovingian_controlrunner.c 20 Aug 2009 16:23:19 -0000      1.3
@@ -165,9 +165,31 @@
                                        }
                                        pthread_mutex_unlock(&_mero_topdp_lock);
                                } else if (strcmp(p, "create") == 0) {
-                                       db_create(q);
+                                       err e = db_create(q);
+                                       if (e != NO_ERR) {
+                                               Mfprintf(stderr, "failed to 
create "
+                                                               "database '%s': 
%s\n", q, getErrMsg(e));
+                                               len = snprintf(buf2, 
sizeof(buf2),
+                                                               "create: %s\n", 
getErrMsg(e));
+                                               send(msgsock, buf2, len, 0);
+                                               freeErr(e);
+                                       } else {
+                                               len = snprintf(buf2, 
sizeof(buf2), "OK\n");
+                                               send(msgsock, buf2, len, 0);
+                                       }
                                } else if (strcmp(p, "destroy") == 0) {
-                                       db_destroy(q);
+                                       err e = db_destroy(q);
+                                       if (e != NO_ERR) {
+                                               Mfprintf(stderr, "failed to 
destroy "
+                                                               "database '%s': 
%s\n", q, getErrMsg(e));
+                                               len = snprintf(buf2, 
sizeof(buf2),
+                                                               "destroy: 
%s\n", getErrMsg(e));
+                                               send(msgsock, buf2, len, 0);
+                                               freeErr(e);
+                                       } else {
+                                               len = snprintf(buf2, 
sizeof(buf2), "OK\n");
+                                               send(msgsock, buf2, len, 0);
+                                       }
                                } else if (strncmp(p, "share=", 
strlen("share=")) == 0) {
                                        sabdb *stats;
                                        sabdb *topdb;


------------------------------------------------------------------------------
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

Reply via email to