summaryrefslogtreecommitdiff
path: root/mysql-test/include/diff_master_slave.inc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2009-09-08 00:50:10 +0400
committerSergey Petrunya <psergey@askmonty.org>2009-09-08 00:50:10 +0400
commit29f0dcb56337a3e352ad7a70dcff6b25bb605325 (patch)
tree84935c21dc958724ae7dcbeeca0c0f08986fc430 /mysql-test/include/diff_master_slave.inc
parent915a624cbcb58a10a2cfb2e2e4fd5029191fa86a (diff)
parent8a2454f8e9fce648272577fcf8006ae6e6806cf9 (diff)
downloadmariadb-git-29f0dcb56337a3e352ad7a70dcff6b25bb605325.tar.gz
Merge MySQL->MariaDB
* Finished Monty and Jani's merge * Some InnoDB tests still fail (because it's old xtradb code run against newer testsuite). They are expected to go after mergning with the latest xtradb.
Diffstat (limited to 'mysql-test/include/diff_master_slave.inc')
-rw-r--r--mysql-test/include/diff_master_slave.inc21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/include/diff_master_slave.inc b/mysql-test/include/diff_master_slave.inc
new file mode 100644
index 00000000000..b6d79190671
--- /dev/null
+++ b/mysql-test/include/diff_master_slave.inc
@@ -0,0 +1,21 @@
+# ==== Purpose ====
+#
+# Diff the output of a statement on master and slave
+#
+# ==== Usage =====
+#
+# let $diff_statement= SELECT * FROM t1 WHERE a < 100;
+# source include/diff_master_slave.inc;
+
+--echo source include/diff_master_slave.inc;
+disable_query_log;
+disable_result_log;
+
+exec $MYSQL test -e "$diff_statement" > $MYSQLTEST_VARDIR/tmp/diff_master.out;
+sync_slave_with_master;
+exec $MYSQL_SLAVE test -e "$diff_statement" > $MYSQLTEST_VARDIR/tmp/diff_slave.out;
+
+diff_files $MYSQLTEST_VARDIR/tmp/diff_master.out $MYSQLTEST_VARDIR/tmp/diff_slave.out;
+
+enable_result_log;
+enable_query_log;