diff options
author | unknown <Li-Bing.Song@sun.com> | 2010-06-27 13:51:45 +0800 |
---|---|---|
committer | unknown <Li-Bing.Song@sun.com> | 2010-06-27 13:51:45 +0800 |
commit | af01afa0f6ec0180f404d4b1930f80d489d2e598 (patch) | |
tree | 5ffc67592750432f7fa5dceb329e419f08bc9d60 /mysql-test/include/diff_tables.inc | |
parent | 04e31b7f5a3cebebaac80a81f6b301a43a2b8c23 (diff) | |
parent | 451cea3f62a1b53c441995c8e1f052875c4fb3bd (diff) | |
download | mariadb-git-af01afa0f6ec0180f404d4b1930f80d489d2e598.tar.gz |
Manual merge
Diffstat (limited to 'mysql-test/include/diff_tables.inc')
-rw-r--r-- | mysql-test/include/diff_tables.inc | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/mysql-test/include/diff_tables.inc b/mysql-test/include/diff_tables.inc index ad42615511a..150c02d1d73 100644 --- a/mysql-test/include/diff_tables.inc +++ b/mysql-test/include/diff_tables.inc @@ -65,17 +65,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. |