[prev in list] [next in list] [prev in thread] [next in thread]
List: pecl-cvs
Subject: [PECL-CVS] =?utf-8?q?svn:_/pecl/mysqlnd=5Fms/trunk/_mysqlnd=5Fms=5Ffilter=5Fqos.c?=
From: Ulf_Wendel <uw () php ! net>
Date: 2011-11-29 15:21:44
Message-ID: svn-uw-1322580104-320162-843345740 () svn ! php ! net
[Download RAW message or body]
uw Tue, 29 Nov 2011 15:21:44 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=320162
Log:
Handle lazy connections. Does the CONN_QUIT_SENT test make any sense, Andrey? Please \
review and fix my code.
Changed paths:
U pecl/mysqlnd_ms/trunk/mysqlnd_ms_filter_qos.c
Modified: pecl/mysqlnd_ms/trunk/mysqlnd_ms_filter_qos.c
===================================================================
--- pecl/mysqlnd_ms/trunk/mysqlnd_ms_filter_qos.c 2011-11-29 14:51:15 UTC (rev \
320161)
+++ pecl/mysqlnd_ms/trunk/mysqlnd_ms_filter_qos.c 2011-11-29 15:21:44 UTC (rev \
320162) @@ -57,6 +57,9 @@
}
(*conn_data)->skip_ms_calls = FALSE;
+ if (res) {
+ res->m.free_result(res, FALSE TSRMLS_CC);
+ }
DBG_RETURN(ret);
}
@@ -105,7 +108,11 @@
if (element->conn) {
connection = element->conn;
MS_LOAD_CONN_DATA(conn_data, connection);
- if (conn_data && (*conn_data) && (*conn_data)->global_trx.check_for_gtid) {
+ if (conn_data && (*conn_data) && (*conn_data)->global_trx.check_for_gtid &&
+ (CONN_GET_STATE(connection) != CONN_QUIT_SENT) &&
+ ((CONN_GET_STATE(connection) > CONN_ALLOCED) || (PASS == \
mysqlnd_ms_lazy_connect(element, TRUE TSRMLS_CC)))) + {
+
smart_str sql = {0};
char * pos;
char buf[32];
@@ -114,6 +121,7 @@
DBG_INF_FMT("Checking slave connection "MYSQLND_LLU_SPEC"", \
connection->thread_id);
/* FIXME */
+ /* TODO: bubble up error, if any, to user's connection */
pos = strstr((*conn_data)->global_trx.check_for_gtid, "#GTID");
if (pos) {
smart_str_appendl(&sql, (*conn_data)->global_trx.check_for_gtid, pos - \
((*conn_data)->global_trx.check_for_gtid)); @@ -125,7 +133,6 @@
}
smart_str_free(&sql);
}
-
}
}
i++;
--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic