summaryrefslogtreecommitdiff
path: root/repl-tests/test-repl
diff options
context:
space:
mode:
Diffstat (limited to 'repl-tests/test-repl')
-rw-r--r--repl-tests/test-repl/foo-dump-master.master3
-rw-r--r--repl-tests/test-repl/foo-dump-slave.master3
-rwxr-xr-xrepl-tests/test-repl/run.test24
-rw-r--r--repl-tests/test-repl/sum-wlen-master.master2
-rw-r--r--repl-tests/test-repl/sum-wlen-slave.master2
5 files changed, 34 insertions, 0 deletions
diff --git a/repl-tests/test-repl/foo-dump-master.master b/repl-tests/test-repl/foo-dump-master.master
new file mode 100644
index 00000000000..982e0523cfb
--- /dev/null
+++ b/repl-tests/test-repl/foo-dump-master.master
@@ -0,0 +1,3 @@
+n
+1
+2
diff --git a/repl-tests/test-repl/foo-dump-slave.master b/repl-tests/test-repl/foo-dump-slave.master
new file mode 100644
index 00000000000..982e0523cfb
--- /dev/null
+++ b/repl-tests/test-repl/foo-dump-slave.master
@@ -0,0 +1,3 @@
+n
+1
+2
diff --git a/repl-tests/test-repl/run.test b/repl-tests/test-repl/run.test
new file mode 100755
index 00000000000..79eb2281b85
--- /dev/null
+++ b/repl-tests/test-repl/run.test
@@ -0,0 +1,24 @@
+source ../include/master-slave.inc;
+connection slave;
+!slave stop;
+connection master;
+flush master;
+connection slave;
+flush slave;
+!slave start;
+sleep 3;
+connection master;
+use test;
+drop table if exists words;
+create table words (word char(20) not null, index(word));
+load data infile '/usr/dict/words' into table words;
+drop table if exists foo;
+create table foo(n int);
+insert into foo values(1),(2);
+@foo-dump-master.master select * from foo;
+@sum-wlen-master.master select sum(length(word)) from words;
+connection slave;
+sleep 5;
+use test;
+@sum-wlen-slave.master select sum(length(word)) from words;
+@foo-dump-slave.master select * from foo;
diff --git a/repl-tests/test-repl/sum-wlen-master.master b/repl-tests/test-repl/sum-wlen-master.master
new file mode 100644
index 00000000000..e749ab4840a
--- /dev/null
+++ b/repl-tests/test-repl/sum-wlen-master.master
@@ -0,0 +1,2 @@
+sum(length(word))
+363634
diff --git a/repl-tests/test-repl/sum-wlen-slave.master b/repl-tests/test-repl/sum-wlen-slave.master
new file mode 100644
index 00000000000..e749ab4840a
--- /dev/null
+++ b/repl-tests/test-repl/sum-wlen-slave.master
@@ -0,0 +1,2 @@
+sum(length(word))
+363634