summaryrefslogtreecommitdiff
path: root/mysql-test/include/diff_tables.inc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2010-09-11 20:43:48 +0200
committerSergei Golubchik <sergii@pisem.net>2010-09-11 20:43:48 +0200
commitdd2e3dc2ed85799364926e432eddb3f4eb20d2fa (patch)
tree0d72ee69e037cdd09618ddb53652dd1b220890dc /mysql-test/include/diff_tables.inc
parent2b5f744ca48113207e97fd335acd68a61bb5b8a4 (diff)
parent17f3a09477f9c208a9248c8ed26268cb86a35bf0 (diff)
downloadmariadb-git-dd2e3dc2ed85799364926e432eddb3f4eb20d2fa.tar.gz
merge with 5.1
Diffstat (limited to 'mysql-test/include/diff_tables.inc')
-rw-r--r--mysql-test/include/diff_tables.inc18
1 files changed, 7 insertions, 11 deletions
diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc
index d15dd56b35d..81362e8643b 100644
--- a/mysql-test/include/diff_tables.inc
+++ b/mysql-test/include/diff_tables.inc
@@ -64,17 +64,13 @@ let $_diff_table=$diff_table_2;
let $_diff_i=2;
while ($_diff_i) {
- # Parse out any leading "master:" or "slave:" from the table
- # specification and connect the appropriate server.
- let $_diff_conn_master=`SELECT SUBSTR('$_diff_table', 1, 7) = 'master:'`;
- if ($_diff_conn_master) {
- let $_diff_table=`SELECT SUBSTR('$_diff_table', 8)`;
- connection master;
- }
- let $_diff_conn_slave=`SELECT SUBSTR('$_diff_table', 1, 6) = 'slave:'`;
- if ($_diff_conn_slave) {
- let $_diff_table=`SELECT SUBSTR('$_diff_table', 7)`;
- connection slave;
+ # Parse out any leading "master:" or "slave:" from the table specification
+# and connect the appropriate server.
+ let $_pos= `SELECT LOCATE(':', '$_diff_table')`;
+ let $_diff_conn=`SELECT SUBSTR('$_diff_table', 1, $_pos-1)`;
+ if (`SELECT 'XX$_diff_conn' <> 'XX'`) {
+ let $_diff_table=`SELECT SUBSTR('$_diff_table', $_pos+1)`;
+ connection $_diff_conn;
}
# Sanity-check the input.