summaryrefslogtreecommitdiff
path: root/mysql-test/include/diff_tables.inc
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2010-06-28 17:59:41 -0300
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2010-06-28 17:59:41 -0300
commitbfd3b7a109f567ebbbe0f17a6a804c3d42285a89 (patch)
tree1496d4c5a961584fa7eb53f2e3bb14728c515594 /mysql-test/include/diff_tables.inc
parent407b68bf99bbd4321e675259335f9266f0f5fe49 (diff)
downloadmariadb-git-bfd3b7a109f567ebbbe0f17a6a804c3d42285a89.tar.gz
Revert Bug#48321 due to build breakage and failing tests.
Diffstat (limited to 'mysql-test/include/diff_tables.inc')
-rw-r--r--mysql-test/include/diff_tables.inc18
1 files changed, 11 insertions, 7 deletions
diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc
index e11e69b3023..d15dd56b35d 100644
--- a/mysql-test/include/diff_tables.inc
+++ b/mysql-test/include/diff_tables.inc
@@ -64,13 +64,17 @@ 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 $_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;
+ # 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;
}
# Sanity-check the input.