Date: Friday, December 9, 2005 @ 11:59:26
Author: csaba
Path: /cvsroot/carob/libmysequoia/src
Modified: MySQLAPI.cpp (1.8 -> 1.9)
Commented the difference from the MySQL API of the following functions:
- mysql_init()
- mysql_close()
- mysql_real_connect()
--------------+
MySQLAPI.cpp | 27 +++++++++++++++++++++++----
1 files changed, 23 insertions(+), 4 deletions(-)
Index: libmysequoia/src/MySQLAPI.cpp
diff -u libmysequoia/src/MySQLAPI.cpp:1.8 libmysequoia/src/MySQLAPI.cpp:1.9
--- libmysequoia/src/MySQLAPI.cpp:1.8 Thu Dec 8 14:36:48 2005
+++ libmysequoia/src/MySQLAPI.cpp Fri Dec 9 11:59:26 2005
@@ -31,7 +31,13 @@
/* Library initialization, shutdown */
-/* Gets or initializes a MYSQL structure. */
+/**
+ * Gets or initializes a MYSQL structure.
+ * Difference from the MySQL API:
+ * - we expect NULL for the argument
+ * - otherwise bad things happen (the user
+ * doesn't allocate the carob object)
+ */
MYSQL *STDCALL
mysql_init (MYSQL * mysql)
{
@@ -43,10 +49,16 @@
else
return 0;
}
- return mysql;
+ return mysql;
}
-/* Closes a server connection. */
+/**
+ * Closes a server connection.
+ * Difference from the MYSQL API:
+ * - if mysql_init() was called with !NULL value
+ * the carob object does not exist, probably
+ * segfault
+ */
void STDCALL
mysql_close (MYSQL * mysql)
{
@@ -82,7 +94,14 @@
return 0;
}
-/* Connects to a MySQL server. */
+/**
+ * Connects to a MySQL server.
+ * Difference from the MySQL API:
+ * - unix_socket is ignored
+ * - TODO clientflag is not handled
+ * - if no DB is specified the real connection will be postponed
+ * until mysql_select_db() or mysql_change_user()
+ */
MYSQL *STDCALL
mysql_real_connect (MYSQL * mysql, const char *host, const char *user,
const char *passwd, const char *db, unsigned int port,
_______________________________________________
Carob-commits mailing list
[email protected]
https://forge.continuent.org/mailman/listinfo/carob-commits