[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=5Ftable=5Fpartition.c?=
From: Ulf_Wendel <uw () php ! net>
Date: 2011-07-29 15:05:26
Message-ID: svn-uw-1311951926-313931-2054288416 () svn ! php ! net
[Download RAW message or body]
uw Fri, 29 Jul 2011 15:05:26 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=313931
Log:
Adding a break to the case sections for filter rules. Andrey should be able to decode \
the picture..., I hope, he is.
Changed paths:
U pecl/mysqlnd_ms/trunk/mysqlnd_ms_filter_table_partition.c
Modified: pecl/mysqlnd_ms/trunk/mysqlnd_ms_filter_table_partition.c
===================================================================
--- pecl/mysqlnd_ms/trunk/mysqlnd_ms_filter_table_partition.c 2011-07-29 15:03:51 UTC \
(rev 313930)
+++ pecl/mysqlnd_ms/trunk/mysqlnd_ms_filter_table_partition.c 2011-07-29 15:05:26 UTC \
(rev 313931) @@ -270,19 +270,20 @@
zend_llist * in_list, zend_llist * out_list TSRMLS_DC)
{
enum_func_status ret = PASS;
+ zend_bool match = FALSE;
HashPosition pos_rules;
HashTable ** filter_ht;
DBG_ENTER("mysqlnd_ms_table_filter_match");
zend_hash_internal_pointer_reset_ex(rules, &pos_rules);
- while (SUCCESS == zend_hash_get_current_data_ex(rules, (void **)&filter_ht, \
&pos_rules) && filter_ht) { + while ((FALSE == match) && (SUCCESS == \
zend_hash_get_current_data_ex(rules, (void **)&filter_ht, &pos_rules) && filter_ht)) \
{ char * filter_mask;
uint fm_len;
ulong n_key;
if (HASH_KEY_IS_STRING == zend_hash_get_current_key_ex(rules, &filter_mask, \
&fm_len, &n_key, 0, &pos_rules)) { DBG_INF_FMT("Comparing [%s] with [%s]", \
db_table_buf, filter_mask);
- if (TRUE == mysqlnd_ms_match_wild(db_table_buf, filter_mask TSRMLS_CC)) {
+ if (TRUE == (match = mysqlnd_ms_match_wild(db_table_buf, filter_mask TSRMLS_CC))) \
{ MYSQLND_MS_TABLE_FILTER ** entry_filter_pp;
HashPosition pos_servers;
/* found a match*/
@@ -315,6 +316,7 @@
}
zend_hash_move_forward_ex(rules, &pos_rules);
}
+
DBG_RETURN(ret);
}
/* }}} */
@@ -364,9 +366,12 @@
);
if (tinfo->db) {
snprintf(db_table_buf, sizeof(db_table_buf), "%s.%s", tinfo->db, tinfo->table);
+ DBG_INF_FMT("qualified table=%s", db_table_buf);
} else if (tinfo->table && connect_or_select_db) {
snprintf(db_table_buf, sizeof(db_table_buf), "%s.%s", connect_or_select_db, \
tinfo->table); + DBG_INF_FMT("qualified table=%s (using \
connect_or_select_db=%s)", db_table_buf, connect_or_select_db); } else {
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, MYSQLND_MS_ERROR_PREFIX " Failed to \
parse table name"); break;
}
zend_llist_clean(master_out);
@@ -394,7 +399,7 @@
if (parser) {
if (err) {
DBG_INF_FMT("parser start error %d", err);
- }
+ }
mysqlnd_qp_free_parser(parser TSRMLS_CC);
}
}
--
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