mirror of
https://github.com/MariaDB/server.git
synced 2025-09-11 05:52:26 +03:00
Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-new
into mysql.com:/home/ndbdev/jmiller/clones/mysql-5.1-new
This commit is contained in:
@@ -1,47 +0,0 @@
|
||||
#
|
||||
# Test forced timestamp
|
||||
#
|
||||
-- source include/master-slave.inc
|
||||
|
||||
# Don't log table creating to the slave as we want to test LOAD TABLE
|
||||
set SQL_LOG_BIN=0,timestamp=200006;
|
||||
create table t1(t timestamp not null,a char(1));
|
||||
insert into t1 ( a) values ('F');
|
||||
select unix_timestamp(t) from t1;
|
||||
connection slave;
|
||||
load table t1 from master;
|
||||
select unix_timestamp(t) from t1;
|
||||
|
||||
# Delete the created table on master and slave
|
||||
connection master;
|
||||
set SQL_LOG_BIN=1,timestamp=default;
|
||||
drop table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
connection master;
|
||||
|
||||
#
|
||||
# Test copying table with checksum
|
||||
#
|
||||
|
||||
# Don't log table creating to the slave as we want to test LOAD TABLE
|
||||
set SQL_LOG_BIN=0;
|
||||
|
||||
eval CREATE TABLE t1 (
|
||||
a int not null
|
||||
) ENGINE=$engine_type MAX_ROWS=4000 CHECKSUM=1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
load table t1 from master;
|
||||
check table t1;
|
||||
drop table t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
||||
# End of 4.1 tests
|
@@ -30,21 +30,25 @@ let $VERSION=`select version()`;
|
||||
|
||||
connection master;
|
||||
reset master;
|
||||
create table t1(n int not null auto_increment primary key);
|
||||
eval create table t1(n int not null auto_increment primary key)ENGINE=$engine_type;
|
||||
insert into t1 values (NULL);
|
||||
drop table t1;
|
||||
create table t1 (word char(20) not null);
|
||||
eval create table t1 (word char(20) not null)ENGINE=$engine_type;
|
||||
load data infile '../../std_data/words.dat' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
drop table t1;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
show binlog events;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
show binlog events from 102 limit 1;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
show binlog events from 102 limit 2;
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
show binlog events from 102 limit 2,1;
|
||||
flush logs;
|
||||
|
||||
@@ -64,7 +68,7 @@ flush logs;
|
||||
# To make it predictable, we do a useless update now, but which has the
|
||||
# interest of making the slave catch both rotate events.
|
||||
|
||||
create table t5 (a int);
|
||||
eval create table t5 (a int)ENGINE=$engine_type;
|
||||
drop table t5;
|
||||
|
||||
# Sync slave and force it to start on another binary log
|
||||
@@ -82,14 +86,16 @@ connection master;
|
||||
|
||||
# Create some entries for second log
|
||||
|
||||
create table t1 (n int);
|
||||
eval create table t1 (n int)ENGINE=$engine_type;
|
||||
insert into t1 values (1);
|
||||
drop table t1;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
show binlog events;
|
||||
--replace_result $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
show binlog events in 'master-bin.000002';
|
||||
show binary logs;
|
||||
save_master_pos;
|
||||
@@ -99,9 +105,11 @@ sync_with_master;
|
||||
show binary logs;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT $VERSION VERSION
|
||||
--replace_column 2 # 5 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\//
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 8 # 9 # 16 # 23 # 33 #
|
||||
|
@@ -3,6 +3,10 @@
|
||||
# Change Date: 2006-01-17
|
||||
# Change: Added order by in select
|
||||
####################
|
||||
# Change Date: 2006-02-02
|
||||
# Change: renamed to make bettre sense,
|
||||
# and wrapped per Engine test
|
||||
############################
|
||||
source include/master-slave.inc;
|
||||
|
||||
#
|
||||
@@ -10,7 +14,7 @@ source include/master-slave.inc;
|
||||
#
|
||||
SHOW VARIABLES LIKE 'relay_log_space_limit';
|
||||
|
||||
CREATE TABLE t1 (name varchar(64), age smallint(3));
|
||||
eval CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=$engine_type;
|
||||
INSERT INTO t1 SET name='Andy', age=31;
|
||||
INSERT t1 SET name='Jacob', age=2;
|
||||
INSERT into t1 SET name='Caleb', age=1;
|
@@ -1,2 +0,0 @@
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
@@ -1,2 +0,0 @@
|
||||
count(*)
|
||||
10
|
@@ -1,28 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
set SQL_LOG_BIN=0;
|
||||
create table t1 (word char(20) not null, index(word));
|
||||
load data infile '../../std_data/words.dat' into table t1;
|
||||
create table t2 (word char(20) not null);
|
||||
load data infile '../../std_data/words.dat' into table t2;
|
||||
create table t3 (word char(20) not null primary key);
|
||||
load table t1 from master;
|
||||
load table t2 from master;
|
||||
load table t3 from master;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
70
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
0
|
||||
set SQL_LOG_BIN=1;
|
||||
drop table if exists t1,t2,t3;
|
||||
create table t1(n int);
|
||||
drop table t1;
|
@@ -1,29 +0,0 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
set SQL_LOG_BIN=0,timestamp=200006;
|
||||
create table t1(t timestamp not null,a char(1));
|
||||
insert into t1 ( a) values ('F');
|
||||
select unix_timestamp(t) from t1;
|
||||
unix_timestamp(t)
|
||||
200006
|
||||
load table t1 from master;
|
||||
select unix_timestamp(t) from t1;
|
||||
unix_timestamp(t)
|
||||
200006
|
||||
set SQL_LOG_BIN=1,timestamp=default;
|
||||
drop table t1;
|
||||
set SQL_LOG_BIN=0;
|
||||
CREATE TABLE t1 (
|
||||
a int not null
|
||||
) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
load table t1 from master;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
drop table t1;
|
@@ -4,118 +4,114 @@ reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP PROCEDURE IF EXISTS test.p1;
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a));
|
||||
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
|
||||
DELETE FROM test.t1 WHERE a = 'abashed';
|
||||
DELETE FROM test.t1;
|
||||
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
|
||||
SELECT * FROM test.t1;
|
||||
SELECT * FROM test.t1 ORDER BY a DESC;
|
||||
a
|
||||
abase
|
||||
abased
|
||||
abasement
|
||||
abasements
|
||||
abases
|
||||
abash
|
||||
abashed
|
||||
abashes
|
||||
abashing
|
||||
abasing
|
||||
abate
|
||||
abated
|
||||
abatement
|
||||
abatements
|
||||
abater
|
||||
abates
|
||||
abating
|
||||
Abba
|
||||
abbe
|
||||
abbey
|
||||
abbeys
|
||||
abbot
|
||||
abbots
|
||||
Abbott
|
||||
abbreviate
|
||||
abbreviated
|
||||
abbreviates
|
||||
abbreviating
|
||||
abbreviation
|
||||
abbreviations
|
||||
Abby
|
||||
abdomen
|
||||
abdomens
|
||||
abdominal
|
||||
abduct
|
||||
abducted
|
||||
abduction
|
||||
abductions
|
||||
abductor
|
||||
abductors
|
||||
abducts
|
||||
Abe
|
||||
abed
|
||||
Abel
|
||||
Abelian
|
||||
Abelson
|
||||
Aberdeen
|
||||
Abernathy
|
||||
aberrant
|
||||
aberration
|
||||
SELECT * FROM test.t1;
|
||||
aberrant
|
||||
Abernathy
|
||||
Aberdeen
|
||||
Abelson
|
||||
Abelian
|
||||
Abel
|
||||
abed
|
||||
Abe
|
||||
abducts
|
||||
abductors
|
||||
abductor
|
||||
abductions
|
||||
abduction
|
||||
abducted
|
||||
abduct
|
||||
abdominal
|
||||
abdomens
|
||||
abdomen
|
||||
Abby
|
||||
abbreviations
|
||||
abbreviation
|
||||
abbreviating
|
||||
abbreviates
|
||||
abbreviated
|
||||
abbreviate
|
||||
Abbott
|
||||
abbots
|
||||
abbot
|
||||
abbeys
|
||||
abbey
|
||||
abbe
|
||||
Abba
|
||||
abating
|
||||
abates
|
||||
abater
|
||||
abatements
|
||||
abatement
|
||||
abated
|
||||
abate
|
||||
abasing
|
||||
abashing
|
||||
abashes
|
||||
abashed
|
||||
abash
|
||||
abases
|
||||
abasements
|
||||
abasement
|
||||
abased
|
||||
abase
|
||||
SELECT * FROM test.t1 ORDER BY a DESC;
|
||||
a
|
||||
abase
|
||||
abased
|
||||
abasement
|
||||
abasements
|
||||
abases
|
||||
abash
|
||||
abashed
|
||||
abashes
|
||||
abashing
|
||||
abasing
|
||||
abate
|
||||
abated
|
||||
abatement
|
||||
abatements
|
||||
abater
|
||||
abates
|
||||
abating
|
||||
Abba
|
||||
abbe
|
||||
abbey
|
||||
abbeys
|
||||
abbot
|
||||
abbots
|
||||
Abbott
|
||||
abbreviate
|
||||
abbreviated
|
||||
abbreviates
|
||||
abbreviating
|
||||
abbreviation
|
||||
abbreviations
|
||||
Abby
|
||||
abdomen
|
||||
abdomens
|
||||
abdominal
|
||||
abduct
|
||||
abducted
|
||||
abduction
|
||||
abductions
|
||||
abductor
|
||||
abductors
|
||||
abducts
|
||||
Abe
|
||||
abed
|
||||
Abel
|
||||
Abelian
|
||||
Abelson
|
||||
Aberdeen
|
||||
Abernathy
|
||||
aberrant
|
||||
aberration
|
||||
DROP PROCEDURE IF EXISTS test.p1;
|
||||
Warnings:
|
||||
Note 1305 PROCEDURE p1 does not exist
|
||||
aberrant
|
||||
Abernathy
|
||||
Aberdeen
|
||||
Abelson
|
||||
Abelian
|
||||
Abel
|
||||
abed
|
||||
Abe
|
||||
abducts
|
||||
abductors
|
||||
abductor
|
||||
abductions
|
||||
abduction
|
||||
abducted
|
||||
abduct
|
||||
abdominal
|
||||
abdomens
|
||||
abdomen
|
||||
Abby
|
||||
abbreviations
|
||||
abbreviation
|
||||
abbreviating
|
||||
abbreviates
|
||||
abbreviated
|
||||
abbreviate
|
||||
Abbott
|
||||
abbots
|
||||
abbot
|
||||
abbeys
|
||||
abbey
|
||||
abbe
|
||||
Abba
|
||||
abating
|
||||
abates
|
||||
abater
|
||||
abatements
|
||||
abatement
|
||||
abated
|
||||
abate
|
||||
abasing
|
||||
abashing
|
||||
abashes
|
||||
abashed
|
||||
abash
|
||||
abases
|
||||
abasements
|
||||
abasement
|
||||
abased
|
||||
abase
|
||||
DROP TABLE test.t1;
|
||||
|
@@ -61,16 +61,14 @@ mysql
|
||||
mysqltest_prometheus
|
||||
mysqltest_sisyfos
|
||||
test
|
||||
SHOW CREATE TABLE mysqltest_prometheus.t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW CREATE TABLE mysqltest_sisyfos.t2;
|
||||
Table Create Table
|
||||
t2 CREATE TABLE `t2` (
|
||||
`a` int(11) default NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
USE mysqltest_prometheus;
|
||||
SHOW TABLES;
|
||||
Tables_in_mysqltest_prometheus
|
||||
t1
|
||||
USE mysqltest_sisyfos;
|
||||
SHOW TABLES;
|
||||
Tables_in_mysqltest_sisyfos
|
||||
t2
|
||||
DROP DATABASE IF EXISTS mysqltest_prometheus;
|
||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||
DROP DATABASE IF EXISTS mysqltest_bob;
|
||||
|
@@ -13,11 +13,11 @@ drop database if exists mysqltest3;
|
||||
create database mysqltest2;
|
||||
create database mysqltest;
|
||||
create database mysqltest2;
|
||||
create table mysqltest2.foo (n int);
|
||||
create table mysqltest2.foo (n int)ENGINE=MyISAM;
|
||||
insert into mysqltest2.foo values(4);
|
||||
create table mysqltest2.foo (n int);
|
||||
create table mysqltest2.foo (n int)ENGINE=MyISAM;
|
||||
insert into mysqltest2.foo values(5);
|
||||
create table mysqltest.bar (m int);
|
||||
create table mysqltest.bar (m int)ENGINE=MyISAM;
|
||||
insert into mysqltest.bar values(15);
|
||||
select mysqltest2.foo.n,mysqltest.bar.m from mysqltest2.foo,mysqltest.bar;
|
||||
n m
|
||||
@@ -38,12 +38,12 @@ mysql
|
||||
mysqltest
|
||||
mysqltest2
|
||||
test
|
||||
create table mysqltest2.t1(n int, s char(20));
|
||||
create table mysqltest2.t2(n int, s text);
|
||||
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
create table mysqltest2.t2(n int, s text)ENGINE=MyISAM;
|
||||
insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three');
|
||||
insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen');
|
||||
create table mysqltest.t1(n int, s char(20));
|
||||
create table mysqltest.t2(n int, s text);
|
||||
create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
create table mysqltest.t2(n int, s text)ENGINE=MyISAM;
|
||||
insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test');
|
||||
insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'),
|
||||
(13, 'thirteen test');
|
||||
@@ -55,17 +55,17 @@ cluster_replication
|
||||
mysql
|
||||
test
|
||||
create database mysqltest2;
|
||||
create table mysqltest2.t1(n int, s char(20));
|
||||
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest2.t1 values (1, 'original foo.t1');
|
||||
create table mysqltest2.t3(n int, s char(20));
|
||||
create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest2.t3 values (1, 'original foo.t3');
|
||||
create database mysqltest3;
|
||||
create table mysqltest3.t1(n int, s char(20));
|
||||
create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest3.t1 values (1, 'original foo2.t1');
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(n int, s char(20));
|
||||
create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest.t1 values (1, 'original bar.t1');
|
||||
create table mysqltest.t3(n int, s char(20));
|
||||
create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest.t3 values (1, 'original bar.t3');
|
||||
load data from master;
|
||||
show databases;
|
49
mysql-test/r/rpl_load_table_from_master.result
Normal file
49
mysql-test/r/rpl_load_table_from_master.result
Normal file
@@ -0,0 +1,49 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SET SQL_LOG_BIN=0,timestamp=200006;
|
||||
CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM;
|
||||
INSERT INTO t1 ( a) VALUE ('F');
|
||||
select unix_timestamp(t) from t1;
|
||||
unix_timestamp(t)
|
||||
200006
|
||||
load table t1 from master;
|
||||
select unix_timestamp(t) from t1;
|
||||
unix_timestamp(t)
|
||||
200006
|
||||
set SQL_LOG_BIN=1,timestamp=default;
|
||||
drop table t1;
|
||||
set SQL_LOG_BIN=0;
|
||||
CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
load table t1 from master;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
drop table t1;
|
||||
drop table t1;
|
||||
set SQL_LOG_BIN=0;
|
||||
create table t1 (word char(20) not null, index(word))ENGINE=MyISAM;
|
||||
load data infile '../../std_data/words.dat' into table t1;
|
||||
create table t2 (word char(20) not null)ENGINE=MyISAM;
|
||||
load data infile '../../std_data/words.dat' into table t2;
|
||||
create table t3 (word char(20) not null primary key)ENGINE=MyISAM;
|
||||
load table t1 from master;
|
||||
load table t2 from master;
|
||||
load table t3 from master;
|
||||
check table t1;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t1 check status OK
|
||||
select count(*) from t2;
|
||||
count(*)
|
||||
70
|
||||
select count(*) from t3;
|
||||
count(*)
|
||||
0
|
||||
set SQL_LOG_BIN=1;
|
||||
drop table if exists t1,t2,t3;
|
||||
create table t1(n int);
|
||||
drop table t1;
|
185
mysql-test/r/rpl_ndb_auto_inc.result
Normal file
185
mysql-test/r/rpl_ndb_auto_inc.result
Normal file
@@ -0,0 +1,185 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam auto_increment=3;
|
||||
insert into t1 values (NULL,1),(NULL,2),(NULL,3);
|
||||
select * from t1;
|
||||
a b
|
||||
12 1
|
||||
22 2
|
||||
32 3
|
||||
select * from t1;
|
||||
a b
|
||||
12 1
|
||||
22 2
|
||||
32 3
|
||||
drop table t1;
|
||||
create table t1 (a int not null auto_increment,b int, primary key (a)) engine=myisam;
|
||||
insert into t1 values (1,1),(NULL,2),(3,3),(NULL,4);
|
||||
delete from t1 where b=4;
|
||||
insert into t1 values (NULL,5),(NULL,6);
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
22 5
|
||||
32 6
|
||||
select * from t1;
|
||||
a b
|
||||
1 1
|
||||
2 2
|
||||
3 3
|
||||
22 5
|
||||
32 6
|
||||
drop table t1;
|
||||
set @@session.auto_increment_increment=100, @@session.auto_increment_offset=10;
|
||||
show variables like "%auto_inc%";
|
||||
Variable_name Value
|
||||
auto_increment_increment 100
|
||||
auto_increment_offset 10
|
||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||
insert into t1 values (NULL),(5),(NULL);
|
||||
insert into t1 values (250),(NULL);
|
||||
select * from t1;
|
||||
a
|
||||
5
|
||||
10
|
||||
110
|
||||
250
|
||||
310
|
||||
insert into t1 values (1000);
|
||||
set @@insert_id=400;
|
||||
insert into t1 values(NULL),(NULL);
|
||||
select * from t1;
|
||||
a
|
||||
5
|
||||
10
|
||||
110
|
||||
250
|
||||
310
|
||||
400
|
||||
410
|
||||
1000
|
||||
select * from t1;
|
||||
a
|
||||
5
|
||||
10
|
||||
110
|
||||
250
|
||||
310
|
||||
400
|
||||
410
|
||||
1000
|
||||
drop table t1;
|
||||
create table t1 (a int not null auto_increment, primary key (a)) engine=innodb;
|
||||
insert into t1 values (NULL),(5),(NULL);
|
||||
insert into t1 values (250),(NULL);
|
||||
select * from t1;
|
||||
a
|
||||
5
|
||||
10
|
||||
110
|
||||
250
|
||||
310
|
||||
insert into t1 values (1000);
|
||||
set @@insert_id=400;
|
||||
insert into t1 values(NULL),(NULL);
|
||||
select * from t1;
|
||||
a
|
||||
5
|
||||
10
|
||||
110
|
||||
250
|
||||
310
|
||||
400
|
||||
410
|
||||
1000
|
||||
select * from t1;
|
||||
a
|
||||
5
|
||||
10
|
||||
110
|
||||
250
|
||||
310
|
||||
400
|
||||
410
|
||||
1000
|
||||
drop table t1;
|
||||
set @@session.auto_increment_increment=1, @@session.auto_increment_offset=1;
|
||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||
insert into t1 values (NULL),(5),(NULL),(NULL);
|
||||
insert into t1 values (500),(NULL),(502),(NULL),(NULL);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
5
|
||||
6
|
||||
7
|
||||
500
|
||||
501
|
||||
502
|
||||
503
|
||||
504
|
||||
set @@insert_id=600;
|
||||
insert into t1 values(600),(NULL),(NULL);
|
||||
ERROR 23000: Duplicate entry '600' for key 1
|
||||
set @@insert_id=600;
|
||||
insert ignore into t1 values(600),(NULL),(NULL),(610),(NULL);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
5
|
||||
6
|
||||
7
|
||||
500
|
||||
501
|
||||
502
|
||||
503
|
||||
504
|
||||
600
|
||||
610
|
||||
611
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
5
|
||||
6
|
||||
7
|
||||
500
|
||||
501
|
||||
502
|
||||
503
|
||||
504
|
||||
600
|
||||
610
|
||||
611
|
||||
drop table t1;
|
||||
set @@session.auto_increment_increment=10, @@session.auto_increment_offset=1;
|
||||
create table t1 (a int not null auto_increment, primary key (a)) engine=myisam;
|
||||
insert into t1 values(2),(12),(22),(32),(42);
|
||||
insert into t1 values (NULL),(NULL);
|
||||
insert into t1 values (3),(NULL),(NULL);
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
3
|
||||
11
|
||||
21
|
||||
31
|
||||
select * from t1;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
11
|
||||
12
|
||||
21
|
||||
22
|
||||
31
|
||||
32
|
||||
42
|
||||
drop table t1;
|
29
mysql-test/r/rpl_ndb_func003.result
Normal file
29
mysql-test/r/rpl_ndb_func003.result
Normal file
@@ -0,0 +1,29 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP FUNCTION IF EXISTS test.f1;
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, c CHAR(16),PRIMARY KEY(a))ENGINE=NDB;
|
||||
create function test.f1() RETURNS CHAR(16)
|
||||
BEGIN
|
||||
DECLARE tmp CHAR(16);
|
||||
DECLARE var_name FLOAT;
|
||||
SET var_name = RAND();
|
||||
IF var_name > .6
|
||||
THEN SET tmp = 'Texas';
|
||||
ELSE SET tmp = 'MySQL';
|
||||
END IF;
|
||||
RETURN tmp;
|
||||
END|
|
||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||
INSERT INTO test.t1 VALUES (null,test.f1()),(null,test.f1()),(null,test.f1());
|
||||
SET AUTOCOMMIT=0;
|
||||
START TRANSACTION;
|
||||
INSERT INTO test.t1 VALUES (null,test.f1());
|
||||
ROLLBACK;
|
||||
SET AUTOCOMMIT=1;
|
||||
DROP FUNCTION test.f1;
|
||||
DROP TABLE test.t1;
|
139
mysql-test/r/rpl_ndb_log.result
Normal file
139
mysql-test/r/rpl_ndb_log.result
Normal file
@@ -0,0 +1,139 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
stop slave;
|
||||
reset master;
|
||||
reset slave;
|
||||
reset master;
|
||||
create table t1(n int not null auto_increment primary key)ENGINE=NDB;
|
||||
insert into t1 values (NULL);
|
||||
drop table t1;
|
||||
create table t1 (word char(20) not null)ENGINE=NDB;
|
||||
load data infile '../../std_data/words.dat' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
69
|
||||
drop table t1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
master-bin.000001 # Query 1 # BEGIN
|
||||
master-bin.000001 # Table_map 1 # cluster_replication.apply_status
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Query 1 # COMMIT
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
|
||||
master-bin.000001 # Query 1 # BEGIN
|
||||
master-bin.000001 # Table_map 1 # cluster_replication.apply_status
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Query 1 # COMMIT
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
show binlog events from 102 limit 1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
show binlog events from 102 limit 2;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
master-bin.000001 # Query 1 # BEGIN
|
||||
show binlog events from 102 limit 2,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Table_map 1 # cluster_replication.apply_status
|
||||
flush logs;
|
||||
create table t5 (a int)ENGINE=NDB;
|
||||
drop table t5;
|
||||
start slave;
|
||||
flush logs;
|
||||
stop slave;
|
||||
create table t1 (n int)ENGINE=NDB;
|
||||
insert into t1 values (1);
|
||||
drop table t1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
master-bin.000001 # Query 1 # BEGIN
|
||||
master-bin.000001 # Table_map 1 # cluster_replication.apply_status
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Query 1 # COMMIT
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
|
||||
master-bin.000001 # Query 1 # BEGIN
|
||||
master-bin.000001 # Table_map 1 # cluster_replication.apply_status
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Query 1 # COMMIT
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
|
||||
show binlog events in 'master-bin.000002';
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000002 # Query 1 # use `test`; create table t5 (a int)ENGINE=NDB
|
||||
master-bin.000002 # Query 1 # BEGIN
|
||||
master-bin.000002 # Table_map 1 # cluster_replication.apply_status
|
||||
master-bin.000002 # Write_rows 1 #
|
||||
master-bin.000002 # Query 1 # COMMIT
|
||||
master-bin.000002 # Query 1 # use `test`; drop table t5
|
||||
master-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=NDB
|
||||
master-bin.000002 # Query 1 # BEGIN
|
||||
master-bin.000002 # Table_map 1 # cluster_replication.apply_status
|
||||
master-bin.000002 # Write_rows 1 #
|
||||
master-bin.000002 # Table_map 1 # test.t1
|
||||
master-bin.000002 # Write_rows 1 #
|
||||
master-bin.000002 # Query 1 # COMMIT
|
||||
master-bin.000002 # Query 1 # use `test`; drop table t1
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 1087
|
||||
master-bin.000002 991
|
||||
start slave;
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 1494
|
||||
slave-bin.000002 583
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=NDB
|
||||
slave-bin.000001 # Query 2 # BEGIN
|
||||
slave-bin.000001 # Table_map 2 # cluster_replication.apply_status
|
||||
slave-bin.000001 # Write_rows 2 #
|
||||
slave-bin.000001 # Table_map 2 # test.t1
|
||||
slave-bin.000001 # Write_rows 2 #
|
||||
slave-bin.000001 # Query 2 # COMMIT
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=NDB
|
||||
slave-bin.000001 # Query 2 # BEGIN
|
||||
slave-bin.000001 # Table_map 2 # cluster_replication.apply_status
|
||||
slave-bin.000001 # Write_rows 2 #
|
||||
slave-bin.000001 # Query 2 # COMMIT
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)ENGINE=NDB
|
||||
slave-bin.000001 # Query 2 # BEGIN
|
||||
slave-bin.000001 # Table_map 2 # cluster_replication.apply_status
|
||||
slave-bin.000001 # Write_rows 2 #
|
||||
slave-bin.000001 # Query 2 # COMMIT
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t5
|
||||
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=NDB
|
||||
slave-bin.000002 # Query 2 # BEGIN
|
||||
slave-bin.000002 # Table_map 2 # cluster_replication.apply_status
|
||||
slave-bin.000002 # Write_rows 2 #
|
||||
slave-bin.000002 # Table_map 2 # test.t1
|
||||
slave-bin.000002 # Write_rows 2 #
|
||||
slave-bin.000002 # Query 2 # COMMIT
|
||||
slave-bin.000002 # Query 1 # use `test`; drop table t1
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 991 # # master-bin.000002 Yes Yes # 0 0 991 # None 0 No #
|
||||
show binlog events in 'slave-bin.000005' from 4;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
25
mysql-test/r/rpl_ndb_relay_space.result
Normal file
25
mysql-test/r/rpl_ndb_relay_space.result
Normal file
@@ -0,0 +1,25 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SHOW VARIABLES LIKE 'relay_log_space_limit';
|
||||
Variable_name Value
|
||||
relay_log_space_limit 0
|
||||
CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=NDB;
|
||||
INSERT INTO t1 SET name='Andy', age=31;
|
||||
INSERT t1 SET name='Jacob', age=2;
|
||||
INSERT into t1 SET name='Caleb', age=1;
|
||||
ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY;
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
name age id
|
||||
Andy 31 00000001
|
||||
Caleb 1 00000002
|
||||
Jacob 2 00000003
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
name age id
|
||||
Andy 31 00000001
|
||||
Caleb 1 00000002
|
||||
Jacob 2 00000003
|
||||
drop table t1;
|
@@ -12,26 +12,26 @@ Server_id Host Port Rpl_recovery_rank Master_id
|
||||
create table t1 ( n int);
|
||||
insert into t1 values (1),(2),(3),(4);
|
||||
insert into t1 values(5);
|
||||
select * from t1;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
n
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
5
|
||||
select * from t1;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
n
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
select * from t1;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
n
|
||||
1
|
||||
2
|
||||
3
|
||||
4
|
||||
select * from t1;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
n
|
||||
1
|
||||
2
|
||||
|
25
mysql-test/r/rpl_relay_space_innodb.result
Normal file
25
mysql-test/r/rpl_relay_space_innodb.result
Normal file
@@ -0,0 +1,25 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
SHOW VARIABLES LIKE 'relay_log_space_limit';
|
||||
Variable_name Value
|
||||
relay_log_space_limit 0
|
||||
CREATE TABLE t1 (name varchar(64), age smallint(3))ENGINE=InnoDB;
|
||||
INSERT INTO t1 SET name='Andy', age=31;
|
||||
INSERT t1 SET name='Jacob', age=2;
|
||||
INSERT into t1 SET name='Caleb', age=1;
|
||||
ALTER TABLE t1 ADD id int(8) ZEROFILL AUTO_INCREMENT PRIMARY KEY;
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
name age id
|
||||
Andy 31 00000001
|
||||
Jacob 2 00000002
|
||||
Caleb 1 00000003
|
||||
SELECT * FROM t1 ORDER BY id;
|
||||
name age id
|
||||
Andy 31 00000001
|
||||
Jacob 2 00000002
|
||||
Caleb 1 00000003
|
||||
drop table t1;
|
@@ -16,7 +16,7 @@ insert into t1 values(15),(16),(17);
|
||||
update t1 set m=20 where m=16;
|
||||
delete from t1 where m=17;
|
||||
create table t11 select * from t1;
|
||||
select * from t1;
|
||||
select * from t1 ORDER BY m;
|
||||
m
|
||||
15
|
||||
20
|
||||
|
@@ -8,10 +8,10 @@ stop slave;
|
||||
reset master;
|
||||
reset slave;
|
||||
reset master;
|
||||
create table t1(n int not null auto_increment primary key);
|
||||
create table t1(n int not null auto_increment primary key)ENGINE=MyISAM;
|
||||
insert into t1 values (NULL);
|
||||
drop table t1;
|
||||
create table t1 (word char(20) not null);
|
||||
create table t1 (word char(20) not null)ENGINE=MyISAM;
|
||||
load data infile '../../std_data/words.dat' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
@@ -20,41 +20,41 @@ drop table t1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
show binlog events from 102 limit 1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
|
||||
show binlog events from 102 limit 2;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
show binlog events from 102 limit 2,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
flush logs;
|
||||
create table t5 (a int);
|
||||
create table t5 (a int)ENGINE=MyISAM;
|
||||
drop table t5;
|
||||
start slave;
|
||||
flush logs;
|
||||
stop slave;
|
||||
create table t1 (n int);
|
||||
create table t1 (n int)ENGINE=MyISAM;
|
||||
insert into t1 values (1);
|
||||
drop table t1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
@@ -62,44 +62,44 @@ master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
|
||||
show binlog events in 'master-bin.000002';
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000002 # Query 1 # use `test`; create table t5 (a int)
|
||||
master-bin.000002 # Query 1 # use `test`; create table t5 (a int)ENGINE=MyISAM
|
||||
master-bin.000002 # Query 1 # use `test`; drop table t5
|
||||
master-bin.000002 # Query 1 # use `test`; create table t1 (n int)
|
||||
master-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=MyISAM
|
||||
master-bin.000002 # Table_map 1 # test.t1
|
||||
master-bin.000002 # Write_rows 1 #
|
||||
master-bin.000002 # Query 1 # use `test`; drop table t1
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 1306
|
||||
master-bin.000002 499
|
||||
master-bin.000001 1332
|
||||
master-bin.000002 525
|
||||
start slave;
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 1467
|
||||
slave-bin.000002 337
|
||||
slave-bin.000001 1506
|
||||
slave-bin.000002 350
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=MyISAM
|
||||
slave-bin.000001 # Table_map 1 # test.t1
|
||||
slave-bin.000001 # Write_rows 1 #
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
||||
slave-bin.000001 # Table_map 1 # test.t1
|
||||
slave-bin.000001 # Write_rows 1 #
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)ENGINE=MyISAM
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t5
|
||||
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)
|
||||
slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=MyISAM
|
||||
slave-bin.000002 # Table_map 1 # test.t1
|
||||
slave-bin.000002 # Write_rows 1 #
|
||||
slave-bin.000002 # Query 1 # use `test`; drop table t1
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 499 # # master-bin.000002 Yes Yes # 0 0 499 # None 0 No #
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 525 # # master-bin.000002 Yes Yes # 0 0 525 # None 0 No #
|
||||
show binlog events in 'slave-bin.000005' from 4;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
||||
|
113
mysql-test/r/rpl_row_log_innodb.result
Normal file
113
mysql-test/r/rpl_row_log_innodb.result
Normal file
@@ -0,0 +1,113 @@
|
||||
stop slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
reset master;
|
||||
reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
stop slave;
|
||||
reset master;
|
||||
reset slave;
|
||||
reset master;
|
||||
create table t1(n int not null auto_increment primary key)ENGINE=InnoDB;
|
||||
insert into t1 values (NULL);
|
||||
drop table t1;
|
||||
create table t1 (word char(20) not null)ENGINE=InnoDB;
|
||||
load data infile '../../std_data/words.dat' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
69
|
||||
drop table t1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Xid 1 # COMMIT /* XID */
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Xid 1 # COMMIT /* XID */
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
show binlog events from 102 limit 1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
|
||||
show binlog events from 102 limit 2;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
show binlog events from 102 limit 2,1;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
flush logs;
|
||||
create table t5 (a int)ENGINE=InnoDB;
|
||||
drop table t5;
|
||||
start slave;
|
||||
flush logs;
|
||||
stop slave;
|
||||
create table t1 (n int)ENGINE=InnoDB;
|
||||
insert into t1 values (1);
|
||||
drop table t1;
|
||||
show binlog events;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Xid 1 # COMMIT /* XID */
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
|
||||
master-bin.000001 # Table_map 1 # test.t1
|
||||
master-bin.000001 # Write_rows 1 #
|
||||
master-bin.000001 # Xid 1 # COMMIT /* XID */
|
||||
master-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
master-bin.000001 # Rotate 1 # master-bin.000002;pos=4
|
||||
show binlog events in 'master-bin.000002';
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000002 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
|
||||
master-bin.000002 # Query 1 # use `test`; create table t5 (a int)ENGINE=InnoDB
|
||||
master-bin.000002 # Query 1 # use `test`; drop table t5
|
||||
master-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=InnoDB
|
||||
master-bin.000002 # Table_map 1 # test.t1
|
||||
master-bin.000002 # Write_rows 1 #
|
||||
master-bin.000002 # Xid 1 # COMMIT /* XID */
|
||||
master-bin.000002 # Query 1 # use `test`; drop table t1
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 1386
|
||||
master-bin.000002 552
|
||||
start slave;
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 1560
|
||||
slave-bin.000002 377
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000001 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1(n int not null auto_increment primary key)ENGINE=InnoDB
|
||||
slave-bin.000001 # Table_map 1 # test.t1
|
||||
slave-bin.000001 # Write_rows 1 #
|
||||
slave-bin.000001 # Xid 1 # COMMIT /* XID */
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t1 (word char(20) not null)ENGINE=InnoDB
|
||||
slave-bin.000001 # Table_map 1 # test.t1
|
||||
slave-bin.000001 # Write_rows 1 #
|
||||
slave-bin.000001 # Xid 1 # COMMIT /* XID */
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t1
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t5 (a int)ENGINE=InnoDB
|
||||
slave-bin.000001 # Query 1 # use `test`; drop table t5
|
||||
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
slave-bin.000002 # Format_desc 2 # Server ver: VERSION, Binlog ver: 4
|
||||
slave-bin.000002 # Query 1 # use `test`; create table t1 (n int)ENGINE=InnoDB
|
||||
slave-bin.000002 # Table_map 1 # test.t1
|
||||
slave-bin.000002 # Write_rows 1 #
|
||||
slave-bin.000002 # Xid 1 # COMMIT /* XID */
|
||||
slave-bin.000002 # Query 1 # use `test`; drop table t1
|
||||
show slave status;
|
||||
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 552 # # master-bin.000002 Yes Yes # 0 0 552 # None 0 No #
|
||||
show binlog events in 'slave-bin.000005' from 4;
|
||||
ERROR HY000: Error when executing command SHOW BINLOG EVENTS: Could not find target log
|
@@ -28,52 +28,52 @@ UPDATE test.t2 set t ='NONE';
|
||||
END CASE;
|
||||
end//
|
||||
INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW');
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a t
|
||||
1 NEW
|
||||
2 NEW
|
||||
3 NEW
|
||||
4 NEW
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a t
|
||||
1 NEW
|
||||
2 NEW
|
||||
3 NEW
|
||||
4 NEW
|
||||
call test.p2(1);
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a t
|
||||
1 Tex
|
||||
2 Tex
|
||||
3 Tex
|
||||
4 Tex
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a t
|
||||
1 Tex
|
||||
2 Tex
|
||||
3 Tex
|
||||
4 Tex
|
||||
call test.p2(2);
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a t
|
||||
1 SQL
|
||||
2 SQL
|
||||
3 SQL
|
||||
4 SQL
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a t
|
||||
1 SQL
|
||||
2 SQL
|
||||
3 SQL
|
||||
4 SQL
|
||||
call test.p2(3);
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a t
|
||||
1 NONE
|
||||
2 NONE
|
||||
3 NONE
|
||||
4 NONE
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a t
|
||||
1 NONE
|
||||
2 NONE
|
||||
|
@@ -25,11 +25,11 @@ partition_03ndb : Bug#16385
|
||||
ndb_binlog_basic : Results are not deterministic, Tomas will fix
|
||||
rpl_ndb_basic : Bug#16228
|
||||
rpl_sp : Bug #16456
|
||||
#ndb_dd_disk2memory : Bug #16466
|
||||
ndb_autodiscover : Needs to be fixed w.r.t binlog
|
||||
ndb_autodiscover2 : Needs to be fixed w.r.t binlog
|
||||
#ndb_alter_table_row : sometimes wrong error 1015!=1046
|
||||
ndb_gis : garbled msgs from corrupt THD*
|
||||
rpl_ndb_auto_inc : MySQL Bugs:17086
|
||||
rpl_ndb_relay_space : Results are not deterministic
|
||||
ndb_binlog_ddl_multi : Bug #17038
|
||||
|
||||
# vim: set filetype=conf:
|
||||
rpl_ndb_log : MySQL Bugs: #17158
|
||||
|
@@ -1,25 +0,0 @@
|
||||
source include/master-slave.inc;
|
||||
|
||||
set SQL_LOG_BIN=0;
|
||||
create table t1 (word char(20) not null, index(word));
|
||||
load data infile '../../std_data/words.dat' into table t1;
|
||||
create table t2 (word char(20) not null);
|
||||
load data infile '../../std_data/words.dat' into table t2;
|
||||
create table t3 (word char(20) not null primary key);
|
||||
connection slave;
|
||||
load table t1 from master;
|
||||
load table t2 from master;
|
||||
load table t3 from master;
|
||||
check table t1;
|
||||
select count(*) from t2;
|
||||
select count(*) from t3;
|
||||
connection master;
|
||||
set SQL_LOG_BIN=1;
|
||||
drop table if exists t1,t2,t3;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
create table t1(n int);
|
||||
drop table t1;
|
||||
|
||||
# End of 4.1 tests
|
@@ -1,2 +0,0 @@
|
||||
let $engine_type=MyISAM;
|
||||
-- source extra/rpl_tests/rpl000006.test
|
@@ -11,7 +11,6 @@
|
||||
# Begin clean up test section
|
||||
--disable_warnings
|
||||
connection master;
|
||||
DROP PROCEDURE IF EXISTS test.p1;
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
--enable_warnings
|
||||
|
||||
@@ -23,18 +22,15 @@ DELETE FROM test.t1;
|
||||
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
|
||||
|
||||
|
||||
connection master;
|
||||
SELECT * FROM test.t1;
|
||||
SELECT * FROM test.t1 ORDER BY a DESC;
|
||||
save_master_pos;
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
SELECT * FROM test.t1;
|
||||
|
||||
SELECT * FROM test.t1 ORDER BY a DESC;
|
||||
connection master;
|
||||
# Lets cleanup
|
||||
#show binlog events;
|
||||
|
||||
DROP PROCEDURE IF EXISTS test.p1;
|
||||
DROP TABLE test.t1;
|
||||
|
||||
# End of 5.0 test case
|
||||
|
1
mysql-test/t/rpl_auto_increment-slave.opt
Normal file
1
mysql-test/t/rpl_auto_increment-slave.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb
|
@@ -58,8 +58,10 @@ let $VERSION=`select version()`;
|
||||
SHOW DATABASES;
|
||||
sync_slave_with_master;
|
||||
SHOW DATABASES;
|
||||
SHOW CREATE TABLE mysqltest_prometheus.t1;
|
||||
SHOW CREATE TABLE mysqltest_sisyfos.t2;
|
||||
USE mysqltest_prometheus;
|
||||
SHOW TABLES;
|
||||
USE mysqltest_sisyfos;
|
||||
SHOW TABLES;
|
||||
|
||||
connection master;
|
||||
DROP DATABASE IF EXISTS mysqltest_prometheus;
|
||||
|
@@ -1,5 +1,11 @@
|
||||
# This one assumes we are ignoring updates on tables in database mysqltest2,
|
||||
# but doing the ones in database mysqltest
|
||||
#################################################################
|
||||
# Change Author: JBM
|
||||
# Change Date: 2006-02-02
|
||||
# Change: Added ENGINE=MyISAM
|
||||
# Reason: LOAD from master is only supported by MyISAM
|
||||
#################################################################
|
||||
|
||||
source include/master-slave.inc;
|
||||
--disable_warnings
|
||||
@@ -19,12 +25,12 @@ save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
create database mysqltest2;
|
||||
create table mysqltest2.foo (n int);
|
||||
create table mysqltest2.foo (n int)ENGINE=MyISAM;
|
||||
insert into mysqltest2.foo values(4);
|
||||
connection master;
|
||||
create table mysqltest2.foo (n int);
|
||||
create table mysqltest2.foo (n int)ENGINE=MyISAM;
|
||||
insert into mysqltest2.foo values(5);
|
||||
create table mysqltest.bar (m int);
|
||||
create table mysqltest.bar (m int)ENGINE=MyISAM;
|
||||
insert into mysqltest.bar values(15);
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
@@ -49,13 +55,13 @@ set sql_log_bin = 0;
|
||||
create database mysqltest2;
|
||||
create database mysqltest;
|
||||
show databases;
|
||||
create table mysqltest2.t1(n int, s char(20));
|
||||
create table mysqltest2.t2(n int, s text);
|
||||
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
create table mysqltest2.t2(n int, s text)ENGINE=MyISAM;
|
||||
insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three');
|
||||
insert into mysqltest2.t2 values (11, 'eleven'), (12, 'twelve'), (13, 'thirteen');
|
||||
|
||||
create table mysqltest.t1(n int, s char(20));
|
||||
create table mysqltest.t2(n int, s text);
|
||||
create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
create table mysqltest.t2(n int, s text)ENGINE=MyISAM;
|
||||
insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three test');
|
||||
insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'),
|
||||
(13, 'thirteen test');
|
||||
@@ -69,21 +75,21 @@ show databases;
|
||||
# Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM
|
||||
# MASTER will neither touch database mysqltest nor mysqltest3
|
||||
create database mysqltest2;
|
||||
create table mysqltest2.t1(n int, s char(20));
|
||||
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest2.t1 values (1, 'original foo.t1');
|
||||
create table mysqltest2.t3(n int, s char(20));
|
||||
create table mysqltest2.t3(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest2.t3 values (1, 'original foo.t3');
|
||||
create database mysqltest3;
|
||||
create table mysqltest3.t1(n int, s char(20));
|
||||
create table mysqltest3.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest3.t1 values (1, 'original foo2.t1');
|
||||
|
||||
# Create mysqltest, and mysqltest.t1, to check that it gets replaced,
|
||||
# and mysqltest.t3 to check that it is not touched (there is no
|
||||
# mysqltest.t3 on master)
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(n int, s char(20));
|
||||
create table mysqltest.t1(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest.t1 values (1, 'original bar.t1');
|
||||
create table mysqltest.t3(n int, s char(20));
|
||||
create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM;
|
||||
insert into mysqltest.t3 values (1, 'original bar.t3');
|
||||
|
||||
load data from master;
|
93
mysql-test/t/rpl_load_table_from_master.test
Normal file
93
mysql-test/t/rpl_load_table_from_master.test
Normal file
@@ -0,0 +1,93 @@
|
||||
###########################################################
|
||||
# Change Author: JBM
|
||||
# Change Date: 2006-2-2
|
||||
# Change: Added ENGINE=$engine_type for first create table
|
||||
# Reason: Only MyISAM supports load from master no need to
|
||||
# run test case for other engines, in addition test will
|
||||
# fail if other engines are set as default engine
|
||||
###########################################################
|
||||
# Change Author: JBM
|
||||
# Change Date: 2006-2-3
|
||||
# Change: removed ENGINE=$engine_type for first create table
|
||||
# and renamed test file to rpl_load_table_from_master.test.
|
||||
# In addition added test requirements.
|
||||
# Reason: Request from review.
|
||||
############################################################
|
||||
# REQUIREMENT TEST 1:
|
||||
# LOAD TABLE FROM MASTER must work with a forced timestamp.
|
||||
#
|
||||
# REQUIREMENTi TEST 2:
|
||||
#LOAD TABLE FROM MASTER must work with table checksum
|
||||
############################################################
|
||||
#
|
||||
# Test forced timestamp
|
||||
#
|
||||
-- source include/master-slave.inc
|
||||
|
||||
# Don't log table creating to the slave as we want to test LOAD TABLE
|
||||
SET SQL_LOG_BIN=0,timestamp=200006;
|
||||
eval CREATE TABLE t1(t TIMESTAMP NOT NULL,a CHAR(1))ENGINE=MyISAM;
|
||||
INSERT INTO t1 ( a) VALUE ('F');
|
||||
select unix_timestamp(t) from t1;
|
||||
connection slave;
|
||||
load table t1 from master;
|
||||
select unix_timestamp(t) from t1;
|
||||
|
||||
# Delete the created table on master and slave
|
||||
connection master;
|
||||
set SQL_LOG_BIN=1,timestamp=default;
|
||||
drop table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
connection master;
|
||||
|
||||
#
|
||||
# Test copying table with checksum
|
||||
#
|
||||
|
||||
# Don't log table creating to the slave as we want to test LOAD TABLE
|
||||
set SQL_LOG_BIN=0;
|
||||
|
||||
eval CREATE TABLE t1 (a INT NOT NULL) ENGINE=MyISAM MAX_ROWS=4000 CHECKSUM=1;
|
||||
INSERT INTO t1 VALUES (1);
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
load table t1 from master;
|
||||
check table t1;
|
||||
drop table t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
|
||||
connection master;
|
||||
set SQL_LOG_BIN=0;
|
||||
create table t1 (word char(20) not null, index(word))ENGINE=MyISAM;
|
||||
load data infile '../../std_data/words.dat' into table t1;
|
||||
create table t2 (word char(20) not null)ENGINE=MyISAM;
|
||||
load data infile '../../std_data/words.dat' into table t2;
|
||||
create table t3 (word char(20) not null primary key)ENGINE=MyISAM;
|
||||
connection slave;
|
||||
load table t1 from master;
|
||||
load table t2 from master;
|
||||
load table t3 from master;
|
||||
check table t1;
|
||||
select count(*) from t2;
|
||||
select count(*) from t3;
|
||||
connection master;
|
||||
set SQL_LOG_BIN=1;
|
||||
drop table if exists t1,t2,t3;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
create table t1(n int);
|
||||
drop table t1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
# End of 4.1 tests
|
1
mysql-test/t/rpl_ndb_auto_inc-master.opt
Normal file
1
mysql-test/t/rpl_ndb_auto_inc-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--auto-increment-increment=10 --auto-increment-offset=2
|
7
mysql-test/t/rpl_ndb_auto_inc.test
Normal file
7
mysql-test/t/rpl_ndb_auto_inc.test
Normal file
@@ -0,0 +1,7 @@
|
||||
#####################################
|
||||
# Wrapper for rpl_auto_increment.test#
|
||||
#####################################
|
||||
-- source include/have_innodb.inc
|
||||
let $engine_type=NDB;
|
||||
let $engine_type2=myisam;
|
||||
-- source extra/rpl_tests/rpl_auto_increment.test
|
11
mysql-test/t/rpl_ndb_func003.test
Normal file
11
mysql-test/t/rpl_ndb_func003.test
Normal file
@@ -0,0 +1,11 @@
|
||||
###################################
|
||||
# Wrapper for rpl_row_func003.test#
|
||||
# This test was orginally designed#
|
||||
# To test InnoDB using RBR, but #
|
||||
# It can also be used to test NDB #
|
||||
# So this wrapper is being used to#
|
||||
# reduce test case code #
|
||||
###################################
|
||||
-- source include/have_ndb.inc
|
||||
let $engine_type=NDB;
|
||||
-- source extra/rpl_tests/rpl_row_func003.test
|
1
mysql-test/t/rpl_ndb_log-master.opt
Normal file
1
mysql-test/t/rpl_ndb_log-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--skip-external-locking
|
12
mysql-test/t/rpl_ndb_log.test
Normal file
12
mysql-test/t/rpl_ndb_log.test
Normal file
@@ -0,0 +1,12 @@
|
||||
###################################
|
||||
# Wrapper for rpl_row_log.test #
|
||||
# Added wrapper so that MyISAM & #
|
||||
# Innodb and NDB could all use the#
|
||||
# Same test. NDB produced a diff #
|
||||
# bin-log #
|
||||
###################################
|
||||
-- source include/have_binlog_format_row.inc
|
||||
-- source include/have_ndb.inc
|
||||
let $engine_type=NDB;
|
||||
-- source extra/rpl_tests/rpl_log.test
|
||||
|
21
mysql-test/t/rpl_ndb_relay_space.test
Normal file
21
mysql-test/t/rpl_ndb_relay_space.test
Normal file
@@ -0,0 +1,21 @@
|
||||
###################################
|
||||
# Wrapper rpl_sv_relay_space.test #
|
||||
# This test has to be wrapped as #
|
||||
# It tests ndb, innodb and MyISAM.#
|
||||
# By Wrapping we are saving some #
|
||||
# space and making the test more #
|
||||
# Maintainable by only having one #
|
||||
# test file and reusing the code #
|
||||
# In Addition, INNODB has to have #
|
||||
# Option files during this test #
|
||||
# to force innodb on the slave #
|
||||
# else the test will fail #
|
||||
###################################
|
||||
#Change Author: JBM #
|
||||
#Change Date: 2006-02-03 #
|
||||
#Change: Added Comments #
|
||||
###################################
|
||||
--source include/have_ndb.inc
|
||||
let $engine_type=NDB;
|
||||
-- source extra/rpl_tests/rpl_sv_relay_space.test
|
||||
|
@@ -32,12 +32,12 @@ insert into t1 values(5);
|
||||
connection master;
|
||||
enable_rpl_parse;
|
||||
# The first of the queries will be sent to the slave, the second to the master.
|
||||
select * from t1;
|
||||
select * from t1;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
disable_rpl_parse;
|
||||
select * from t1;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
connection slave;
|
||||
select * from t1;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
drop table t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
|
1
mysql-test/t/rpl_relay_space_innodb-master.opt
Normal file
1
mysql-test/t/rpl_relay_space_innodb-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb
|
1
mysql-test/t/rpl_relay_space_innodb-slave.opt
Normal file
1
mysql-test/t/rpl_relay_space_innodb-slave.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb
|
21
mysql-test/t/rpl_relay_space_innodb.test
Normal file
21
mysql-test/t/rpl_relay_space_innodb.test
Normal file
@@ -0,0 +1,21 @@
|
||||
###################################
|
||||
# Wrapper rpl_sv_relay_space.test #
|
||||
# This test has to be wrapped as #
|
||||
# It tests ndb, innodb and MyISAM.#
|
||||
# By Wrapping we are saving some #
|
||||
# space and making the test more #
|
||||
# Maintainable by only having one #
|
||||
# test file and reusing the code #
|
||||
# In Addition, INNODB has to have #
|
||||
# Option files during this test #
|
||||
# to force innodb on the slave #
|
||||
# else the test will fail #
|
||||
###################################
|
||||
#Change Author: JBM #
|
||||
#Change Date: 2006-02-03 #
|
||||
#Change: Added Comments #
|
||||
###################################
|
||||
-- source include/have_innodb.inc
|
||||
let $engine_type=InnoDB;
|
||||
-- source extra/rpl_tests/rpl_sv_relay_space.test
|
||||
|
20
mysql-test/t/rpl_relay_space_myisam.test
Normal file
20
mysql-test/t/rpl_relay_space_myisam.test
Normal file
@@ -0,0 +1,20 @@
|
||||
###################################
|
||||
# Wrapper rpl_sv_relay_space.test #
|
||||
# This test has to be wrapped as #
|
||||
# It tests ndb, innodb and MyISAM.#
|
||||
# By Wrapping we are saving some #
|
||||
# space and making the test more #
|
||||
# Maintainable by only having one #
|
||||
# test file and reusing the code #
|
||||
# In Addition, INNODB has to have #
|
||||
# Option files during this test #
|
||||
# to force innodb on the slave #
|
||||
# else the test will fail #
|
||||
###################################
|
||||
#Change Author: JBM #
|
||||
#Change Date: 2006-02-03 #
|
||||
#Change: Added Comments #
|
||||
###################################
|
||||
let $engine_type=MyISAM;
|
||||
-- source extra/rpl_tests/rpl_sv_relay_space.test
|
||||
|
@@ -21,7 +21,7 @@ create table t11 select * from t1;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from t1;
|
||||
select * from t1 ORDER BY m;
|
||||
select * from t2;
|
||||
--error 1146
|
||||
select * from t11;
|
||||
|
1
mysql-test/t/rpl_row_func003-slave.opt
Normal file
1
mysql-test/t/rpl_row_func003-slave.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb
|
@@ -1,4 +1,11 @@
|
||||
# Requires row base logging
|
||||
###################################
|
||||
# Wrapper for rpl_row_log.test #
|
||||
# Added wrapper so that MyISAM & #
|
||||
# Innodb and NDB could all use the#
|
||||
# Same test. NDB produced a diff #
|
||||
# bin-log #
|
||||
###################################
|
||||
-- source include/have_binlog_format_row.inc
|
||||
let $engine_type=MyISAM;
|
||||
-- source extra/rpl_tests/rpl_log.test
|
||||
|
||||
|
1
mysql-test/t/rpl_row_log_innodb-master.opt
Normal file
1
mysql-test/t/rpl_row_log_innodb-master.opt
Normal file
@@ -0,0 +1 @@
|
||||
--skip-external-locking
|
1
mysql-test/t/rpl_row_log_innodb-slave.opt
Normal file
1
mysql-test/t/rpl_row_log_innodb-slave.opt
Normal file
@@ -0,0 +1 @@
|
||||
--innodb
|
12
mysql-test/t/rpl_row_log_innodb.test
Normal file
12
mysql-test/t/rpl_row_log_innodb.test
Normal file
@@ -0,0 +1,12 @@
|
||||
###################################
|
||||
# Wrapper for rpl_row_log.test #
|
||||
# Added wrapper so that MyISAM & #
|
||||
# Innodb and NDB could all use the#
|
||||
# Same test. NDB produced a diff #
|
||||
# bin-log #
|
||||
###################################
|
||||
-- source include/have_binlog_format_row.inc
|
||||
-- source include/have_innodb.inc
|
||||
let $engine_type=InnoDB;
|
||||
-- source extra/rpl_tests/rpl_log.test
|
||||
|
@@ -85,34 +85,34 @@ delimiter ;//
|
||||
|
||||
INSERT INTO test.t2 VALUES(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW'),(NULL,'NEW');
|
||||
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
||||
connection master;
|
||||
call test.p2(1);
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
sync_slave_with_master;
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
||||
|
||||
connection master;
|
||||
call test.p2(2);
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
||||
connection master;
|
||||
call test.p2(3);
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
select * from test.t2;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
||||
##Used for debugging
|
||||
#show binlog events;
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# drop table t1 t2 t3 are included int master-slave.inc
|
||||
# Like rpl000013, meaningful only in statement-based:
|
||||
# meaningful only in statement-based:
|
||||
|
||||
-- source include/have_binlog_format_statement.inc
|
||||
# Should work on both stm and row
|
||||
-- source include/master-slave.inc
|
||||
|
||||
|
Reference in New Issue
Block a user