Date: Tuesday, February 21, 2006 @ 14:09:22
  Author: zsolt
    Path: /cvsroot/carob/libmysequoia/src

Modified: CarobStmt.cpp (1.23 -> 1.24)

If the connection is not established prepare() will set an error command out of 
sync.


---------------+
 CarobStmt.cpp |    7 +++++++
 1 files changed, 7 insertions(+)


Index: libmysequoia/src/CarobStmt.cpp
diff -u libmysequoia/src/CarobStmt.cpp:1.23 libmysequoia/src/CarobStmt.cpp:1.24
--- libmysequoia/src/CarobStmt.cpp:1.23 Tue Feb 21 11:04:24 2006
+++ libmysequoia/src/CarobStmt.cpp      Tue Feb 21 14:09:22 2006
@@ -77,6 +77,13 @@
 {
   LOG4CXX_DEBUG(logger, "Entering prepare: query=" << query << " length=" << 
length);
 
+  if (!cmysql->connectionPtr)
+  {
+    set_error(CR_COMMANDS_OUT_OF_SYNC, SQLT_UNKNOWN);
+    LOG4CXX_DEBUG(logger, "Leaving prepare: result=1");
+    return 1;
+  }
+
   int result = 0;
   
   clear();

_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits

Reply via email to