1
0
mirror of https://github.com/anope/anope.git synced 2026-06-30 22:06:38 +02:00

BUILD : 1.7.15 (1150) BUGS : 595 NOTES : Fixed MySQL making a new connection for each query (bit TOO enthousiastic?)

git-svn-id: svn://svn.anope.org/anope/trunk@1150 31f1291d-b8d6-0310-a050-a5561fc1590b


git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@873 5417fbe8-f217-4b02-8779-1006273d7864
This commit is contained in:
geniusdex geniusdex@31f1291d-b8d6-0310-a050-a5561fc1590b
2006-09-10 17:10:24 +00:00
parent 517b4b0629
commit afb6d55cc0
3 changed files with 19 additions and 3 deletions
+1
View File
@@ -8,6 +8,7 @@ Provided by Anope Dev. <dev@anope.org> - 2006
09/10 F Issues with make strict for the src/tools dir. [#579]
09/10 F Help for NickServ SET AUTOOP was missing. [#587]
09/10 F Added HOP to the /CS ACCESS error when XOP is enabled. [#598]
09/10 F MySQL no longer connects again on each query. [#595]
Provided by Trystan <trystan@nomadirc.net> - 2006
08/20 F Fixed several compiler warnings. [#586]
+13 -2
View File
@@ -22,6 +22,8 @@ MYSQL_RES *mysql_res; /* MySQL Result */
MYSQL_FIELD *mysql_fields; /* MySQL Fields */
MYSQL_ROW mysql_row; /* MySQL Row */
int mysql_is_connected = 0; /* Are we currently connected? */
/*************************************************************************/
void db_mysql_error(int severity, char *msg)
@@ -87,7 +89,11 @@ int db_mysql_open()
/* If MySQL is disabled, return 0 */
if (!do_mysql)
return 0;
/* If we're already connected, return 1 */
if (mysql_is_connected)
return 1;
mysql = mysql_init(NULL);
if (mysql == NULL)
db_mysql_error(MYSQL_WARNING, "Unable to create mysql object");
@@ -112,7 +118,9 @@ int db_mysql_open()
return 0;
}
}
mysql_is_connected = 1;
return 1;
}
@@ -190,6 +198,9 @@ int db_mysql_close()
if (mysql_res)
mysql_free_result(mysql_res);
mysql_close(mysql);
mysql_is_connected = 0;
return 1;
}
+5 -1
View File
@@ -9,10 +9,14 @@ VERSION_MAJOR="1"
VERSION_MINOR="7"
VERSION_PATCH="15"
VERSION_EXTRA="-svn"
VERSION_BUILD="1149"
VERSION_BUILD="1150"
# $Log$
#
# BUILD : 1.7.15 (1150)
# BUGS : 595
# NOTES : Fixed MySQL making a new connection for each query (bit TOO enthousiastic?)
#
# BUILD : 1.7.15 (1149)
# BUGS : 598
# NOTES : Added HOP to the list of XOP commands in the error from ChanServ ACCESS when XOP is enabled on supported ircds (and that line is too long!)