On Thursday 24 May 2007, SourceForge.net wrote: > Bugs item #1618322, was opened at 2006-12-18 20:17 > Message generated for change (Comment added) made by mellen > You can respond by visiting: > https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1618322&group_ >id=139143 > ---------------------------------------------------------------------- > > Comment By: Tais M. Hansen (mellen) > Date: 2007-05-24 14:26 > > Message: > Logged In: YES > user_id=382592 > Originator: NO > > I have a new patch for this issue based on the original patch but checking > to make sure it's only used on mysql-4.1 or newer. I can't seem to attach > it to this bug report though? > > > ----------------------------------------------------------------------
I'll just attach it here instead... -- Regards, Tais M. Hansen Change Networks ___________________________________________________________ http://www.linkedin.com/in/thansen
Index: modules/mysql/dbase.c
===================================================================
--- modules/mysql/dbase.c (revision 121)
+++ modules/mysql/dbase.c (working copy)
@@ -26,14 +26,15 @@
#include <string.h>
#include <stdlib.h>
#include <time.h>
-#include <mysql/mysql.h>
-#include <mysql/errmsg.h>
+#include "mysql.h"
+#include "errmsg.h"
+#include "my_con.h"
+#include "mysql_version.h"
#include "../../mem/mem.h"
#include "../../dprint.h"
#include "../../db/db_pool.h"
#include "utils.h"
#include "val.h"
-#include "my_con.h"
#include "res.h"
#include "row.h"
#include "db_mod.h"
@@ -352,6 +353,13 @@
return -4;
}
+#if (MYSQL_VERSION_ID >= 40100)
+ while( mysql_next_result( CON_CONNECTION(_h) ) > 0 ) {
+ MYSQL_RES *res = mysql_store_result( CON_CONNECTION(_h) );
+ mysql_free_result( res );
+ }
+#endif
+
return 0;
}
Index: modules/mysql/my_con.c
===================================================================
--- modules/mysql/my_con.c (revision 122)
+++ modules/mysql/my_con.c (working copy)
@@ -21,6 +21,7 @@
*/
#include "my_con.h"
+#include "mysql_version.h"
#include "../../mem/mem.h"
#include "../../dprint.h"
#include "../../ut.h"
@@ -76,7 +77,11 @@
);
}
+#if (MYSQL_VERSION_ID >= 40100)
+ if (!mysql_real_connect(ptr->con, id->host, id->username, id->password, id->database, id->port, 0, CLIENT_MULTI_STATEMENTS)) {
+#else
if (!mysql_real_connect(ptr->con, id->host, id->username, id->password, id->database, id->port, 0, 0)) {
+#endif
LOG(L_ERR, "new_connection: %s\n", mysql_error(ptr->con));
mysql_close(ptr->con);
goto err;
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Devel mailing list [email protected] http://openser.org/cgi-bin/mailman/listinfo/devel
