mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
Merge pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-mtr BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-rpl_row_charset.test: Auto merged BitKeeper/deleted/.del-rpl_row_charset_innodb.test: Auto merged CMakeLists.txt: Auto merged client/mysqltest.c: Auto merged configure.in: Auto merged mysql-test/extra/binlog_tests/blackhole.test: Auto merged mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test: Auto merged mysql-test/include/mix1.inc: Auto merged mysql-test/r/ctype_big5.result: Auto merged mysql-test/r/gis.result: Auto merged mysql-test/r/mysqlbinlog.result: Auto merged mysql-test/r/query_cache.result: Auto merged mysql-test/r/sp.result: Auto merged mysql-test/r/system_mysql_db.result: Auto merged mysql-test/r/trigger.result: Auto merged mysql-test/r/type_blob.result: Auto merged mysql-test/r/view.result: Auto merged mysql-test/r/warnings.result: Auto merged mysql-test/suite/federated/federated.result: Auto merged mysql-test/suite/federated/federated.test: Auto merged mysql-test/suite/ndb_team/r/ndb_dd_backuprestore.result: Auto merged mysql-test/suite/ndb_team/r/rpl_ndb_dd_advance.result: Auto merged mysql-test/suite/ndb_team/t/rpl_ndb_dd_advance.test: Auto merged mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result: Auto merged mysql-test/suite/rpl/r/rpl_row_log_innodb.result: Auto merged mysql-test/suite/rpl/r/rpl_timezone.result: Auto merged mysql-test/suite/rpl/t/rpl_load_from_master.test: Auto merged mysql-test/suite/rpl/t/rpl_rotate_logs.test: Auto merged mysql-test/suite/rpl/t/rpl_trigger.test: Auto merged mysql-test/t/csv.test: Auto merged mysql-test/t/ctype_big5.test: Auto merged mysql-test/t/gis.test: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/mysqldump.test: Auto merged mysql-test/t/partition.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/show_check.test: Auto merged mysql-test/t/sp.test: Auto merged mysql-test/t/system_mysql_db_fix50117.test: Auto merged mysql-test/t/trigger.test: Auto merged mysql-test/t/trigger_notembedded.test: Auto merged mysql-test/t/type_blob.test: Auto merged mysql-test/t/view.test: Auto merged mysql-test/t/warnings.test: Auto merged sql/ha_ndbcluster.cc: Auto merged mysql-test/Makefile.am: SCCS merged mysql-test/mysql-test-run.pl: Use local version of mtr.pl mysql-test/lib/mtr_cases.pm: Use local mtr_cases.pm mysql-test/suite/rpl/t/disabled.def: Use remote disabled file mysql-test/t/disabled.def: Use remote disabled file sql/ha_ndbcluster_binlog.cc: Use remote mysql-test/extra/rpl_tests/rpl_charset.test: Manual merge mysql-test/lib/mtr_report.pm: Manual merge mysql-test/suite/binlog/r/binlog_killed_simulate.result: Manual merge mysql-test/suite/binlog/r/binlog_multi_engine.result: Manual merge mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result: Manual merge mysql-test/suite/binlog/r/binlog_stm_blackhole.result: Manual merge mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result: Manual merge mysql-test/suite/binlog/t/binlog_killed.test: Manual merge mysql-test/suite/binlog/t/binlog_killed_simulate.test: Manual merge mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test: Manual merge mysql-test/suite/binlog/t/binlog_stm_mix_innodb_myisam.test: Manual merge mysql-test/suite/ndb/r/ndb_binlog_format.result: Manual merge mysql-test/suite/ndb/r/ndb_restore.result: Manual merge mysql-test/suite/ndb/t/ndb_restore.test: Manual merge mysql-test/suite/rpl/include/rpl_mixed_dml.inc: Manual merge mysql-test/suite/rpl/r/rpl_stm_log.result: Manual merge mysql-test/suite/rpl/t/rpl_row_sp005.test: Manual merge mysql-test/t/log_state.test: Manual merge mysql-test/t/mysqlbinlog.test: Manual merge mysql-test/t/mysqlbinlog2.test: Manual merge mysql-test/t/upgrade.test: Manual merge
This commit is contained in:
@@ -51,8 +51,8 @@ DELETE FROM t2 WHERE a = 2;
|
||||
|
||||
--echo
|
||||
--echo ******************** LOAD DATA INFILE ********************
|
||||
--copy_file ./suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
|
||||
LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
|
||||
--copy_file suite/rpl/data/rpl_mixed.dat $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
|
||||
LOAD DATA INFILE '../../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/rpl_mixed.dat
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
--source suite/rpl/include/rpl_mixed_check_select.inc
|
||||
@@ -344,4 +344,4 @@ sync_slave_with_master;
|
||||
# will be created. You will need to go to the mysql-test dir and diff
|
||||
# the files your self to see what is not matching
|
||||
|
||||
--exec diff $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_master.sql $MYSQLTEST_VARDIR/tmp/rpl_switch_stm_row_mixed_slave.sql
|
||||
|
14
mysql-test/suite/rpl/my.cnf
Normal file
14
mysql-test/suite/rpl/my.cnf
Normal file
@@ -0,0 +1,14 @@
|
||||
# Use settings from rpl_1slave_raw.cnf
|
||||
# add setting to connect the slave to the master by default
|
||||
!include rpl_1slave_base.cnf
|
||||
|
||||
[mysqld.2]
|
||||
# Hardcode the host to 127.0.0.1 until running on more
|
||||
# than one host and it need to be masked
|
||||
# master-host= @mysqld.1.#host
|
||||
master-host= 127.0.0.1
|
||||
master-port= @mysqld.1.port
|
||||
master-password= @mysqld.1.#password
|
||||
master-user= @mysqld.1.#user
|
||||
master-connect-retry= 1
|
||||
|
@@ -6,10 +6,10 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a));
|
||||
LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1;
|
||||
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_ln/words2.dat' INTO TABLE test.t1;
|
||||
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
|
||||
SELECT * FROM test.t1 ORDER BY a DESC;
|
||||
a
|
||||
aberration
|
||||
|
@@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
show variables like 'relay_log%';
|
||||
Variable_name Value
|
||||
relay_log MYSQLTEST_VARDIR/master-data/relay-log
|
||||
relay_log MYSQLD_DATADIR/relay-log
|
||||
relay_log_index
|
||||
relay_log_info_file relay-log.info
|
||||
relay_log_purge ON
|
||||
|
@@ -12,7 +12,7 @@ PRIMARY KEY (id),
|
||||
UNIQUE KEY unique_rec (name,number)
|
||||
) ENGINE=InnoDB;
|
||||
LOAD DATA
|
||||
INFILE '../std_data_ln/loaddata_pair.dat'
|
||||
INFILE '../../std_data/loaddata_pair.dat'
|
||||
REPLACE INTO TABLE t4
|
||||
(name,number);
|
||||
SELECT * FROM t4;
|
||||
@@ -24,7 +24,7 @@ id name number
|
||||
1 XXX 12345
|
||||
2 XXY 12345
|
||||
LOAD DATA
|
||||
INFILE '../std_data_ln/loaddata_pair.dat'
|
||||
INFILE '../../std_data/loaddata_pair.dat'
|
||||
REPLACE INTO TABLE t4
|
||||
(name,number);
|
||||
SELECT * FROM t4;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -103,7 +103,7 @@ DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
|
||||
******************** LOAD DATA INFILE ********************
|
||||
LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
|
||||
LOAD DATA INFILE '../../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a b
|
||||
10 line A
|
||||
@@ -884,7 +884,7 @@ master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t2
|
||||
master-bin.000001 # Xid 1 # #
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
|
||||
master-bin.000001 # Begin_load_query 1 # ;file_id=#;block_len=#
|
||||
master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE '../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=#
|
||||
master-bin.000001 # Execute_load_query 1 # use `test_rpl`; LOAD DATA INFILE '../../tmp/rpl_mixed.dat' INTO TABLE t1 FIELDS TERMINATED BY '|' ;file_id=#
|
||||
master-bin.000001 # Xid 1 # #
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; BEGIN
|
||||
master-bin.000001 # Query 1 # use `test_rpl`; DELETE FROM t1
|
||||
|
@@ -29,9 +29,9 @@ 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_ln/words.dat' into table t1;
|
||||
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_ln/words.dat' into table t2;
|
||||
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;
|
||||
|
@@ -9,12 +9,12 @@ select last_insert_id();
|
||||
last_insert_id()
|
||||
0
|
||||
create table t1(a int not null auto_increment, b int, primary key(a) );
|
||||
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
select last_insert_id();
|
||||
last_insert_id()
|
||||
1
|
||||
create temporary table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||||
load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
|
||||
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by '\n##\n' starting by '>' ignore 1 lines;
|
||||
create table t3 (day date,id int(9),category enum('a','b','c'),name varchar(60));
|
||||
insert into t3 select * from t2;
|
||||
select * from t1;
|
||||
@@ -28,13 +28,13 @@ day id category name
|
||||
2003-03-22 2416 a bbbbb
|
||||
show master status;
|
||||
File Position Binlog_Do_DB Binlog_Ignore_DB
|
||||
slave-bin.000001 1280
|
||||
slave-bin.000001 1286
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
create table t1(a int, b int, unique(b));
|
||||
insert into t1 values(1,10);
|
||||
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
show slave status;
|
||||
@@ -43,7 +43,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
stop slave;
|
||||
change master to master_user='test';
|
||||
change master to master_user='root';
|
||||
@@ -55,7 +55,7 @@ start slave;
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
stop slave;
|
||||
reset slave;
|
||||
show slave status;
|
||||
@@ -64,7 +64,7 @@ Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File
|
||||
reset master;
|
||||
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
|
||||
unique(day)) engine=MyISAM;
|
||||
load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
|
||||
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||||
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||||
'\n##\n' starting by '>' ignore 1 lines;
|
||||
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
|
||||
@@ -79,7 +79,7 @@ day id category name
|
||||
2003-03-22 2161 c asdf
|
||||
alter table t2 drop key day;
|
||||
delete from t2;
|
||||
load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
|
||||
load data infile '../../std_data/rpl_loaddata2.dat' into table t2 fields
|
||||
terminated by ',' optionally enclosed by '%' escaped by '@' lines terminated by
|
||||
'\n##\n' starting by '>' ignore 1 lines;
|
||||
ERROR 23000: Duplicate entry '2003-03-22' for key 'day'
|
||||
@@ -87,6 +87,6 @@ drop table t2;
|
||||
drop table t2;
|
||||
drop table t1;
|
||||
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
LOAD DATA INFILE "../std_data_ln/words.dat" INTO TABLE t1;
|
||||
LOAD DATA INFILE "../../std_data/words.dat" INTO TABLE t1;
|
||||
ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
|
||||
DROP TABLE IF EXISTS t1;
|
||||
|
@@ -5,17 +5,17 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1 (a varchar(10) character set utf8);
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=koi8r;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=DEFAULT;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=koi8r;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=DEFAULT;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r;
|
||||
select hex(a) from t1;
|
||||
hex(a)
|
||||
C3BF
|
||||
|
@@ -45,7 +45,7 @@ Last_IO_Errno #
|
||||
Last_IO_Error #
|
||||
Last_SQL_Errno 0
|
||||
Last_SQL_Error
|
||||
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
|
||||
SHOW SLAVE STATUS;
|
||||
Slave_IO_State #
|
||||
Master_Host 127.0.0.1
|
||||
|
@@ -7,14 +7,14 @@ start slave;
|
||||
drop database if exists mysqltest;
|
||||
USE test;
|
||||
CREATE TABLE t1(a INT, b INT, UNIQUE(b));
|
||||
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE test.t1;
|
||||
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE test.t1;
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
COUNT(*)
|
||||
2
|
||||
CREATE DATABASE mysqltest;
|
||||
USE mysqltest;
|
||||
CREATE TABLE t1(a INT, b INT, UNIQUE(b));
|
||||
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE mysqltest.t1;
|
||||
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE mysqltest.t1;
|
||||
SELECT COUNT(*) FROM mysqltest.t1;
|
||||
COUNT(*)
|
||||
2
|
||||
|
@@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
reset master;
|
||||
create table test.t1(a int, b int, unique(b));
|
||||
load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||
select count(*) from test.t1;
|
||||
count(*)
|
||||
2
|
||||
|
@@ -5,7 +5,7 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (word CHAR(20) NOT NULL);
|
||||
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||||
SELECT * FROM t1 ORDER BY word;
|
||||
word
|
||||
Aarhus
|
||||
|
@@ -5,19 +5,19 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1(a int);
|
||||
select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1;
|
||||
select * into outfile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1;
|
||||
truncate table t1;
|
||||
load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1;
|
||||
load data local infile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1;
|
||||
select a,count(*) from t1 group by a;
|
||||
a count(*)
|
||||
1 10000
|
||||
drop table t1;
|
||||
create table t1(a int);
|
||||
insert into t1 values (1), (2), (2), (3);
|
||||
select * into outfile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1;
|
||||
select * into outfile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
create table t1(a int primary key);
|
||||
load data local infile 'MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1;
|
||||
load data local infile 'MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1;
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
a
|
||||
1
|
||||
|
@@ -8,11 +8,11 @@ DROP PROCEDURE IF EXISTS test.p1;
|
||||
DROP TABLE IF EXISTS test.t1;
|
||||
CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a));
|
||||
INSERT INTO test.t1 VALUES(1,'test');
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1;
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=1;
|
||||
create procedure test.p1()
|
||||
begin
|
||||
INSERT INTO test.t1 VALUES(2,'test');
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2;
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=2;
|
||||
end|
|
||||
CALL test.p1();
|
||||
SELECT * FROM test.t1 ORDER BY blob_column;
|
||||
|
@@ -15,7 +15,7 @@ insert into t1 values(3, 0, 0, 0, password('does_this_work?'));
|
||||
insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?'));
|
||||
select * into outfile 'rpl_misc_functions.outfile' from t1;
|
||||
create table t2 like t1;
|
||||
load data local infile 'MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2;
|
||||
load data local infile 'MYSQLD_DATADIR/test/rpl_misc_functions.outfile' into table t2;
|
||||
select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p);
|
||||
id i r1 r2 p id i r1 r2 p
|
||||
drop table t1;
|
||||
@@ -41,9 +41,9 @@ CALL test_replication_sp2();
|
||||
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
||||
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
||||
INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
||||
select * from t1 into outfile "../tmp/t1_slave.txt";
|
||||
select * from t1 into outfile "../../tmp/t1_slave.txt";
|
||||
create temporary table t1_slave select * from t1 where 1=0;
|
||||
load data infile '../tmp/t1_slave.txt' into table t1_slave;
|
||||
load data infile '../../tmp/t1_slave.txt' into table t1_slave;
|
||||
select count(*) into @aux from t1 join t1_slave using (id)
|
||||
where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ;
|
||||
SELECT @aux;
|
||||
|
@@ -9,7 +9,7 @@ drop table if exists t11;
|
||||
create table t2 (n int);
|
||||
insert into t2 values(4);
|
||||
create table t2 (s char(20));
|
||||
load data infile '../std_data_ln/words.dat' into table t2;
|
||||
load data infile '../../std_data/words.dat' into table t2;
|
||||
insert into t2 values('five');
|
||||
create table t1 (m int);
|
||||
insert into t1 values(15),(16),(17);
|
||||
|
@@ -24,7 +24,7 @@ drop database if exists rewrite;
|
||||
create database rewrite;
|
||||
use test;
|
||||
create table t1 (a date, b date, c date not null, d date);
|
||||
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',';
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'a' at row 1
|
||||
Warning 1265 Data truncated for column 'c' at row 1
|
||||
@@ -32,7 +32,7 @@ Warning 1265 Data truncated for column 'd' at row 1
|
||||
Warning 1265 Data truncated for column 'a' at row 2
|
||||
Warning 1265 Data truncated for column 'b' at row 2
|
||||
Warning 1265 Data truncated for column 'd' at row 2
|
||||
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
|
||||
select * from rewrite.t1;
|
||||
a b c d
|
||||
0000-00-00 NULL 0000-00-00 0000-00-00
|
||||
@@ -40,7 +40,7 @@ a b c d
|
||||
2003-03-03 2003-03-03 2003-03-03 NULL
|
||||
2003-03-03 2003-03-03 2003-03-03 NULL
|
||||
truncate table t1;
|
||||
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 'c' at row 1
|
||||
Warning 1265 Data truncated for column 'd' at row 1
|
||||
@@ -53,7 +53,7 @@ NULL 0000-00-00 0000-00-00 0000-00-00
|
||||
NULL 2003-03-03 2003-03-03 NULL
|
||||
drop table t1;
|
||||
create table t1 (a text, b text);
|
||||
load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
|
||||
load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
|
||||
Warnings:
|
||||
Warning 1261 Row 3 doesn't contain data for all columns
|
||||
select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1;
|
||||
@@ -65,7 +65,7 @@ Field 3,'Field 4|
|
||||
|Field 6| | 'Field 7'|
|
||||
drop table t1;
|
||||
create table t1 (a int, b char(10));
|
||||
load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
|
||||
load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
|
||||
Warnings:
|
||||
Warning 1366 Incorrect integer value: 'error ' for column 'a' at row 3
|
||||
Warning 1262 Row 3 was truncated; it contained more data than there were input columns
|
||||
@@ -79,7 +79,7 @@ a b
|
||||
3 row 3
|
||||
0 1234567890
|
||||
truncate table t1;
|
||||
load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
|
||||
load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
|
||||
Warnings:
|
||||
Warning 1366 Incorrect integer value: '
|
||||
' for column 'a' at row 4
|
||||
|
@@ -5,8 +5,8 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
CREATE TABLE t1 (word CHAR(20) NOT NULL);
|
||||
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
|
||||
LOAD DATA LOCAL INFILE 'MYSQL_TEST_DIR/std_data/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
|
||||
LOAD DATA INFILE 'LOAD_FILE' INTO TABLE t1;
|
||||
SELECT * FROM t1 ORDER BY word LIMIT 10;
|
||||
word
|
||||
Aarhus
|
||||
|
@@ -9,7 +9,7 @@ stop slave;
|
||||
create database mysqltest;
|
||||
use mysqltest;
|
||||
create table t1(a int, b int, unique(b));
|
||||
load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
show binlog events from 102;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
master-bin.000001 # Query 1 # #
|
||||
|
@@ -12,7 +12,7 @@ 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)ENGINE=MyISAM;
|
||||
load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
|
||||
load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
69
|
||||
|
@@ -12,7 +12,7 @@ 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_ln/words.dat' into table t1 ignore 1 lines;
|
||||
load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
69
|
||||
|
@@ -5,7 +5,7 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1 (words varchar(20)) engine=myisam;
|
||||
load data infile '../std_data_ln/words.dat' into table t1 (words);
|
||||
load data infile '../../std_data/words.dat' into table t1 (words);
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
70
|
||||
|
@@ -5,7 +5,7 @@ reset slave;
|
||||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
|
||||
start slave;
|
||||
create table t1 (word char(20) not null);
|
||||
load data infile '../std_data_ln/words.dat' into table t1;
|
||||
load data infile '../../std_data/words.dat' into table t1;
|
||||
load data local infile 'MYSQL_TEST_DIR/std_data/words.dat' into table t1;
|
||||
select * from t1 limit 10;
|
||||
word
|
||||
|
@@ -12,7 +12,7 @@ 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)ENGINE=MyISAM;
|
||||
load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines;
|
||||
load data infile 'LOAD_FILE' into table t1 ignore 1 lines;
|
||||
select count(*) from t1;
|
||||
count(*)
|
||||
69
|
||||
@@ -25,7 +25,7 @@ master-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
|
||||
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=MyISAM
|
||||
master-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
|
||||
master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=1
|
||||
master-bin.000001 # Execute_load_query 1 # use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=1
|
||||
show binlog events from 106 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=MyISAM
|
||||
@@ -197,7 +197,7 @@ master-bin.000001 # Query # # use `test`; insert into t1 values (NULL)
|
||||
master-bin.000001 # Query # # use `test`; drop table t1
|
||||
master-bin.000001 # Query # # use `test`; create table t1 (word char(20) not null)ENGINE=MyISAM
|
||||
master-bin.000001 # Begin_load_query # # ;file_id=#;block_len=581
|
||||
master-bin.000001 # Execute_load_query # # use `test`; load data infile '../std_data_ln/words.dat' into table t1 ignore 1 lines ;file_id=#
|
||||
master-bin.000001 # Execute_load_query # # use `test`; load data infile '../../std_data/words.dat' into table t1 ignore 1 lines ;file_id=#
|
||||
master-bin.000001 # Rotate # # master-bin.000002;pos=4
|
||||
show binlog events in 'master-bin.000002';
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
@@ -212,7 +212,7 @@ master-bin.000002 392
|
||||
start slave;
|
||||
show binary logs;
|
||||
Log_name File_size
|
||||
slave-bin.000001 1447
|
||||
slave-bin.000001 1450
|
||||
slave-bin.000002 293
|
||||
show binlog events in 'slave-bin.000001' from 4;
|
||||
Log_name Pos Event_type Server_id End_log_pos Info
|
||||
@@ -223,7 +223,7 @@ slave-bin.000001 # Query 1 # use `test`; insert into t1 values (NULL)
|
||||
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=MyISAM
|
||||
slave-bin.000001 # Begin_load_query 1 # ;file_id=1;block_len=581
|
||||
slave-bin.000001 # Execute_load_query 1 # use `test`; load data INFILE '../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1
|
||||
slave-bin.000001 # Execute_load_query 1 # use `test`; load data INFILE '../../tmp/SQL_LOAD-2-1-1.data' INTO table t1 ignore 1 lines ;file_id=1
|
||||
slave-bin.000001 # Query 1 # use `test`; create table t3 (a int)ENGINE=MyISAM
|
||||
slave-bin.000001 # Rotate 2 # slave-bin.000002;pos=4
|
||||
show binlog events in 'slave-bin.000002' from 4;
|
||||
|
@@ -42,7 +42,7 @@ t n
|
||||
2004-06-11 09:39:02 6
|
||||
delete from t1;
|
||||
set time_zone='UTC';
|
||||
load data infile '../std_data_ln/rpl_timezone2.dat' into table t1;
|
||||
load data infile '../../std_data/rpl_timezone2.dat' into table t1;
|
||||
Warnings:
|
||||
Warning 1265 Data truncated for column 't' at row 1
|
||||
Warning 1261 Row 1 doesn't contain data for all columns
|
||||
|
51
mysql-test/suite/rpl/rpl_1slave_base.cnf
Normal file
51
mysql-test/suite/rpl/rpl_1slave_base.cnf
Normal file
@@ -0,0 +1,51 @@
|
||||
# Use default setting for mysqld processes
|
||||
!include include/default_mysqld.cnf
|
||||
|
||||
[mysqld.1]
|
||||
|
||||
# Run the master.sh script before starting this process
|
||||
#!run-master-sh
|
||||
|
||||
log-bin= master-bin
|
||||
|
||||
[mysqld.2]
|
||||
# Run the slave.sh script before starting this process
|
||||
#!run-slave-sh
|
||||
|
||||
# Append <testname>-slave.opt file to the list of argument used when
|
||||
# starting the mysqld
|
||||
#!use-slave-opt
|
||||
|
||||
log-bin= slave-bin
|
||||
relay-log= slave-relay-bin
|
||||
|
||||
init-rpl-role= slave
|
||||
log-slave-updates
|
||||
master-retry-count= 10
|
||||
|
||||
# Values reported by slave when it connect to master
|
||||
# and shows up in SHOW SLAVE STATUS;
|
||||
report-host= 127.0.0.1
|
||||
report-port= @mysqld.2.port
|
||||
report-user= root
|
||||
|
||||
skip-slave-start
|
||||
|
||||
# Directory where slaves find the dumps generated by "load data"
|
||||
# on the server. The path need to have constant length otherwise
|
||||
# test results will vary, thus a relative path is used.
|
||||
slave-load-tmpdir= ../../tmp
|
||||
|
||||
|
||||
rpl-recovery-rank= @mysqld.2.server-id
|
||||
|
||||
loose-skip-innodb
|
||||
|
||||
|
||||
[ENV]
|
||||
MASTER_MYPORT= @mysqld.1.port
|
||||
MASTER_MYSOCK= @mysqld.1.socket
|
||||
|
||||
SLAVE_MYPORT= @mysqld.2.port
|
||||
SLAVE_MYSOCK= @mysqld.2.socket
|
||||
|
@@ -1,6 +1,6 @@
|
||||
rm -f $MYSQLTEST_VARDIR/log/*relay*
|
||||
rm -f $MYSQLTEST_VARDIR/slave-data/relay-log.info
|
||||
cat > $MYSQLTEST_VARDIR/slave-data/master.info <<EOF
|
||||
rm -f $MYSQLTEST_VARDIR/mysqld.2/data/relay-log.info
|
||||
cat > $MYSQLTEST_VARDIR/mysqld.2/data/master.info <<EOF
|
||||
master-bin.000001
|
||||
4
|
||||
127.0.0.1
|
||||
|
2
mysql-test/suite/rpl/t/rpl_000015-master.opt
Normal file
2
mysql-test/suite/rpl/t/rpl_000015-master.opt
Normal file
@@ -0,0 +1,2 @@
|
||||
--config-file-template=../rpl_1slave_base.cnf
|
||||
|
@@ -16,10 +16,10 @@ DROP TABLE IF EXISTS test.t1;
|
||||
|
||||
# Section 1 test
|
||||
CREATE TABLE test.t1 (a VARCHAR(255), PRIMARY KEY(a));
|
||||
LOAD DATA INFILE '../std_data_ln/words2.dat' INTO TABLE test.t1;
|
||||
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_ln/words2.dat' INTO TABLE test.t1;
|
||||
LOAD DATA INFILE '../../std_data/words2.dat' INTO TABLE test.t1;
|
||||
|
||||
|
||||
SELECT * FROM test.t1 ORDER BY a DESC;
|
||||
|
@@ -53,7 +53,8 @@ drop database mysqltest1;
|
||||
|
||||
connection master;
|
||||
# Remove the "extra" file created above
|
||||
--remove_file $MYSQLTEST_VARDIR/master-data/mysqltest1/f1.txt
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--remove_file $MYSQLD_DATADIR/mysqltest1/f1.txt
|
||||
drop database mysqltest1;
|
||||
|
||||
use test;
|
||||
|
@@ -1 +1 @@
|
||||
-O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/master-data/relay-log
|
||||
-O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.1/data/relay-log
|
||||
|
@@ -1 +1 @@
|
||||
-O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/slave-data/relay-log
|
||||
-O max_binlog_size=1M --relay-log=$MYSQLTEST_VARDIR/mysqld.2/data/relay-log
|
||||
|
@@ -2,7 +2,8 @@
|
||||
# in case of bi-directional replication
|
||||
-- source include/master-slave.inc
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR/
|
||||
show variables like 'relay_log%';
|
||||
|
||||
connection slave;
|
||||
|
@@ -18,7 +18,7 @@ CREATE TABLE t4 (
|
||||
|
||||
--disable_warnings
|
||||
LOAD DATA
|
||||
INFILE '../std_data_ln/loaddata_pair.dat'
|
||||
INFILE '../../std_data/loaddata_pair.dat'
|
||||
REPLACE INTO TABLE t4
|
||||
(name,number);
|
||||
--enable_warnings
|
||||
@@ -30,7 +30,7 @@ SELECT * FROM t4;
|
||||
connection master;
|
||||
--disable_warnings
|
||||
LOAD DATA
|
||||
INFILE '../std_data_ln/loaddata_pair.dat'
|
||||
INFILE '../../std_data/loaddata_pair.dat'
|
||||
REPLACE INTO TABLE t4
|
||||
(name,number);
|
||||
--enable_warnings
|
||||
|
@@ -1 +0,0 @@
|
||||
--innodb --innodb_autoinc_lock_mode=0
|
@@ -1,68 +0,0 @@
|
||||
--source include/have_innodb.inc
|
||||
--source include/have_partition.inc
|
||||
--vertical_results
|
||||
let $engine_type= 'innodb';
|
||||
|
||||
######## Creat Table Section #########
|
||||
use test;
|
||||
|
||||
eval CREATE TABLE test.part_tbl(id MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
dt TIMESTAMP, user CHAR(255), uuidf LONGBLOB,
|
||||
fkid MEDIUMINT, filler VARCHAR(255),
|
||||
PRIMARY KEY(id)) ENGINE=$engine_type
|
||||
PARTITION BY RANGE(id)
|
||||
SUBPARTITION BY hash(id) subpartitions 2
|
||||
(PARTITION pa3 values less than (42),
|
||||
PARTITION pa6 values less than (60),
|
||||
PARTITION pa7 values less than (70),
|
||||
PARTITION pa8 values less than (80),
|
||||
PARTITION pa9 values less than (90),
|
||||
PARTITION pa10 values less than (100),
|
||||
PARTITION pa11 values less than MAXVALUE);
|
||||
|
||||
######## Create SPs, Functions, Views and Triggers Section ##############
|
||||
|
||||
delimiter |;
|
||||
|
||||
CREATE PROCEDURE test.proc_part()
|
||||
BEGIN
|
||||
DECLARE ins_count INT DEFAULT 1000;
|
||||
DECLARE del_count INT;
|
||||
DECLARE cur_user VARCHAR(255);
|
||||
DECLARE local_uuid VARCHAR(255);
|
||||
DECLARE local_time TIMESTAMP;
|
||||
|
||||
SET local_time= NOW();
|
||||
SET cur_user= CURRENT_USER();
|
||||
SET local_uuid= UUID();
|
||||
|
||||
WHILE ins_count > 0 DO
|
||||
INSERT INTO test.part_tbl VALUES (NULL, NOW(), USER() , UUID(),
|
||||
ins_count,'Going to test MBR for MySQL');
|
||||
SET ins_count = ins_count - 1;
|
||||
END WHILE;
|
||||
SELECT MAX(id) FROM test.part_tbl INTO del_count;
|
||||
WHILE del_count > 0 DO
|
||||
DELETE FROM test.part_tbl WHERE id = del_count;
|
||||
select count(*) as internal_count, del_count -- these two lines are for
|
||||
FROM test.part_tbl; -- debug to show the problem
|
||||
SET del_count = del_count - 2;
|
||||
END WHILE;
|
||||
END|
|
||||
|
||||
delimiter ;|
|
||||
|
||||
############ Finish Setup Section ###################
|
||||
|
||||
############ Test Section ###################
|
||||
--horizontal_results
|
||||
|
||||
CALL test.proc_part();
|
||||
|
||||
select count(*) as Part from test.part_tbl;
|
||||
|
||||
###### CLEAN UP SECTION ##############
|
||||
|
||||
DROP PROCEDURE test.proc_part;
|
||||
DROP TABLE test.part_tbl;
|
||||
|
@@ -144,10 +144,11 @@ select * from mysqltest.t1;
|
||||
# DISABLED FOR NOW AS chmod IS NOT PORTABLE ON NON-UNIX
|
||||
# insert into mysqltest.t1 values(10, 'should be there');
|
||||
# flush tables;
|
||||
# system chmod 500 $MYSQLTEST_VARDIR/slave-data/mysqltest/;
|
||||
let $MYSQLD_SLAVE_DATADIR= `select @@datadir`;
|
||||
# system chmod 500 $MYSQLD_SLAVE_DATADIR/mysqltest/;
|
||||
# --error 6
|
||||
# load data from master; # should fail (errno 13)
|
||||
# system chmod 700 $MYSQLTEST_VARDIR/slave-data/mysqltest/;
|
||||
# system chmod 700 $MYSQLD_SLAVE_DATADIR/mysqltest/;
|
||||
# select * from mysqltest.t1; # should contain the row (10, ...)
|
||||
|
||||
|
||||
|
@@ -71,9 +71,9 @@ 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_ln/words.dat' into table t1;
|
||||
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_ln/words.dat' into table t2;
|
||||
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;
|
||||
|
@@ -9,17 +9,17 @@ source include/master-slave.inc;
|
||||
#
|
||||
connection master;
|
||||
create table t1 (a varchar(10) character set utf8);
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=koi8r;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=DEFAULT;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=koi8r;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1;
|
||||
set @@character_set_database=DEFAULT;
|
||||
load data infile '../std_data_ln/loaddata6.dat' into table t1 character set koi8r;
|
||||
load data infile '../../std_data/loaddata6.dat' into table t1 character set koi8r;
|
||||
|
||||
select hex(a) from t1;
|
||||
|
||||
|
@@ -13,7 +13,7 @@ source include/show_slave_status.inc;
|
||||
# Now we feed it a load data infile, which should make it stop with a
|
||||
# fatal error.
|
||||
connection master;
|
||||
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE t1;
|
||||
|
||||
connection slave;
|
||||
wait_for_slave_to_stop;
|
||||
|
@@ -17,14 +17,14 @@ connection master;
|
||||
# 'test' database should be ignored by the slave
|
||||
USE test;
|
||||
CREATE TABLE t1(a INT, b INT, UNIQUE(b));
|
||||
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE test.t1;
|
||||
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE test.t1;
|
||||
SELECT COUNT(*) FROM test.t1;
|
||||
|
||||
# 'mysqltest' database should NOT be ignored by the slave
|
||||
CREATE DATABASE mysqltest;
|
||||
USE mysqltest;
|
||||
CREATE TABLE t1(a INT, b INT, UNIQUE(b));
|
||||
LOAD DATA INFILE '../std_data_ln/rpl_loaddata.dat' INTO TABLE mysqltest.t1;
|
||||
LOAD DATA INFILE '../../std_data/rpl_loaddata.dat' INTO TABLE mysqltest.t1;
|
||||
SELECT COUNT(*) FROM mysqltest.t1;
|
||||
|
||||
# Now lets check the slave to see what we have :-)
|
||||
|
@@ -12,7 +12,7 @@ reset master;
|
||||
connection master;
|
||||
# 'test' is the current database
|
||||
create table test.t1(a int, b int, unique(b));
|
||||
load data infile '../std_data_ln/rpl_loaddata.dat' into table test.t1;
|
||||
load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
|
||||
|
||||
# Test logging on slave;
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
--source include/master-slave.inc
|
||||
|
||||
CREATE TABLE t1 (word CHAR(20) NOT NULL);
|
||||
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||||
SELECT * FROM t1 ORDER BY word;
|
||||
sync_slave_with_master;
|
||||
|
||||
|
@@ -19,13 +19,14 @@ while ($1)
|
||||
}
|
||||
set SQL_LOG_BIN=1;
|
||||
enable_query_log;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
eval select * into outfile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1;
|
||||
#This will generate a 20KB file, now test LOAD DATA LOCAL
|
||||
truncate table t1;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1;
|
||||
--remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
eval load data local infile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1;
|
||||
--remove_file $MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
sync_with_master;
|
||||
@@ -46,13 +47,13 @@ sync_with_master;
|
||||
connection master;
|
||||
create table t1(a int);
|
||||
insert into t1 values (1), (2), (2), (3);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval select * into outfile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' from t1;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
eval select * into outfile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' from t1;
|
||||
drop table t1;
|
||||
create table t1(a int primary key);
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile' into table t1;
|
||||
--remove_file $MYSQLTEST_VARDIR/master-data/rpl_loaddatalocal.select_outfile
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
eval load data local infile '$MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile' into table t1;
|
||||
--remove_file $MYSQLD_DATADIR/rpl_loaddatalocal.select_outfile
|
||||
SELECT * FROM t1 ORDER BY a;
|
||||
save_master_pos;
|
||||
connection slave;
|
||||
|
@@ -24,12 +24,12 @@ DROP TABLE IF EXISTS test.t1;
|
||||
|
||||
CREATE TABLE test.t1 (a INT, blob_column LONGBLOB, PRIMARY KEY(a));
|
||||
INSERT INTO test.t1 VALUES(1,'test');
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=1;
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=1;
|
||||
delimiter |;
|
||||
create procedure test.p1()
|
||||
begin
|
||||
INSERT INTO test.t1 VALUES(2,'test');
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../std_data_ln/words2.dat') WHERE a=2;
|
||||
UPDATE test.t1 SET blob_column=LOAD_FILE('../../std_data/words2.dat') WHERE a=2;
|
||||
end|
|
||||
delimiter ;|
|
||||
|
||||
|
@@ -21,11 +21,12 @@ insert into t1 values(3, 0, 0, 0, password('does_this_work?'));
|
||||
# "altogether now"
|
||||
insert into t1 values(4, connection_id(), rand()*1000, rand()*1000, password('does_this_still_work?'));
|
||||
select * into outfile 'rpl_misc_functions.outfile' from t1;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
sync_slave_with_master;
|
||||
create table t2 like t1;
|
||||
# read the values from the master table
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
eval load data local infile '$MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile' into table t2;
|
||||
--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
|
||||
eval load data local infile '$MYSQLD_DATADIR/test/rpl_misc_functions.outfile' into table t2;
|
||||
# compare them with the replica; the SELECT below should return no row
|
||||
select * from t1, t2 where (t1.id=t2.id) and not(t1.i=t2.i and t1.r1=t2.r1 and t1.r2=t2.r2 and t1.p=t2.p);
|
||||
|
||||
@@ -81,12 +82,12 @@ INSERT INTO t1 (col_a) VALUES (test_replication_sf());
|
||||
--sync_slave_with_master
|
||||
|
||||
# Dump table on slave
|
||||
select * from t1 into outfile "../tmp/t1_slave.txt";
|
||||
select * from t1 into outfile "../../tmp/t1_slave.txt";
|
||||
|
||||
# Load data from slave into temp table on master
|
||||
connection master;
|
||||
create temporary table t1_slave select * from t1 where 1=0;
|
||||
load data infile '../tmp/t1_slave.txt' into table t1_slave;
|
||||
load data infile '../../tmp/t1_slave.txt' into table t1_slave;
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/t1_slave.txt
|
||||
|
||||
# Compare master and slave temp table, use subtraction
|
||||
@@ -109,7 +110,7 @@ DROP TABLE t1, t1_slave;
|
||||
DROP PROCEDURE test_replication_sp1;
|
||||
DROP PROCEDURE test_replication_sp2;
|
||||
DROP FUNCTION test_replication_sf;
|
||||
--remove_file $MYSQLTEST_VARDIR/master-data/test/rpl_misc_functions.outfile
|
||||
--remove_file $MYSQLD_DATADIR/test/rpl_misc_functions.outfile
|
||||
--sync_slave_with_master
|
||||
|
||||
|
||||
|
@@ -11,7 +11,7 @@ create table t2 (n int);
|
||||
insert into t2 values(4);
|
||||
connection master;
|
||||
create table t2 (s char(20));
|
||||
load data infile '../std_data_ln/words.dat' into table t2;
|
||||
load data infile '../../std_data/words.dat' into table t2;
|
||||
insert into t2 values('five');
|
||||
create table t1 (m int);
|
||||
insert into t1 values(15),(16),(17);
|
||||
|
@@ -34,8 +34,8 @@ create database rewrite;
|
||||
connection master;
|
||||
use test;
|
||||
create table t1 (a date, b date, c date not null, d date);
|
||||
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',';
|
||||
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
@@ -43,7 +43,7 @@ select * from rewrite.t1;
|
||||
|
||||
connection master;
|
||||
truncate table t1;
|
||||
load data infile '../std_data_ln/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
|
||||
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
@@ -52,7 +52,7 @@ select * from rewrite.t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
create table t1 (a text, b text);
|
||||
load data infile '../std_data_ln/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
|
||||
load data infile '../../std_data/loaddata2.dat' into table t1 fields terminated by ',' enclosed by '''';
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
@@ -61,7 +61,7 @@ select concat('|',a,'|'), concat('|',b,'|') from rewrite.t1;
|
||||
connection master;
|
||||
drop table t1;
|
||||
create table t1 (a int, b char(10));
|
||||
load data infile '../std_data_ln/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
|
||||
load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
@@ -69,7 +69,7 @@ select * from rewrite.t1;
|
||||
|
||||
connection master;
|
||||
truncate table t1;
|
||||
load data infile '../std_data_ln/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
|
||||
load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
|
@@ -1 +1,3 @@
|
||||
-O max_binlog_size=4096
|
||||
--config-file-template=../rpl_1slave_base.cnf
|
||||
|
||||
|
@@ -23,9 +23,10 @@ drop table if exists t1, t2, t3, t4;
|
||||
--enable_warnings
|
||||
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
|
||||
# Create empty file
|
||||
write_file $MYSQLTEST_VARDIR/slave-data/master.info;
|
||||
let $MYSQLD_SLAVE_DATADIR= `select @@datadir`;
|
||||
write_file $MYSQLD_SLAVE_DATADIR/master.info;
|
||||
EOF
|
||||
chmod 0000 $MYSQLTEST_VARDIR/slave-data/master.info;
|
||||
chmod 0000 $MYSQLD_SLAVE_DATADIR/master.info;
|
||||
connection slave;
|
||||
--disable_warnings
|
||||
drop table if exists t1, t2, t3, t4;
|
||||
@@ -36,7 +37,7 @@ drop table if exists t1, t2, t3, t4;
|
||||
--replace_result $MYSQL_TEST_DIR TESTDIR
|
||||
--error 1105,1105,29
|
||||
start slave;
|
||||
chmod 0600 $MYSQLTEST_VARDIR/slave-data/master.info;
|
||||
chmod 0600 $MYSQLD_SLAVE_DATADIR/master.info;
|
||||
# It will fail again because the file is empty so the slave cannot get valuable
|
||||
# info about how to connect to the master from it (failure in
|
||||
# init_strvar_from_file() in init_master_info()).
|
||||
|
@@ -37,11 +37,11 @@ CREATE TABLE t3(c1 INT NOT NULL PRIMARY KEY, c2 LONGBLOB, c3 TIMESTAMP, c4 TEXT,
|
||||
|
||||
--disable_query_log
|
||||
INSERT INTO t1 VALUES ("abirvalg");
|
||||
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../std_data_ln/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||||
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE t1;
|
||||
|
||||
# d1 length 3000
|
||||
set @d1 = 'dd1';
|
||||
@@ -96,10 +96,10 @@ select "--- Test 1 Dump binlog to file --" as "";
|
||||
|
||||
#
|
||||
# Prepare local temporary file to recreate what we have currently.
|
||||
let $MYSQLD_DATADIR= `select @@datadir;`;
|
||||
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql
|
||||
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/master.sql
|
||||
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/master.sql
|
||||
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000002 >> $MYSQLTEST_VARDIR/tmp/master.sql
|
||||
|
||||
# Now that we have our file, lets get rid of the current database.
|
||||
# Cleanup the master and the slave and try to recreate.
|
||||
@@ -160,7 +160,7 @@ connection master;
|
||||
|
||||
# We should be gold by the time, so I will get rid of our file.
|
||||
|
||||
--exec rm $MYSQLTEST_VARDIR/tmp/master.sql
|
||||
remove_file $MYSQLTEST_VARDIR/tmp/master.sql;
|
||||
|
||||
|
||||
# this test for position option
|
||||
@@ -168,8 +168,9 @@ connection master;
|
||||
--disable_query_log
|
||||
select "--- Test 2 position test --" as "";
|
||||
--enable_query_log
|
||||
let $MYSQLD_DATADIR= `select @@datadir;`;
|
||||
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
|
||||
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 $MYSQLTEST_VARDIR/log/master-bin.000001
|
||||
--exec $MYSQL_BINLOG --short-form --local-load=$MYSQLTEST_VARDIR/tmp/ --position=416 $MYSQLD_DATADIR/master-bin.000001
|
||||
|
||||
# These are tests for remote binlog.
|
||||
# They should return the same as previous test.
|
||||
@@ -258,14 +259,15 @@ select "--- Test 5 LOAD DATA --" as "";
|
||||
--disable_query_log
|
||||
select "--- Test 6 reading stdin --" as "";
|
||||
--enable_query_log
|
||||
let $MYSQLD_DATADIR= `select @@datadir;`;
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
--exec $MYSQL_BINLOG --short-form - < $MYSQLTEST_VARDIR/log/master-bin.000001
|
||||
--exec $MYSQL_BINLOG --short-form - < $MYSQLD_DATADIR/master-bin.000001
|
||||
|
||||
--disable_query_log
|
||||
select "--- Test 7 reading stdin w/position --" as "";
|
||||
--enable_query_log
|
||||
--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
|
||||
--exec $MYSQL_BINLOG --short-form --position=416 - < $MYSQLTEST_VARDIR/log/master-bin.000001
|
||||
--exec $MYSQL_BINLOG --short-form --position=416 - < $MYSQLD_DATADIR/master-bin.000001
|
||||
|
||||
# Bug#16217 (mysql client did not know how not switch its internal charset)
|
||||
--disable_query_log
|
||||
@@ -294,9 +296,10 @@ create table t4 (f text character set utf8);
|
||||
create table t5 (f text character set cp932);
|
||||
--exec $MYSQL --default-character-set=utf8 test -e "insert into t4 values(_utf8'ソ')"
|
||||
--exec $MYSQL --default-character-set=cp932 test -e "insert into t5 values(_cp932'<27>\');"
|
||||
let $MYSQLD_DATADIR= `select @@datadir;`;
|
||||
flush logs;
|
||||
rename table t4 to t04, t5 to t05;
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 | $MYSQL --default-character-set=utf8
|
||||
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 | $MYSQL --default-character-set=utf8
|
||||
# original and recovered data must be equal
|
||||
select HEX(f) from t04;
|
||||
select HEX(f) from t4;
|
||||
@@ -332,10 +335,12 @@ INSERT INTO t1 VALUES(1,1);
|
||||
|
||||
SELECT * FROM t1;
|
||||
|
||||
let $MYSQLD_DATADIR= `select @@datadir;`;
|
||||
|
||||
FLUSH LOGS;
|
||||
|
||||
--exec $MYSQL_BINLOG --read-from-remote-server --user=root --host=127.0.0.1 --port=$MASTER_MYPORT master-bin.000001 > $MYSQLTEST_VARDIR/tmp/remote.sql
|
||||
--exec $MYSQL_BINLOG $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/local.sql
|
||||
--exec $MYSQL_BINLOG $MYSQLD_DATADIR/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/local.sql
|
||||
|
||||
--diff_files $MYSQLTEST_VARDIR/tmp/local.sql $MYSQLTEST_VARDIR/tmp/remote.sql
|
||||
|
||||
|
@@ -84,6 +84,7 @@ let $message=< ---- Master selects-- >;
|
||||
--source include/show_msg.inc
|
||||
connection master;
|
||||
CALL test.p1();
|
||||
|
||||
let $wait_condition= SELECT COUNT(*) = 4 FROM t3;
|
||||
--source include/wait_condition.inc
|
||||
save_master_pos;
|
||||
|
@@ -9,7 +9,7 @@
|
||||
connection master;
|
||||
create table t1 (words varchar(20)) engine=myisam;
|
||||
|
||||
load data infile '../std_data_ln/words.dat' into table t1 (words);
|
||||
load data infile '../../std_data/words.dat' into table t1 (words);
|
||||
select count(*) from t1;
|
||||
save_master_pos;
|
||||
|
||||
|
@@ -67,7 +67,7 @@ connection master;
|
||||
connection master;
|
||||
delete from t1;
|
||||
set time_zone='UTC';
|
||||
load data infile '../std_data_ln/rpl_timezone2.dat' into table t1;
|
||||
load data infile '../../std_data/rpl_timezone2.dat' into table t1;
|
||||
SELECT * FROM t1 ORDER BY n;
|
||||
sync_slave_with_master;
|
||||
set time_zone='UTC';
|
||||
|
@@ -300,8 +300,10 @@ STOP SLAVE;
|
||||
# Replace master's binlog.
|
||||
|
||||
connection master;
|
||||
let $MYSQLD_DATADIR= `select @@datadir`;
|
||||
FLUSH LOGS;
|
||||
exec cp $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLTEST_VARDIR/log/master-bin.000001;
|
||||
remove_file $MYSQLD_DATADIR/master-bin.000001;
|
||||
copy_file $MYSQL_TEST_DIR/std_data/bug16266.000001 $MYSQLD_DATADIR/master-bin.000001;
|
||||
|
||||
# Make the slave to replay the new binlog.
|
||||
|
||||
|
Reference in New Issue
Block a user