Date: Tuesday, April 11, 2006 @ 11:06:44
Author: csaba
Path: /cvsroot/carob/libmysequoia/src
Modified: CarobMySQL.cpp (1.70 -> 1.71)
Send "use db_name" query in mysql_select_db().
----------------+
CarobMySQL.cpp | 10 ++++++++++
1 files changed, 10 insertions(+)
Index: libmysequoia/src/CarobMySQL.cpp
diff -u libmysequoia/src/CarobMySQL.cpp:1.70
libmysequoia/src/CarobMySQL.cpp:1.71
--- libmysequoia/src/CarobMySQL.cpp:1.70 Wed Apr 5 09:28:27 2006
+++ libmysequoia/src/CarobMySQL.cpp Tue Apr 11 11:06:44 2006
@@ -259,7 +259,17 @@
/* Connect only if a user, password and host was already specified,
otherwise raise an error */
if (mysqlPtr->user && mysqlPtr->passwd && mysqlPtr->host)
+ {
result = connect(mysqlPtr->host, mysqlPtr->user, mysqlPtr->passwd, db,
mysqlPtr->port, 0, mysqlPtr->client_flag);
+
+ if (result)
+ {
+ char buff[120];
+
+ snprintf(buff, sizeof(buff), "use %s", db);
+ result = real_query(buff, strlen(buff), false);
+ }
+ }
else
{
set_error(CR_NULL_POINTER, SQLT_UNKNOWN);
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits