mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
WL#3228 (NDB) : RBR using different table defs on slave/master
This patch adds the ability to store extra field metadata in the table map event. This data can include pack_length() or field_lenght() for fields such as CHAR or VARCHAR enabling developers to add code that can check for compatibilty between master and slave columns. More importantly, the extra field metadata can be used to store data from the master correctly should a VARCHAR field on the master be <= 255 bytes while the same field on the slave is > 255 bytes. The patch also includes the needed changes to unpack to ensure that data which is smaller on the master can be unpacked correctly on the slave. WL#3915 : (NDB) master's cols > slave Slave starts accepting and handling rows of master's tables which have more columns. The most important part of implementation is how to caclulate the amount of bytes to skip for unknown by slave column. mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test: WL#3228 : RBR using different table defs on slave/master This patch changes the test to coincide with changes to binlog size of table map event. mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_create_table.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_log.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_log_innodb.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_max_relay_size.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_tabledefs_2myisam.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_tabledefs_3innodb.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_row_until.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/r/rpl_skip_error.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/t/disabled.def: WL#3915 master's cols > slave Disabled the rpl_stm_extraColmaster_ndb test because statement-based replication is not supported in NDB at this time. It can be enabled when statement-based replication for NDB is released. mysql-test/suite/rpl/t/rpl_row_create_table.test: WL#3228 : RBR using different table defs on slave/master This patch corrects binlog positions a result of the change to the size of the tablemap log event. mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: WL#3228 : RBR using different table defs on slave/master This patch corrects binlog positions a result of the change to the size of the tablemap log event. mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result: WL#3228 : RBR using different table defs on slave/master This patch contains a new result file as a result of the change to the size of the tablemap log event. sql/field.cc: WL#3228 : RBR using different table defs on slave/master This patch includes updates to the unpack() methods for the variable length fields. A new parameter was added (from_length) that is the value stored in the field_metadata of the table map from the table_def class. If the value is non-zero and less than what the field on the slave is then use the from_length else use the original value from the field on the slave. sql/field.h: L#3228 : RBR using different table defs on slave/master This patch includes updates to the unpack() methods for the variable length fields. A new parameter was added (from_length) that is the value stored in the field_metadata of the table map from the table_def class. sql/log_event.cc: WL#3228 : RBR using different table defs on slave/master This patch adds methods to calculate the field metadata size, prepare the field metadata for writing to the binlog, and additions to the Table_map_log_event::write_body method to include the field metadata in the table map that is written to the binlog. WL#3915 master's cols > slave copying extra (slave's) fields returns early if master's table version is wider; removing assert in the way of master > slave cols. sql/log_event.h: WL#3228 : RBR using different table defs on slave/master This patch adds method declarations and variables needed to support storing field metadata in the table map that is written to the binlog. sql/rpl_record.cc: WL#3228 : RBR using different table defs on slave/master This patch modifies the unpack_row() method to unpack fields passing in the value from the table_def class. This value is the extra field metadata stored there from the master. WL#3915 master's cols > slave adding a snippet that shift exectution curson donw the row skipping unknown by slave fields' data. sql/rpl_rli.h: WL#3228 : RBR using different table defs on slave/master This patch adds a helper function to retrieve the table_def for a given table in the RPL_TABLE_LIST structure. sql/rpl_utility.cc: WL#3228 : RBR using different table defs on slave/master This patch adds a helper method that retrieves the correct size parameter for the field. This method is used to compare the size as sent by the master with that on the slave for all types of fields that can vary in size and storage requirements. WL#3915 master's cols > slave Remove warning message for master's cols > slave. sql/rpl_utility.h: WL#3228 : RBR using different table defs on slave/master This patch changes the table_def class constructor to pass in the raw data read from the table map and extract it into an array of dimension size (number of fields). It also adds a method to return the field metadata for any field. The method returns the data stored in the table map or 0 if no data was stored for that field. Lastly, a method to return the results of field->maybe_null() is included so that the slave can determine if a field that is not on the slave is null. mysql-test/suite/rpl/t/rpl_colSize.test: WL#3228 : RBR using different table defs on slave/master This patch contains a new test designed to test the feature of having columns on the master that are smaller than what is on the slave. mysql-test/suite/rpl/t/rpl_extraColmaster_innodb-master.opt: WL#3915 master's cols > slave option for innodb mysql-test/suite/rpl/t/rpl_extraColmaster_innodb-slave.opt: WL#3915 master's cols > slave option for innodb mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test: WL#3915 master's cols > slave Test of innodb. Test runs in both statement- and row-based replication. mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test: WL#3915 master's cols > slave Test of myisam. Test runs in both statement- and row-based replication. mysql-test/suite/rpl/r/rpl_colSize.result: WL#3228 : RBR using different table defs on slave/master This patch contains a result file for the new test designed to test the feature of having columns on the master that are smaller than what is on the slave. mysql-test/suite/rpl/t/rpl_row_extraColmaster_ndb.test: WL#3915 master's cols > slave Test of ndb. Test runs in row-based replication. mysql-test/suite/rpl/t/rpl_stm_extraColmaster_ndb.test: WL#3915 master's cols > slave Test of ndb. Test runs in statement-based replication. mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result: WL#3915 master's cols > slave new results mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result: WL#3915 master's cols > slave new results mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test: WL#3915 master's cols > slave basic tests checking altering and skipping extra fields by slave. The fields can be of any possible types. mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result: WL#3915 master's cols > slave new results
This commit is contained in:
393
mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
Normal file
393
mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
Normal file
@ -0,0 +1,393 @@
|
||||
#############################################################
|
||||
# Purpose: To test having extra columns on the master WL#3915
|
||||
# engine inspecific sourced part
|
||||
#############################################################
|
||||
|
||||
# TODO: partition specific
|
||||
# -- source include/have_partition.inc
|
||||
|
||||
########### Clean up ################
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
DROP TABLE IF EXISTS t1,t2,t3,t4,t31;
|
||||
|
||||
--enable_query_log
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Setup differently defined tables on master and slave
|
||||
#
|
||||
|
||||
# Def on master: t (f_1 type_m_1,... f_s type_m_s, f_s1, f_m)
|
||||
# Def on slave: t (f_1 type_s_1,... f_s type_s_s)
|
||||
# where type_mi,type_si (0 < i-1 <s1) pairs are compatible types (WL#3228)
|
||||
# Arbitrary paramaters of the test are:
|
||||
# 1. the tables type
|
||||
# 2. the types of the extra master's column f_s1,..., f_m
|
||||
# 3. the numbers of common columns `s'
|
||||
# 4. and extra columns `m' are par
|
||||
#
|
||||
# optionally
|
||||
#
|
||||
# 5. vary the common columns type within compatible ranges.
|
||||
|
||||
#
|
||||
# constant size column type:
|
||||
|
||||
#BIGINT
|
||||
#BLOB
|
||||
#DATE
|
||||
#DATETIME
|
||||
#FLOAT
|
||||
#INT, INTEGER
|
||||
#LONGBLOB
|
||||
#LONGTEXT
|
||||
#MEDIUMBLOB
|
||||
#MEDIUMINT
|
||||
#MEDIUMTEXT
|
||||
#REAL
|
||||
#SMALLINT
|
||||
#TEXT
|
||||
#TIME
|
||||
#TIMESTAMP
|
||||
#TINYBLOB
|
||||
#TINYINT
|
||||
#TINYTEXT
|
||||
#YEAR
|
||||
|
||||
# variable size column types:
|
||||
|
||||
#BINARY(M)
|
||||
#BIT(M)
|
||||
#CHAR(M)
|
||||
#DECIMAL(M,D)
|
||||
#DOUBLE[P]
|
||||
#ENUM
|
||||
#FLOAT(p)
|
||||
#NUMERIC(M,D)
|
||||
#SET
|
||||
#VARBINARY(M)
|
||||
#VARCHAR(M)
|
||||
#
|
||||
|
||||
|
||||
connection master;
|
||||
eval CREATE TABLE t1 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
|
||||
/* extra */
|
||||
f5 FLOAT DEFAULT '2.00',
|
||||
f6 CHAR(4) DEFAULT 'TEST',
|
||||
f7 INT DEFAULT '0',
|
||||
f8 TEXT,
|
||||
f9 LONGBLOB,
|
||||
f10 BIT(63),
|
||||
f11 VARBINARY(64))
|
||||
ENGINE=$engine_type;
|
||||
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
alter table t1 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
|
||||
|
||||
connection master;
|
||||
|
||||
INSERT into t1 values (1, 1, 1, 'first', 1.0, 'yksi', 1, 'lounge of happiness', 'very fat blob', b'01010101010101', 0x123456);
|
||||
INSERT into t1 values (2, 2, 2, 'second', 2.0, 'kaks', 2, 'got stolen from the paradise', 'very fat blob', b'01010101010101', 0x123456), (3, 3, 3, 'third', 3.0, 'kolm', 3, 'got stolen from the paradise', 'very fat blob', b'01010101010101', 0x123456);
|
||||
update t1 set f4= 'next' where f1=1;
|
||||
delete from t1 where f1=1;
|
||||
|
||||
select * from t1 order by f3;
|
||||
|
||||
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
|
||||
--query_vertical show slave status;
|
||||
select * from t1 order by f3;
|
||||
|
||||
|
||||
### Altering table def scenario
|
||||
|
||||
connection master;
|
||||
|
||||
eval CREATE TABLE t2 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
|
||||
/* extra */
|
||||
f5 DOUBLE DEFAULT '2.00',
|
||||
f6 ENUM('a', 'b', 'c') default 'a',
|
||||
f7 DECIMAL(17,9) default '1000.00',
|
||||
f8 MEDIUMBLOB,
|
||||
f9 NUMERIC(6,4) default '2000.00',
|
||||
f10 VARCHAR(1024),
|
||||
f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
f12 SET('a', 'b', 'c') default 'b')
|
||||
ENGINE=$engine_type;
|
||||
|
||||
eval CREATE TABLE t3 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
|
||||
/* extra */
|
||||
f5 DOUBLE DEFAULT '2.00',
|
||||
f6 ENUM('a', 'b', 'c') default 'a',
|
||||
f8 MEDIUMBLOB,
|
||||
f10 VARCHAR(1024),
|
||||
f11 BINARY(20) NOT NULL DEFAULT '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
f12 SET('a', 'b', 'c') default 'b')
|
||||
ENGINE=$engine_type;
|
||||
|
||||
|
||||
# no ENUM and SET
|
||||
eval CREATE TABLE t4 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
|
||||
/* extra */
|
||||
f5 DOUBLE DEFAULT '2.00',
|
||||
f6 DECIMAL(17,9) default '1000.00',
|
||||
f7 MEDIUMBLOB,
|
||||
f8 NUMERIC(6,4) default '2000.00',
|
||||
f9 VARCHAR(1024),
|
||||
f10 BINARY(20) not null default '\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0',
|
||||
f11 CHAR(255))
|
||||
ENGINE=$engine_type;
|
||||
|
||||
|
||||
eval CREATE TABLE t31 (f1 INT, f2 INT, f3 INT PRIMARY KEY, f4 CHAR(20),
|
||||
|
||||
/* extra */
|
||||
|
||||
f5 BIGINT,
|
||||
f6 BLOB,
|
||||
f7 DATE,
|
||||
f8 DATETIME,
|
||||
f9 FLOAT,
|
||||
f10 INT,
|
||||
f11 LONGBLOB,
|
||||
f12 LONGTEXT,
|
||||
f13 MEDIUMBLOB,
|
||||
f14 MEDIUMINT,
|
||||
f15 MEDIUMTEXT,
|
||||
f16 REAL,
|
||||
f17 SMALLINT,
|
||||
f18 TEXT,
|
||||
f19 TIME,
|
||||
f20 TIMESTAMP,
|
||||
f21 TINYBLOB,
|
||||
f22 TINYINT,
|
||||
f23 TINYTEXT,
|
||||
f24 YEAR,
|
||||
f25 BINARY(255),
|
||||
f26 BIT(64),
|
||||
f27 CHAR(255),
|
||||
f28 DECIMAL(30,7),
|
||||
f29 DOUBLE,
|
||||
f30 ENUM ('a','b', 'c') default 'a',
|
||||
f31 FLOAT,
|
||||
f32 NUMERIC(17,9),
|
||||
f33 SET ('a', 'b', 'c') default 'b',
|
||||
f34 VARBINARY(1025),
|
||||
f35 VARCHAR(257)
|
||||
) ENGINE=$engine_type;
|
||||
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
alter table t2 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11, drop
|
||||
f12;
|
||||
alter table t3 drop f5, drop f6, drop f8, drop f10, drop f11, drop f12;
|
||||
alter table t4 drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11;
|
||||
|
||||
alter table t31
|
||||
drop f5, drop f6, drop f7, drop f8, drop f9, drop f10, drop f11,
|
||||
drop f12, drop f13, drop f14, drop f15, drop f16, drop f17, drop f18,
|
||||
drop f19, drop f20, drop f21, drop f22, drop f23, drop f24, drop f25,
|
||||
drop f26, drop f27, drop f28, drop f29, drop f30, drop f31, drop f32,
|
||||
drop f33, drop f34, drop f35;
|
||||
|
||||
|
||||
|
||||
connection master;
|
||||
INSERT into t2 set f1=1, f2=1, f3=1, f4='first', f8='f8: medium size blob', f10='f10:
|
||||
some var char';
|
||||
INSERT into t2 values (2, 2, 2, 'second',
|
||||
2.0, 'b', 2000.0002, 'f8: medium size blob', 2000, 'f10: some var char',
|
||||
'01234567', 'c'),
|
||||
(3, 3, 3, 'third',
|
||||
3.0, 'b', 3000.0003, 'f8: medium size blob', 3000, 'f10: some var char',
|
||||
'01234567', 'c');
|
||||
INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
|
||||
INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
|
||||
binary data';
|
||||
INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
|
||||
INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
|
||||
f9=2.2, f10='seven samurai', f28=222.222, f35='222';
|
||||
INSERT into t31 values (1, 1, 3, 'third',
|
||||
/* f5 BIGINT, */ 333333333333333333333333,
|
||||
/* f6 BLOB, */ '3333333333333333333333',
|
||||
/* f7 DATE, */ '2007-07-18',
|
||||
/* f8 DATETIME, */ "2007-07-18",
|
||||
/* f9 FLOAT, */ 3.33333333,
|
||||
/* f10 INT, */ 333333333,
|
||||
/* f11 LONGBLOB, */ '3333333333333333333',
|
||||
/* f12 LONGTEXT, */ '3333333333333333333',
|
||||
/* f13 MEDIUMBLOB, */ '3333333333333333333',
|
||||
/* f14 MEDIUMINT, */ 33,
|
||||
/* f15 MEDIUMTEXT, */ 3.3,
|
||||
/* f16 REAL, */ 3.3,
|
||||
/* f17 SMALLINT, */ 3,
|
||||
/* f18 TEXT, */ '33',
|
||||
/* f19 TIME, */ '2:59:58.999',
|
||||
/* f20 TIMESTAMP, */ 20000303000000,
|
||||
/* f21 TINYBLOB, */ '3333',
|
||||
/* f22 TINYINT, */ 3,
|
||||
/* f23 TINYTEXT, */ '3',
|
||||
/* f24 YEAR, */ 3000,
|
||||
/* f25 BINARY(255), */ 'three_33333',
|
||||
/* f26 BIT(64), */ b'011',
|
||||
/* f27 CHAR(255), */ 'three',
|
||||
/* f28 DECIMAL(30,7), */ 3.333,
|
||||
/* f29 DOUBLE, */ 3.333333333333333333333333333,
|
||||
/* f30 ENUM ('a','b','c')*/ 'c',
|
||||
/* f31 FLOAT, */ 3.0,
|
||||
/* f32 NUMERIC(17,9), */ 3.3333,
|
||||
/* f33 SET ('a','b','c'),*/ 'c',
|
||||
/*f34 VARBINARY(1025),*/ '3333 minus 3',
|
||||
/*f35 VARCHAR(257),*/ 'three times three'
|
||||
);
|
||||
|
||||
INSERT into t31 values (1, 1, 4, 'fourth',
|
||||
/* f5 BIGINT, */ 333333333333333333333333,
|
||||
/* f6 BLOB, */ '3333333333333333333333',
|
||||
/* f7 DATE, */ '2007-07-18',
|
||||
/* f8 DATETIME, */ "2007-07-18",
|
||||
/* f9 FLOAT, */ 3.33333333,
|
||||
/* f10 INT, */ 333333333,
|
||||
/* f11 LONGBLOB, */ '3333333333333333333',
|
||||
/* f12 LONGTEXT, */ '3333333333333333333',
|
||||
/* f13 MEDIUMBLOB, */ '3333333333333333333',
|
||||
/* f14 MEDIUMINT, */ 33,
|
||||
/* f15 MEDIUMTEXT, */ 3.3,
|
||||
/* f16 REAL, */ 3.3,
|
||||
/* f17 SMALLINT, */ 3,
|
||||
/* f18 TEXT, */ '33',
|
||||
/* f19 TIME, */ '2:59:58.999',
|
||||
/* f20 TIMESTAMP, */ 20000303000000,
|
||||
/* f21 TINYBLOB, */ '3333',
|
||||
/* f22 TINYINT, */ 3,
|
||||
/* f23 TINYTEXT, */ '3',
|
||||
/* f24 YEAR, */ 3000,
|
||||
/* f25 BINARY(255), */ 'three_33333',
|
||||
/* f26 BIT(64), */ b'011',
|
||||
/* f27 CHAR(255), */ 'three',
|
||||
/* f28 DECIMAL(30,7), */ 3.333,
|
||||
/* f29 DOUBLE, */ 3.333333333333333333333333333,
|
||||
/* f30 ENUM ('a','b','c')*/ 'c',
|
||||
/* f31 FLOAT, */ 3.0,
|
||||
/* f32 NUMERIC(17,9), */ 3.3333,
|
||||
/* f33 SET ('a','b','c'),*/ 'c',
|
||||
/*f34 VARBINARY(1025),*/ '3333 minus 3',
|
||||
/*f35 VARCHAR(257),*/ 'three times three'
|
||||
),
|
||||
(1, 1, 5, 'fifth',
|
||||
/* f5 BIGINT, */ 333333333333333333333333,
|
||||
/* f6 BLOB, */ '3333333333333333333333',
|
||||
/* f7 DATE, */ '2007-07-18',
|
||||
/* f8 DATETIME, */ "2007-07-18",
|
||||
/* f9 FLOAT, */ 3.33333333,
|
||||
/* f10 INT, */ 333333333,
|
||||
/* f11 LONGBLOB, */ '3333333333333333333',
|
||||
/* f12 LONGTEXT, */ '3333333333333333333',
|
||||
/* f13 MEDIUMBLOB, */ '3333333333333333333',
|
||||
/* f14 MEDIUMINT, */ 33,
|
||||
/* f15 MEDIUMTEXT, */ 3.3,
|
||||
/* f16 REAL, */ 3.3,
|
||||
/* f17 SMALLINT, */ 3,
|
||||
/* f18 TEXT, */ '33',
|
||||
/* f19 TIME, */ '2:59:58.999',
|
||||
/* f20 TIMESTAMP, */ 20000303000000,
|
||||
/* f21 TINYBLOB, */ '3333',
|
||||
/* f22 TINYINT, */ 3,
|
||||
/* f23 TINYTEXT, */ '3',
|
||||
/* f24 YEAR, */ 3000,
|
||||
/* f25 BINARY(255), */ 'three_33333',
|
||||
/* f26 BIT(64), */ b'011',
|
||||
/* f27 CHAR(255), */ 'three',
|
||||
/* f28 DECIMAL(30,7), */ 3.333,
|
||||
/* f29 DOUBLE, */ 3.333333333333333333333333333,
|
||||
/* f30 ENUM ('a','b','c')*/ 'c',
|
||||
/* f31 FLOAT, */ 3.0,
|
||||
/* f32 NUMERIC(17,9), */ 3.3333,
|
||||
/* f33 SET ('a','b','c'),*/ 'c',
|
||||
/*f34 VARBINARY(1025),*/ '3333 minus 3',
|
||||
/*f35 VARCHAR(257),*/ 'three times three'
|
||||
),
|
||||
(1, 1, 6, 'sixth',
|
||||
/* f5 BIGINT, */ NULL,
|
||||
/* f6 BLOB, */ '3333333333333333333333',
|
||||
/* f7 DATE, */ '2007-07-18',
|
||||
/* f8 DATETIME, */ "2007-07-18",
|
||||
/* f9 FLOAT, */ 3.33333333,
|
||||
/* f10 INT, */ 333333333,
|
||||
/* f11 LONGBLOB, */ '3333333333333333333',
|
||||
/* f12 LONGTEXT, */ '3333333333333333333',
|
||||
/* f13 MEDIUMBLOB, */ '3333333333333333333',
|
||||
/* f14 MEDIUMINT, */ 33,
|
||||
/* f15 MEDIUMTEXT, */ 3.3,
|
||||
/* f16 REAL, */ 3.3,
|
||||
/* f17 SMALLINT, */ 3,
|
||||
/* f18 TEXT, */ '33',
|
||||
/* f19 TIME, */ '2:59:58.999',
|
||||
/* f20 TIMESTAMP, */ 20000303000000,
|
||||
/* f21 TINYBLOB, */ '3333',
|
||||
/* f22 TINYINT, */ 3,
|
||||
/* f23 TINYTEXT, */ '3',
|
||||
/* f24 YEAR, */ 3000,
|
||||
/* f25 BINARY(255), */ 'three_33333',
|
||||
/* f26 BIT(64), */ b'011',
|
||||
/* f27 CHAR(255), */ 'three',
|
||||
/* f28 DECIMAL(30,7), */ 3.333,
|
||||
/* f29 DOUBLE, */ 3.333333333333333333333333333,
|
||||
/* f30 ENUM ('a','b','c')*/ 'c',
|
||||
/* f31 FLOAT, */ 3.0,
|
||||
/* f32 NUMERIC(17,9), */ 3.3333,
|
||||
/* f33 SET ('a','b','c'),*/ 'c',
|
||||
/*f34 VARBINARY(1025),*/ '3333 minus 3',
|
||||
/*f35 VARCHAR(257),*/ NULL
|
||||
);
|
||||
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
|
||||
select * from t1 order by f3;
|
||||
select * from t2 order by f1;
|
||||
select * from t3 order by f1;
|
||||
select * from t4 order by f1;
|
||||
select * from t31 order by f1;
|
||||
|
||||
connection master;
|
||||
|
||||
update t31 set f5=555555555555555 where f3=6;
|
||||
update t31 set f2=2 where f3=2;
|
||||
update t31 set f1=NULL where f3=1;
|
||||
update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
|
||||
|
||||
delete from t1;
|
||||
delete from t2;
|
||||
delete from t3;
|
||||
delete from t4;
|
||||
delete from t31;
|
||||
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
select * from t31;
|
||||
|
||||
--replace_result $MASTER_MYPORT MASTER_PORT
|
||||
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
|
||||
--query_vertical show slave status;
|
||||
|
||||
#### Clean Up ####
|
||||
|
||||
connection master;
|
||||
--disable_warnings
|
||||
--disable_query_log
|
||||
DROP TABLE t1,t2,t3,t4,t31;
|
||||
|
||||
#connection slave;
|
||||
sync_slave_with_master;
|
||||
--enable_query_log
|
||||
--enable_warnings
|
||||
|
||||
# END of the tests
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
|
||||
# and does not make slave to stop)
|
||||
flush logs;
|
||||
--exec $MYSQL_BINLOG --start-position=520 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
|
||||
--exec $MYSQL_BINLOG --start-position=524 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval select
|
||||
(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
|
||||
|
179
mysql-test/suite/rpl/r/rpl_colSize.result
Normal file
179
mysql-test/suite/rpl/r/rpl_colSize.result
Normal file
@ -0,0 +1,179 @@
|
||||
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 TABLE IF EXISTS t1;
|
||||
**** Testing WL#3228 changes. ****
|
||||
*** Create "wider" table on slave ***
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
CREATE TABLE t1 (
|
||||
a float (47),
|
||||
b double (143,9),
|
||||
c decimal (65,30),
|
||||
d numeric (4,0),
|
||||
e bit (32),
|
||||
f char (21),
|
||||
g varchar (1300),
|
||||
h binary (33),
|
||||
j varbinary (200),
|
||||
k enum ('5','6','7', '8','9','0'),
|
||||
l set ('1','2','3','4','5','6','7','8','9','0','11','12','13','14','15','16','17','18','19','21','22','23','24','25','26','27','28','29'),
|
||||
m TINYBLOB,
|
||||
n BLOB,
|
||||
o MEDIUMBLOB,
|
||||
p LONGBLOB,
|
||||
q TINYTEXT,
|
||||
r TEXT,
|
||||
s MEDIUMTEXT,
|
||||
t LONGTEXT
|
||||
);
|
||||
*** Create same table on master but with narrow columns ***
|
||||
CREATE TABLE t1 (
|
||||
a float (44),
|
||||
b double (10,3),
|
||||
c decimal (10,2),
|
||||
d numeric (3,0),
|
||||
e bit (16),
|
||||
f char (10),
|
||||
g varchar (100),
|
||||
h binary (20),
|
||||
j varbinary (20),
|
||||
k enum ('5','6','7'),
|
||||
l set ('1','2','3','4','5','6','7','8','9','0'),
|
||||
m TINYBLOB,
|
||||
n BLOB,
|
||||
o MEDIUMBLOB,
|
||||
p LONGBLOB,
|
||||
q TINYTEXT,
|
||||
r TEXT,
|
||||
s MEDIUMTEXT,
|
||||
t LONGTEXT
|
||||
);
|
||||
RESET MASTER;
|
||||
*** Start replication ***
|
||||
START SLAVE;
|
||||
*** Insert data on master and display it. ***
|
||||
INSERT INTO t1 () VALUES (
|
||||
17.567,
|
||||
2.123,
|
||||
10.20,
|
||||
125,
|
||||
hex(64),
|
||||
'TEST',
|
||||
'This is a test',
|
||||
'binary data',
|
||||
'more binary data',
|
||||
'6',
|
||||
'7',
|
||||
"blob 1",
|
||||
"blob 2",
|
||||
"blob 3",
|
||||
"blob 4",
|
||||
"text 1",
|
||||
"text 2",
|
||||
"text 3",
|
||||
"text 4");
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b c d e f g h j k l m n o p q r s t
|
||||
17.567 2.123 10.20 125 # TEST This is a test # more binary data 6 7 blob 1 blob 2 blob 3 blob 4 text 1 text 2 text 3 text 4
|
||||
*** Select data from slave to compare ***
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b c d e f g h j k l m n o p q r s t
|
||||
17.567 2.123000000 10.200000000000000000000000000000 125 # TEST This is a test # more binary data 6 7 blob 1 blob 2 blob 3 blob 4 text 1 text 2 text 3 text 4
|
||||
DROP TABLE t1;
|
||||
Create varchar table on master
|
||||
CREATE TABLE t1 (
|
||||
a VARCHAR(50),
|
||||
b VARCHAR(100),
|
||||
c VARCHAR(300),
|
||||
d CHAR(5)
|
||||
);
|
||||
Alter varchar table on slave
|
||||
ALTER TABLE t1 CHANGE COLUMN a a VARCHAR(100);
|
||||
ALTER TABLE t1 CHANGE COLUMN b b VARCHAR(400);
|
||||
ALTER TABLE t1 CHANGE COLUMN c c VARCHAR(500);
|
||||
ALTER TABLE t1 CHANGE COLUMN d d CHAR(100);
|
||||
Insert some values and select them on master
|
||||
INSERT INTO t1 VALUES ("This is a test of col a.",
|
||||
"This is another test of col b.",
|
||||
"This is a test of the large col c.",
|
||||
"Col d");
|
||||
SELECT * FROM t1;
|
||||
a b c d
|
||||
This is a test of col a. This is another test of col b. This is a test of the large col c. Col d
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(50) DEFAULT NULL,
|
||||
`b` varchar(100) DEFAULT NULL,
|
||||
`c` varchar(300) DEFAULT NULL,
|
||||
`d` char(5) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
Insert some values and select them on slave
|
||||
SELECT * FROM t1;
|
||||
a b c d
|
||||
This is a test of col a. This is another test of col b. This is a test of the large col c. Col d
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` varchar(100) DEFAULT NULL,
|
||||
`b` varchar(400) DEFAULT NULL,
|
||||
`c` varchar(500) DEFAULT NULL,
|
||||
`d` char(100) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
DROP TABLE t1;
|
||||
Create bit table on master
|
||||
CREATE TABLE t1 (
|
||||
a BIT(7),
|
||||
b BIT(8),
|
||||
c BIT(21),
|
||||
d BIT(11),
|
||||
e BIT(11)
|
||||
);
|
||||
Create bit table on slave
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
a BIT(16),
|
||||
b BIT(22),
|
||||
c BIT(54),
|
||||
d BIT(25),
|
||||
e BIT(13)
|
||||
);
|
||||
Insert some values and select them on master
|
||||
INSERT INTO t1 VALUES (
|
||||
b'1010101',
|
||||
b'10101011',
|
||||
b'101010110101010101111',
|
||||
b'10101010101',
|
||||
b'10101011111'
|
||||
);
|
||||
SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
|
||||
BIN(a) BIN(b) BIN(c) BIN(d) BIN(e)
|
||||
1010101 10101011 101010110101010101111 10101010101 10101011111
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(7) DEFAULT NULL,
|
||||
`b` bit(8) DEFAULT NULL,
|
||||
`c` bit(21) DEFAULT NULL,
|
||||
`d` bit(11) DEFAULT NULL,
|
||||
`e` bit(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
Insert some values and select them on master
|
||||
SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
|
||||
BIN(a) BIN(b) BIN(c) BIN(d) BIN(e)
|
||||
1010101 10101011 101010110101010101111 10101010101 10101011111
|
||||
SHOW CREATE TABLE t1;
|
||||
Table Create Table
|
||||
t1 CREATE TABLE `t1` (
|
||||
`a` bit(16) DEFAULT NULL,
|
||||
`b` bit(22) DEFAULT NULL,
|
||||
`c` bit(54) DEFAULT NULL,
|
||||
`d` bit(25) DEFAULT NULL,
|
||||
`e` bit(13) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
*** Cleanup ***
|
||||
DROP TABLE t1;
|
BIN
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
Normal file
BIN
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result
Normal file
Binary file not shown.
BIN
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
Normal file
BIN
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result
Normal file
Binary file not shown.
@ -56,8 +56,8 @@ SHOW BINLOG EVENTS;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 106 Query 1 192 use `test`; CREATE TABLE t1 (a INT)
|
||||
master-bin.000001 192 Table_map 1 231 table_id: # (test.t1)
|
||||
master-bin.000001 231 Write_rows 1 270 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 192 Table_map 1 233 table_id: # (test.t1)
|
||||
master-bin.000001 233 Write_rows 1 272 table_id: # flags: STMT_END_F
|
||||
DROP TABLE t1;
|
||||
================ Test for BUG#17620 ================
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
|
@ -127,7 +127,7 @@ NULL 5 10
|
||||
NULL 6 12
|
||||
CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
||||
ERROR 23000: Duplicate entry '2' for key 'b'
|
||||
SHOW BINLOG EVENTS FROM 1098;
|
||||
SHOW BINLOG EVENTS FROM 1100;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
||||
INSERT INTO t7 SELECT a,b FROM tt3;
|
||||
@ -137,11 +137,11 @@ a b
|
||||
1 2
|
||||
2 4
|
||||
3 6
|
||||
SHOW BINLOG EVENTS FROM 1098;
|
||||
SHOW BINLOG EVENTS FROM 1100;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1098 Query # 1198 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
|
||||
# 1198 Table_map # 1238 table_id: # (test.t7)
|
||||
# 1238 Write_rows # 1294 table_id: # flags: STMT_END_F
|
||||
# 1100 Query # 1200 use `test`; CREATE TABLE t7 (a INT, b INT UNIQUE)
|
||||
# 1200 Table_map # 1242 table_id: # (test.t7)
|
||||
# 1242 Write_rows # 1298 table_id: # flags: STMT_END_F
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
a b
|
||||
1 2
|
||||
@ -154,10 +154,10 @@ INSERT INTO t7 SELECT a,b FROM tt4;
|
||||
ROLLBACK;
|
||||
Warnings:
|
||||
Warning 1196 Some non-transactional changed tables couldn't be rolled back
|
||||
SHOW BINLOG EVENTS FROM 1294;
|
||||
SHOW BINLOG EVENTS FROM 1298;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1294 Table_map # 1334 table_id: # (test.t7)
|
||||
# 1334 Write_rows # 1390 table_id: # flags: STMT_END_F
|
||||
# 1298 Table_map # 1340 table_id: # (test.t7)
|
||||
# 1340 Write_rows # 1396 table_id: # flags: STMT_END_F
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
a b
|
||||
1 2
|
||||
@ -192,10 +192,10 @@ Create Table CREATE TABLE `t9` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1
|
||||
SHOW BINLOG EVENTS FROM 1390;
|
||||
SHOW BINLOG EVENTS FROM 1396;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 1390 Query # 1476 use `test`; CREATE TABLE t8 LIKE t4
|
||||
# 1476 Query # 1615 use `test`; CREATE TABLE `t9` (
|
||||
# 1396 Query # 1482 use `test`; CREATE TABLE t8 LIKE t4
|
||||
# 1482 Query # 1621 use `test`; CREATE TABLE `t9` (
|
||||
`a` int(11) DEFAULT NULL,
|
||||
`b` int(11) DEFAULT NULL
|
||||
)
|
||||
@ -276,31 +276,31 @@ SHOW BINLOG EVENTS;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 4 Format_desc # 106 Server ver: #, Binlog ver: #
|
||||
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
|
||||
# 192 Table_map # 231 table_id: # (test.t1)
|
||||
# 231 Write_rows # 275 table_id: # flags: STMT_END_F
|
||||
# 275 Query # 343 use `test`; BEGIN
|
||||
# 343 Query # 468 use `test`; CREATE TABLE `t2` (
|
||||
# 192 Table_map # 233 table_id: # (test.t1)
|
||||
# 233 Write_rows # 277 table_id: # flags: STMT_END_F
|
||||
# 277 Query # 345 use `test`; BEGIN
|
||||
# 345 Query # 470 use `test`; CREATE TABLE `t2` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB
|
||||
# 468 Table_map # 507 table_id: # (test.t2)
|
||||
# 507 Write_rows # 551 table_id: # flags: STMT_END_F
|
||||
# 551 Xid # 578 COMMIT /* XID */
|
||||
# 578 Query # 646 use `test`; BEGIN
|
||||
# 646 Query # 771 use `test`; CREATE TABLE `t3` (
|
||||
# 470 Table_map # 511 table_id: # (test.t2)
|
||||
# 511 Write_rows # 555 table_id: # flags: STMT_END_F
|
||||
# 555 Xid # 582 COMMIT /* XID */
|
||||
# 582 Query # 650 use `test`; BEGIN
|
||||
# 650 Query # 775 use `test`; CREATE TABLE `t3` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB
|
||||
# 771 Table_map # 810 table_id: # (test.t3)
|
||||
# 810 Write_rows # 854 table_id: # flags: STMT_END_F
|
||||
# 854 Xid # 881 COMMIT /* XID */
|
||||
# 881 Query # 949 use `test`; BEGIN
|
||||
# 949 Query # 1074 use `test`; CREATE TABLE `t4` (
|
||||
# 775 Table_map # 816 table_id: # (test.t3)
|
||||
# 816 Write_rows # 860 table_id: # flags: STMT_END_F
|
||||
# 860 Xid # 887 COMMIT /* XID */
|
||||
# 887 Query # 955 use `test`; BEGIN
|
||||
# 955 Query # 1080 use `test`; CREATE TABLE `t4` (
|
||||
`a` int(11) DEFAULT NULL
|
||||
) ENGINE=InnoDB
|
||||
# 1074 Table_map # 1113 table_id: # (test.t4)
|
||||
# 1113 Write_rows # 1157 table_id: # flags: STMT_END_F
|
||||
# 1157 Xid # 1184 COMMIT /* XID */
|
||||
# 1184 Table_map # 1223 table_id: # (test.t1)
|
||||
# 1223 Write_rows # 1267 table_id: # flags: STMT_END_F
|
||||
# 1080 Table_map # 1121 table_id: # (test.t4)
|
||||
# 1121 Write_rows # 1165 table_id: # flags: STMT_END_F
|
||||
# 1165 Xid # 1192 COMMIT /* XID */
|
||||
# 1192 Table_map # 1233 table_id: # (test.t1)
|
||||
# 1233 Write_rows # 1277 table_id: # flags: STMT_END_F
|
||||
SHOW TABLES;
|
||||
Tables_in_test
|
||||
t1
|
||||
@ -367,15 +367,15 @@ SHOW BINLOG EVENTS;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 4 Format_desc # 106 Server ver: #, Binlog ver: #
|
||||
# 106 Query # 192 use `test`; CREATE TABLE t1 (a INT)
|
||||
# 192 Table_map # 231 table_id: # (test.t1)
|
||||
# 231 Write_rows # 275 table_id: # flags: STMT_END_F
|
||||
# 275 Query # 375 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
|
||||
# 375 Query # 443 use `test`; BEGIN
|
||||
# 443 Table_map # 482 table_id: # (test.t2)
|
||||
# 482 Write_rows # 526 table_id: # flags: STMT_END_F
|
||||
# 526 Table_map # 565 table_id: # (test.t2)
|
||||
# 565 Write_rows # 604 table_id: # flags: STMT_END_F
|
||||
# 604 Xid # 631 COMMIT /* XID */
|
||||
# 192 Table_map # 233 table_id: # (test.t1)
|
||||
# 233 Write_rows # 277 table_id: # flags: STMT_END_F
|
||||
# 277 Query # 377 use `test`; CREATE TABLE t2 (a INT) ENGINE=INNODB
|
||||
# 377 Query # 445 use `test`; BEGIN
|
||||
# 445 Table_map # 486 table_id: # (test.t2)
|
||||
# 486 Write_rows # 530 table_id: # flags: STMT_END_F
|
||||
# 530 Table_map # 571 table_id: # (test.t2)
|
||||
# 571 Write_rows # 610 table_id: # flags: STMT_END_F
|
||||
# 610 Xid # 637 COMMIT /* XID */
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
1
|
||||
@ -394,10 +394,10 @@ INSERT INTO t2 SELECT a+2 FROM tt2;
|
||||
ROLLBACK;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
SHOW BINLOG EVENTS FROM 631;
|
||||
SHOW BINLOG EVENTS FROM 637;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
# 631 Query # 711 use `test`; TRUNCATE TABLE t2
|
||||
# 711 Xid # 738 COMMIT /* XID */
|
||||
# 637 Query # 717 use `test`; TRUNCATE TABLE t2
|
||||
# 717 Xid # 744 COMMIT /* XID */
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
a
|
||||
DROP TABLE t1,t2;
|
||||
|
BIN
mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result
Normal file
BIN
mysql-test/suite/rpl/r/rpl_row_extraColmaster_ndb.result
Normal file
Binary file not shown.
@ -12,13 +12,13 @@ create table t4 (a int);
|
||||
insert into t4 select * from t3;
|
||||
rename table t1 to t5, t2 to t1;
|
||||
flush no_write_to_binlog tables;
|
||||
SHOW BINLOG EVENTS FROM 619 ;
|
||||
SHOW BINLOG EVENTS FROM 623 ;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
|
||||
select * from t3;
|
||||
a
|
||||
flush tables;
|
||||
SHOW BINLOG EVENTS FROM 619 ;
|
||||
SHOW BINLOG EVENTS FROM 623 ;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # use `test`; rename table t1 to t5, t2 to t1
|
||||
master-bin.000001 # Query 1 # use `test`; flush tables
|
||||
|
@ -24,7 +24,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 597
|
||||
Read_Master_Log_Pos 605
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -39,7 +39,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1146
|
||||
Last_Error Error 'Table 'test.t1' doesn't exist' on opening table `test`.`t1`
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 524
|
||||
Exec_Master_Log_Pos 530
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
|
@ -208,13 +208,13 @@ master-bin.000002 # Table_map 1 # table_id: # (test.t2)
|
||||
master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 1260
|
||||
master-bin.000002 377
|
||||
master-bin.000001 1266
|
||||
master-bin.000002 379
|
||||
start slave;
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 1358
|
||||
slave-bin.000002 278
|
||||
slave-bin.000001 1364
|
||||
slave-bin.000002 280
|
||||
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
|
||||
@ -240,7 +240,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000002
|
||||
Read_Master_Log_Pos 377
|
||||
Read_Master_Log_Pos 379
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000002
|
||||
@ -255,7 +255,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 377
|
||||
Exec_Master_Log_Pos 379
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
|
@ -213,13 +213,13 @@ master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000002 # Xid 1 # COMMIT /* XID */
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 1314
|
||||
master-bin.000002 404
|
||||
master-bin.000001 1320
|
||||
master-bin.000002 406
|
||||
start slave;
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 1412
|
||||
slave-bin.000002 305
|
||||
slave-bin.000001 1418
|
||||
slave-bin.000002 307
|
||||
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
|
||||
@ -248,7 +248,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000002
|
||||
Read_Master_Log_Pos 404
|
||||
Read_Master_Log_Pos 406
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000002
|
||||
@ -263,7 +263,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 404
|
||||
Exec_Master_Log_Pos 406
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
|
@ -30,7 +30,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58668
|
||||
Read_Master_Log_Pos 60268
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -45,7 +45,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58668
|
||||
Exec_Master_Log_Pos 60268
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -78,7 +78,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58668
|
||||
Read_Master_Log_Pos 60268
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -93,7 +93,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58668
|
||||
Exec_Master_Log_Pos 60268
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -126,7 +126,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58668
|
||||
Read_Master_Log_Pos 60268
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -141,7 +141,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58668
|
||||
Exec_Master_Log_Pos 60268
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -217,7 +217,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58754
|
||||
Read_Master_Log_Pos 60354
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -232,7 +232,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58754
|
||||
Exec_Master_Log_Pos 60354
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
@ -261,7 +261,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 58830
|
||||
Read_Master_Log_Pos 60430
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -276,7 +276,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 58830
|
||||
Exec_Master_Log_Pos 60430
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
|
@ -146,187 +146,17 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t2 VALUES (2,4);
|
||||
"Failed while waiting for slave SQL thread to stop"
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Slave_IO_State Waiting for master to send event
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Master_Port 9306
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (4);
|
||||
INSERT INTO t4 VALUES (4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (5);
|
||||
INSERT INTO t5 VALUES (5,10,25);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
INSERT INTO t6 VALUES (6,12,36);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Read_Master_Log_Pos 2829
|
||||
Relay_Log_File slave-relay-bin.000007
|
||||
Relay_Log_Pos 252
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
@ -339,8 +169,8 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Exec_Master_Log_Pos 2829
|
||||
Relay_Log_Space 553
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
@ -350,64 +180,9 @@ Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Seconds_Behind_Master 0
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
INSERT INTO t7 VALUES (1),(2),(3);
|
||||
INSERT INTO t8 VALUES (1),(2),(3);
|
||||
SELECT * FROM t7 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t7 ORDER BY a;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
2 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
3 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 0 0 0 0 0 0 0 0
|
||||
2 0 0 0 0 0 0 0 0
|
||||
3 0 0 0 0 0 0 0 0
|
||||
**** On Master ****
|
||||
TRUNCATE t1_nodef;
|
||||
SET SQL_LOG_BIN=0;
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
INSERT INTO t1_nodef VALUES (2,4);
|
||||
SET SQL_LOG_BIN=1;
|
||||
**** On Slave ****
|
||||
INSERT INTO t1_nodef VALUES (1,2,3);
|
||||
INSERT INTO t1_nodef VALUES (2,4,6);
|
||||
**** On Master ****
|
||||
UPDATE t1_nodef SET b=2*b WHERE a=1;
|
||||
SELECT * FROM t1_nodef ORDER BY a;
|
||||
a b
|
||||
1 4
|
||||
2 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef ORDER BY a;
|
||||
a b x
|
||||
1 4 3
|
||||
2 4 6
|
||||
**** On Master ****
|
||||
DELETE FROM t1_nodef WHERE a=2;
|
||||
SELECT * FROM t1_nodef ORDER BY a;
|
||||
a b
|
||||
1 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef ORDER BY a;
|
||||
a b x
|
||||
1 4 3
|
||||
**** Cleanup ****
|
||||
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
|
||||
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
SET @@global.sql_mode= @my_sql_mode;
|
||||
|
@ -146,187 +146,17 @@ SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (2);
|
||||
INSERT INTO t2 VALUES (2,4);
|
||||
"Failed while waiting for slave SQL thread to stop"
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Slave_IO_State Waiting for master to send event
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Master_Port 9306
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Table width mismatch - received 2 columns, test.t2 has 1 columns
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (4);
|
||||
INSERT INTO t4 VALUES (4);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 0 type mismatch - received type 3, test.t4 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (5);
|
||||
INSERT INTO t5 VALUES (5,10,25);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 1 type mismatch - received type 3, test.t5 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
INSERT INTO t6 VALUES (6,12,36);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running No
|
||||
Replicate_Do_DB
|
||||
Replicate_Ignore_DB
|
||||
Replicate_Do_Table
|
||||
Replicate_Ignore_Table
|
||||
Replicate_Wild_Do_Table
|
||||
Replicate_Wild_Ignore_Table
|
||||
Last_Errno 1532
|
||||
Last_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
Master_SSL_Allowed No
|
||||
Master_SSL_CA_File
|
||||
Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 1532
|
||||
Last_SQL_Error Table definition on master and slave does not match: Column 2 type mismatch - received type 3, test.t6 has type 4
|
||||
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
|
||||
START SLAVE;
|
||||
INSERT INTO t9 VALUES (6);
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos #
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Read_Master_Log_Pos 3180
|
||||
Relay_Log_File slave-relay-bin.000007
|
||||
Relay_Log_Pos 252
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
Slave_IO_Running Yes
|
||||
Slave_SQL_Running Yes
|
||||
@ -339,8 +169,8 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos #
|
||||
Relay_Log_Space #
|
||||
Exec_Master_Log_Pos 3180
|
||||
Relay_Log_Space 553
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
Until_Log_Pos 0
|
||||
@ -350,64 +180,9 @@ Master_SSL_CA_Path
|
||||
Master_SSL_Cert
|
||||
Master_SSL_Cipher
|
||||
Master_SSL_Key
|
||||
Seconds_Behind_Master #
|
||||
Seconds_Behind_Master 0
|
||||
Master_SSL_Verify_Server_Cert No
|
||||
Last_IO_Errno 0
|
||||
Last_IO_Error
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
INSERT INTO t7 VALUES (1),(2),(3);
|
||||
INSERT INTO t8 VALUES (1),(2),(3);
|
||||
SELECT * FROM t7 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
a
|
||||
1
|
||||
2
|
||||
3
|
||||
SELECT * FROM t7 ORDER BY a;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
2 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
3 NULL NULL NULL NULL NULL NULL NULL NULL
|
||||
SELECT * FROM t8 ORDER BY a;
|
||||
a e1 e2 e3 e4 e5 e6 e7 e8
|
||||
1 0 0 0 0 0 0 0 0
|
||||
2 0 0 0 0 0 0 0 0
|
||||
3 0 0 0 0 0 0 0 0
|
||||
**** On Master ****
|
||||
TRUNCATE t1_nodef;
|
||||
SET SQL_LOG_BIN=0;
|
||||
INSERT INTO t1_nodef VALUES (1,2);
|
||||
INSERT INTO t1_nodef VALUES (2,4);
|
||||
SET SQL_LOG_BIN=1;
|
||||
**** On Slave ****
|
||||
INSERT INTO t1_nodef VALUES (1,2,3);
|
||||
INSERT INTO t1_nodef VALUES (2,4,6);
|
||||
**** On Master ****
|
||||
UPDATE t1_nodef SET b=2*b WHERE a=1;
|
||||
SELECT * FROM t1_nodef ORDER BY a;
|
||||
a b
|
||||
1 4
|
||||
2 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef ORDER BY a;
|
||||
a b x
|
||||
1 4 3
|
||||
2 4 6
|
||||
**** On Master ****
|
||||
DELETE FROM t1_nodef WHERE a=2;
|
||||
SELECT * FROM t1_nodef ORDER BY a;
|
||||
a b
|
||||
1 4
|
||||
**** On Slave ****
|
||||
SELECT * FROM t1_nodef ORDER BY a;
|
||||
a b x
|
||||
1 4 3
|
||||
**** Cleanup ****
|
||||
DROP TABLE IF EXISTS t1_int,t1_bit,t1_char,t1_nodef;
|
||||
DROP TABLE IF EXISTS t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
SET @@global.sql_mode= @my_sql_mode;
|
||||
|
@ -26,7 +26,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 744
|
||||
Read_Master_Log_Pos 750
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -41,7 +41,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 315
|
||||
Exec_Master_Log_Pos 317
|
||||
Relay_Log_Space #
|
||||
Until_Condition Master
|
||||
Until_Log_File master-bin.000001
|
||||
@ -72,7 +72,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 744
|
||||
Read_Master_Log_Pos 750
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -87,7 +87,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 315
|
||||
Exec_Master_Log_Pos 317
|
||||
Relay_Log_Space #
|
||||
Until_Condition Master
|
||||
Until_Log_File master-no-such-bin.000001
|
||||
@ -116,7 +116,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 744
|
||||
Read_Master_Log_Pos 750
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -131,7 +131,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 590
|
||||
Exec_Master_Log_Pos 594
|
||||
Relay_Log_Space #
|
||||
Until_Condition Relay
|
||||
Until_Log_File slave-relay-bin.000004
|
||||
@ -158,7 +158,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000001
|
||||
Read_Master_Log_Pos 744
|
||||
Read_Master_Log_Pos 750
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000001
|
||||
@ -173,7 +173,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 744
|
||||
Exec_Master_Log_Pos 750
|
||||
Relay_Log_Space #
|
||||
Until_Condition Master
|
||||
Until_Log_File master-bin.000001
|
||||
|
@ -32,5 +32,5 @@ a
|
||||
3
|
||||
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 Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 776 # # master-bin.000001 Yes Yes 0 0 776 # None 0 No # No 0 0
|
||||
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 786 # # master-bin.000001 Yes Yes 0 0 786 # None 0 No # No 0 0
|
||||
drop table t1;
|
||||
|
@ -15,3 +15,4 @@ rpl_innodb_mixed_ddl : Bug #29363 rpl.rpl_innodb_mixed_* test failures
|
||||
rpl_innodb_mixed_dml : Bug #29363 rpl.rpl_innodb_mixed_* test failures
|
||||
rpl_invoked_features : BUG#29020 2007-06-21 Lars Non-deterministic test case
|
||||
rpl_auto_increment_11932 : Bug#29809 2007-07-16 ingo Slave SQL errors in warnings file
|
||||
rpl_stm_extraColmaster_ndb : WL#3915 : Statement-based replication not supported in ndb. Enable test when supported.
|
||||
|
216
mysql-test/suite/rpl/t/rpl_colSize.test
Normal file
216
mysql-test/suite/rpl/t/rpl_colSize.test
Normal file
@ -0,0 +1,216 @@
|
||||
##################################################################
|
||||
# rpl_colSize #
|
||||
# #
|
||||
# This test is designed to test the changes included in WL#3228. #
|
||||
# The changes include the ability to replicate with the master #
|
||||
# having columns that are smaller (shorter) than the slave. #
|
||||
##################################################################
|
||||
|
||||
-- source include/master-slave.inc
|
||||
|
||||
--disable_warnings
|
||||
DROP TABLE IF EXISTS t1;
|
||||
--enable_warnings
|
||||
|
||||
--echo **** Testing WL#3228 changes. ****
|
||||
--echo *** Create "wider" table on slave ***
|
||||
sync_slave_with_master;
|
||||
STOP SLAVE;
|
||||
RESET SLAVE;
|
||||
|
||||
eval CREATE TABLE t1 (
|
||||
a float (47),
|
||||
b double (143,9),
|
||||
c decimal (65,30),
|
||||
d numeric (4,0),
|
||||
e bit (32),
|
||||
f char (21),
|
||||
g varchar (1300),
|
||||
h binary (33),
|
||||
j varbinary (200),
|
||||
k enum ('5','6','7', '8','9','0'),
|
||||
l set ('1','2','3','4','5','6','7','8','9','0','11','12','13','14','15','16','17','18','19','21','22','23','24','25','26','27','28','29'),
|
||||
m TINYBLOB,
|
||||
n BLOB,
|
||||
o MEDIUMBLOB,
|
||||
p LONGBLOB,
|
||||
q TINYTEXT,
|
||||
r TEXT,
|
||||
s MEDIUMTEXT,
|
||||
t LONGTEXT
|
||||
);
|
||||
|
||||
--echo *** Create same table on master but with narrow columns ***
|
||||
connection master;
|
||||
eval CREATE TABLE t1 (
|
||||
a float (44),
|
||||
b double (10,3),
|
||||
c decimal (10,2),
|
||||
d numeric (3,0),
|
||||
e bit (16),
|
||||
f char (10),
|
||||
g varchar (100),
|
||||
h binary (20),
|
||||
j varbinary (20),
|
||||
k enum ('5','6','7'),
|
||||
l set ('1','2','3','4','5','6','7','8','9','0'),
|
||||
m TINYBLOB,
|
||||
n BLOB,
|
||||
o MEDIUMBLOB,
|
||||
p LONGBLOB,
|
||||
q TINYTEXT,
|
||||
r TEXT,
|
||||
s MEDIUMTEXT,
|
||||
t LONGTEXT
|
||||
);
|
||||
|
||||
RESET MASTER;
|
||||
|
||||
--echo *** Start replication ***
|
||||
connection slave;
|
||||
START SLAVE;
|
||||
|
||||
--echo *** Insert data on master and display it. ***
|
||||
connection master;
|
||||
|
||||
INSERT INTO t1 () VALUES (
|
||||
17.567,
|
||||
2.123,
|
||||
10.20,
|
||||
125,
|
||||
hex(64),
|
||||
'TEST',
|
||||
'This is a test',
|
||||
'binary data',
|
||||
'more binary data',
|
||||
'6',
|
||||
'7',
|
||||
"blob 1",
|
||||
"blob 2",
|
||||
"blob 3",
|
||||
"blob 4",
|
||||
"text 1",
|
||||
"text 2",
|
||||
"text 3",
|
||||
"text 4");
|
||||
|
||||
# Replace values in columns that display differently between SBR & RBR
|
||||
--replace_column 5 # 8 #
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
--echo *** Select data from slave to compare ***
|
||||
sync_slave_with_master;
|
||||
connection slave;
|
||||
|
||||
# Replace values in columns that display differently between SBR & RBR
|
||||
--replace_column 5 # 8 #
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
|
||||
# Test boundary limits of varchar and char fields
|
||||
# Master/Slave
|
||||
# <256/<256 with m < s, m > s, and m == s <-- col a
|
||||
# >255/<256 with m < s, m > s, and m == s <-- error will be caught in BUG#22086
|
||||
# <256/>255 with m < s, m > s, and m == s <-- col b
|
||||
# >255/>255 with m < s, m > s, and m == s <-- col c
|
||||
#
|
||||
# Test boundary limits of CHAR fields
|
||||
# Master/Slave
|
||||
# <256/<256 with m < s, m > s, and m == s <-- col d
|
||||
# >255/<256 with m < s, m > s, and m == s <-- error char limited to 255 chars
|
||||
# <256/>255 with m < s, m > s, and m == s <-- error char limited to 255 chars
|
||||
# >255/>255 with m < s, m > s, and m == s <-- error char limited to 255 chars
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo Create varchar table on master
|
||||
CREATE TABLE t1 (
|
||||
a VARCHAR(50),
|
||||
b VARCHAR(100),
|
||||
c VARCHAR(300),
|
||||
d CHAR(5)
|
||||
);
|
||||
|
||||
sync_slave_with_master slave;
|
||||
|
||||
--echo Alter varchar table on slave
|
||||
ALTER TABLE t1 CHANGE COLUMN a a VARCHAR(100);
|
||||
ALTER TABLE t1 CHANGE COLUMN b b VARCHAR(400);
|
||||
ALTER TABLE t1 CHANGE COLUMN c c VARCHAR(500);
|
||||
ALTER TABLE t1 CHANGE COLUMN d d CHAR(100);
|
||||
|
||||
connection master;
|
||||
|
||||
--echo Insert some values and select them on master
|
||||
INSERT INTO t1 VALUES ("This is a test of col a.",
|
||||
"This is another test of col b.",
|
||||
"This is a test of the large col c.",
|
||||
"Col d");
|
||||
SELECT * FROM t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
sync_slave_with_master slave;
|
||||
|
||||
--echo Insert some values and select them on slave
|
||||
SELECT * FROM t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
|
||||
# Test boundary limits of bit fields
|
||||
# m < s, m % 8 != 0, and s % 8 == 0 col a
|
||||
# m < s, m % 8 == 0, and s % 8 != 0 col b
|
||||
# m < s, m % 8 != 0, and s % 8 != 0 col c
|
||||
# m > s, m % 8 != 0, and s % 8 == 0 <-- error will be caught in BUG#22086
|
||||
# m > s, m % 8 == 0, and s % 8 != 0 <-- error will be caught in BUG#22086
|
||||
# m > s, m % 8 != 0, and s % 8 != 0 <-- error will be caught in BUG#22086
|
||||
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo Create bit table on master
|
||||
CREATE TABLE t1 (
|
||||
a BIT(7),
|
||||
b BIT(8),
|
||||
c BIT(21),
|
||||
d BIT(11),
|
||||
e BIT(11)
|
||||
);
|
||||
|
||||
sync_slave_with_master slave;
|
||||
|
||||
--echo Create bit table on slave
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
a BIT(16),
|
||||
b BIT(22),
|
||||
c BIT(54),
|
||||
d BIT(25),
|
||||
e BIT(13)
|
||||
);
|
||||
|
||||
connection master;
|
||||
|
||||
--echo Insert some values and select them on master
|
||||
INSERT INTO t1 VALUES (
|
||||
b'1010101',
|
||||
b'10101011',
|
||||
b'101010110101010101111',
|
||||
b'10101010101',
|
||||
b'10101011111'
|
||||
);
|
||||
|
||||
SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
sync_slave_with_master slave;
|
||||
|
||||
--echo Insert some values and select them on master
|
||||
SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
|
||||
SHOW CREATE TABLE t1;
|
||||
|
||||
--echo *** Cleanup ***
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
sync_slave_with_master;
|
||||
|
||||
# END 5.1 Test Case
|
@ -0,0 +1 @@
|
||||
--innodb
|
@ -0,0 +1 @@
|
||||
--innodb
|
15
mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test
Normal file
15
mysql-test/suite/rpl/t/rpl_extraColmaster_innodb.test
Normal file
@ -0,0 +1,15 @@
|
||||
#############################################################
|
||||
# Purpose: To test having extra columns on the master WL#3915
|
||||
#############################################################
|
||||
-- source include/master-slave.inc
|
||||
-- source include/have_innodb.inc
|
||||
|
||||
let $engine_type = 'InnoDB';
|
||||
|
||||
set binlog_format=row;
|
||||
-- source extra/rpl_tests/rpl_extraMaster_Col.test
|
||||
|
||||
set binlog_format=statement;
|
||||
-- source extra/rpl_tests/rpl_extraMaster_Col.test
|
||||
|
||||
|
13
mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
Normal file
13
mysql-test/suite/rpl/t/rpl_extraColmaster_myisam.test
Normal file
@ -0,0 +1,13 @@
|
||||
#############################################################
|
||||
# Purpose: To test having extra columns on the master WL#3915
|
||||
#############################################################
|
||||
-- source include/master-slave.inc
|
||||
|
||||
let $engine_type = 'MyISAM';
|
||||
|
||||
set binlog_format=row;
|
||||
-- source extra/rpl_tests/rpl_extraMaster_Col.test
|
||||
|
||||
set binlog_format=statement;
|
||||
-- source extra/rpl_tests/rpl_extraMaster_Col.test
|
||||
|
@ -72,7 +72,7 @@ CREATE TABLE t7 (UNIQUE(b)) SELECT a,b FROM tt3;
|
||||
# Shouldn't be written to the binary log
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 1098;
|
||||
SHOW BINLOG EVENTS FROM 1100;
|
||||
|
||||
# Test that INSERT-SELECT works the same way as for SBR.
|
||||
CREATE TABLE t7 (a INT, b INT UNIQUE);
|
||||
@ -82,7 +82,7 @@ SELECT * FROM t7 ORDER BY a,b;
|
||||
# Should be written to the binary log
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 1098;
|
||||
SHOW BINLOG EVENTS FROM 1100;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
|
||||
@ -94,7 +94,7 @@ INSERT INTO t7 SELECT a,b FROM tt4;
|
||||
ROLLBACK;
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 1294;
|
||||
SHOW BINLOG EVENTS FROM 1298;
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t7 ORDER BY a,b;
|
||||
@ -110,7 +110,7 @@ CREATE TEMPORARY TABLE tt7 SELECT 1;
|
||||
--query_vertical SHOW CREATE TABLE t9
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 1390;
|
||||
SHOW BINLOG EVENTS FROM 1396;
|
||||
sync_slave_with_master;
|
||||
--echo **** On Slave ****
|
||||
--query_vertical SHOW CREATE TABLE t8
|
||||
@ -227,7 +227,7 @@ ROLLBACK;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
--replace_column 1 # 4 #
|
||||
--replace_regex /\/\* xid=.* \*\//\/* XID *\// /Server ver: .*, Binlog ver: .*/Server ver: #, Binlog ver: #/ /table_id: [0-9]+/table_id: #/
|
||||
SHOW BINLOG EVENTS FROM 631;
|
||||
SHOW BINLOG EVENTS FROM 637;
|
||||
sync_slave_with_master;
|
||||
SELECT * FROM t2 ORDER BY a;
|
||||
|
||||
|
12
mysql-test/suite/rpl/t/rpl_row_extraColmaster_ndb.test
Normal file
12
mysql-test/suite/rpl/t/rpl_row_extraColmaster_ndb.test
Normal file
@ -0,0 +1,12 @@
|
||||
###########################################
|
||||
# Purpose: Wrapper for rpl_extraMaster_Col.test
|
||||
# Using NDB
|
||||
###########################################
|
||||
-- source include/have_ndb.inc
|
||||
-- source include/ndb_master-slave.inc
|
||||
-- source include/have_binlog_format_row.inc
|
||||
|
||||
let $engine_type = 'NDB';
|
||||
|
||||
-- source extra/rpl_tests/rpl_extraMaster_Col.test
|
||||
|
@ -1,7 +1,7 @@
|
||||
# depends on the binlog output
|
||||
-- source include/have_binlog_format_row.inc
|
||||
|
||||
let $rename_event_pos= 619;
|
||||
let $rename_event_pos= 623;
|
||||
|
||||
# Bug#18326: Do not lock table for writing during prepare of statement
|
||||
# The use of the ps protocol causes extra table maps in the binlog, so
|
||||
|
13
mysql-test/suite/rpl/t/rpl_stm_extraColmaster_ndb.test
Normal file
13
mysql-test/suite/rpl/t/rpl_stm_extraColmaster_ndb.test
Normal file
@ -0,0 +1,13 @@
|
||||
###########################################
|
||||
# Purpose: Wrapper for rpl_extraMaster_Col.test
|
||||
# Using NDB
|
||||
###########################################
|
||||
-- source include/have_ndb.inc
|
||||
-- source include/ndb_master-slave.inc
|
||||
-- source include/have_binlog_format_statement.inc
|
||||
|
||||
let $engine_type = 'NDB';
|
||||
|
||||
-- source extra/rpl_tests/rpl_extraMaster_Col.test
|
||||
|
||||
|
@ -228,12 +228,12 @@ master-bin.000002 # Write_rows 1 # table_id: # flags: STMT_END_F
|
||||
master-bin.000002 # Query 1 # COMMIT
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
master-bin.000001 1746
|
||||
master-bin.000002 617
|
||||
master-bin.000001 1760
|
||||
master-bin.000002 623
|
||||
start slave;
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 1841
|
||||
slave-bin.000001 1855
|
||||
slave-bin.000002 202
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
@ -272,7 +272,7 @@ Master_User root
|
||||
Master_Port MASTER_PORT
|
||||
Connect_Retry 1
|
||||
Master_Log_File master-bin.000002
|
||||
Read_Master_Log_Pos 617
|
||||
Read_Master_Log_Pos 623
|
||||
Relay_Log_File #
|
||||
Relay_Log_Pos #
|
||||
Relay_Master_Log_File master-bin.000002
|
||||
@ -287,7 +287,7 @@ Replicate_Wild_Ignore_Table
|
||||
Last_Errno 0
|
||||
Last_Error
|
||||
Skip_Counter 0
|
||||
Exec_Master_Log_Pos 617
|
||||
Exec_Master_Log_Pos 623
|
||||
Relay_Log_Space #
|
||||
Until_Condition None
|
||||
Until_Log_File
|
||||
|
@ -32,13 +32,13 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 223 Query 1 287 BEGIN
|
||||
master-bin.000001 287 Table_map 1 327 table_id: # (test.t1)
|
||||
master-bin.000001 327 Table_map 1 385 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 385 Write_rows 1 444 table_id: #
|
||||
master-bin.000001 444 Write_rows 1 491 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 491 Query 1 556 COMMIT
|
||||
master-bin.000001 556 Query 1 636 use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 636 Query 1 712 use `test`; DROP TABLE t1
|
||||
master-bin.000001 287 Table_map 1 330 table_id: # (test.t1)
|
||||
master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 392 Write_rows 1 451 table_id: #
|
||||
master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 498 Query 1 563 COMMIT
|
||||
master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1
|
||||
**** On Master ****
|
||||
CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB;
|
||||
INSERT INTO t1 VALUES (1,1), (2,2);
|
||||
@ -68,24 +68,24 @@ Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 4 Format_desc 1 106 Server ver: SERVER_VERSION, Binlog ver: 4
|
||||
master-bin.000001 106 Query 1 223 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 223 Query 1 287 BEGIN
|
||||
master-bin.000001 287 Table_map 1 327 table_id: # (test.t1)
|
||||
master-bin.000001 327 Table_map 1 385 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 385 Write_rows 1 444 table_id: #
|
||||
master-bin.000001 444 Write_rows 1 491 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 491 Query 1 556 COMMIT
|
||||
master-bin.000001 556 Query 1 636 use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 636 Query 1 712 use `test`; DROP TABLE t1
|
||||
master-bin.000001 712 Query 1 829 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 829 Query 1 893 BEGIN
|
||||
master-bin.000001 893 Table_map 1 933 table_id: # (test.t1)
|
||||
master-bin.000001 933 Table_map 1 991 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 991 Write_rows 1 1050 table_id: #
|
||||
master-bin.000001 1050 Write_rows 1 1097 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 1097 Query 1 1162 COMMIT
|
||||
master-bin.000001 1162 Query 1 1226 BEGIN
|
||||
master-bin.000001 1226 Table_map 1 1266 table_id: # (test.t1)
|
||||
master-bin.000001 1266 Table_map 1 1324 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 1324 Write_rows 1 1383 table_id: #
|
||||
master-bin.000001 1383 Delete_rows 1 1422 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 1422 Query 1 1487 COMMIT
|
||||
master-bin.000001 1487 Query 1 1563 use `test`; DROP TABLE t1
|
||||
master-bin.000001 287 Table_map 1 330 table_id: # (test.t1)
|
||||
master-bin.000001 330 Table_map 1 392 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 392 Write_rows 1 451 table_id: #
|
||||
master-bin.000001 451 Write_rows 1 498 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 498 Query 1 563 COMMIT
|
||||
master-bin.000001 563 Query 1 643 use `test`; TRUNCATE TABLE t1
|
||||
master-bin.000001 643 Query 1 719 use `test`; DROP TABLE t1
|
||||
master-bin.000001 719 Query 1 836 use `test`; CREATE TABLE t1 (a INT PRIMARY KEY, b LONG) ENGINE=NDB
|
||||
master-bin.000001 836 Query 1 900 BEGIN
|
||||
master-bin.000001 900 Table_map 1 943 table_id: # (test.t1)
|
||||
master-bin.000001 943 Table_map 1 1005 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 1005 Write_rows 1 1064 table_id: #
|
||||
master-bin.000001 1064 Write_rows 1 1111 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 1111 Query 1 1176 COMMIT
|
||||
master-bin.000001 1176 Query 1 1240 BEGIN
|
||||
master-bin.000001 1240 Table_map 1 1283 table_id: # (test.t1)
|
||||
master-bin.000001 1283 Table_map 1 1345 table_id: # (mysql.ndb_apply_status)
|
||||
master-bin.000001 1345 Write_rows 1 1404 table_id: #
|
||||
master-bin.000001 1404 Delete_rows 1 1443 table_id: # flags: STMT_END_F
|
||||
master-bin.000001 1443 Query 1 1508 COMMIT
|
||||
master-bin.000001 1508 Query 1 1584 use `test`; DROP TABLE t1
|
||||
|
Reference in New Issue
Block a user