summaryrefslogtreecommitdiff
path: root/repl-tests
diff options
context:
space:
mode:
authorbk@work.mysql.com <>2000-07-31 21:29:14 +0200
committerbk@work.mysql.com <>2000-07-31 21:29:14 +0200
commitf4c589ff6c653d1d2a09c26e46ead3c8a15655d8 (patch)
treed253a359142dfc1ed247d5d4365d86972ea31109 /repl-tests
parent7eec25e393727b16bb916b50d82b0aa3084e065c (diff)
downloadmariadb-git-f4c589ff6c653d1d2a09c26e46ead3c8a15655d8.tar.gz
Import changeset
Diffstat (limited to 'repl-tests')
-rw-r--r--repl-tests/include/master-slave.inc2
-rw-r--r--repl-tests/test-dump/run.test17
-rw-r--r--repl-tests/test-dump/table-dump-check.master2
-rw-r--r--repl-tests/test-dump/table-dump-select.master2
-rw-r--r--repl-tests/test-repl-ts/repl-timestamp.master2
-rw-r--r--repl-tests/test-repl-ts/run.test17
-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
11 files changed, 76 insertions, 0 deletions
diff --git a/repl-tests/include/master-slave.inc b/repl-tests/include/master-slave.inc
new file mode 100644
index 00000000000..ad2dea1f520
--- /dev/null
+++ b/repl-tests/include/master-slave.inc
@@ -0,0 +1,2 @@
+connect (slave,localhost,root,,test,0,/var/lib/mysql/mysql.sock);
+connect (master,sarochka,admin,,test,0,0);
diff --git a/repl-tests/test-dump/run.test b/repl-tests/test-dump/run.test
new file mode 100644
index 00000000000..612db3fc6cf
--- /dev/null
+++ b/repl-tests/test-dump/run.test
@@ -0,0 +1,17 @@
+source ../include/master-slave.inc;
+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 words1;
+create table words1 (word char(20) not null);
+load data infile '/usr/dict/words' into table words1;
+connection slave;
+use test;
+drop table if exists words;
+load table words from master;
+drop table if exists words1;
+load table words1 from master;
+@table-dump-check.master check table words;
+@table-dump-select.master select count(*) from words1;
diff --git a/repl-tests/test-dump/table-dump-check.master b/repl-tests/test-dump/table-dump-check.master
new file mode 100644
index 00000000000..4061fdb4a0d
--- /dev/null
+++ b/repl-tests/test-dump/table-dump-check.master
@@ -0,0 +1,2 @@
+Table Op Msg_type Msg_text
+test.words check status OK
diff --git a/repl-tests/test-dump/table-dump-select.master b/repl-tests/test-dump/table-dump-select.master
new file mode 100644
index 00000000000..ae93d31c066
--- /dev/null
+++ b/repl-tests/test-dump/table-dump-select.master
@@ -0,0 +1,2 @@
+count(*)
+45402
diff --git a/repl-tests/test-repl-ts/repl-timestamp.master b/repl-tests/test-repl-ts/repl-timestamp.master
new file mode 100644
index 00000000000..c3e4a2326d0
--- /dev/null
+++ b/repl-tests/test-repl-ts/repl-timestamp.master
@@ -0,0 +1,2 @@
+unix_timestamp(t)
+200006
diff --git a/repl-tests/test-repl-ts/run.test b/repl-tests/test-repl-ts/run.test
new file mode 100644
index 00000000000..8e5abbd4a3e
--- /dev/null
+++ b/repl-tests/test-repl-ts/run.test
@@ -0,0 +1,17 @@
+#! ../client/mysql-test
+# tests if the replicaion preserves timestamp properly
+
+source ../include/master-slave.inc;
+connection master;
+set timestamp=200006;
+drop table if exists foo;
+create table foo(t timestamp not null,a char(1));
+insert into foo ( a) values ('F');
+@repl-timestamp.master select unix_timestamp(t) from foo;
+sleep 3;
+connection slave;
+drop table if exists foo;
+load table foo from master;
+@repl-timestamp.master select unix_timestamp(t) from foo;
+
+
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