mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-6720 - enable connection log in mysqltest by default
This commit is contained in:
@ -29,6 +29,7 @@ create temporary table t2 (day date,id int(9),category enum('a','b','c'),name va
|
||||
load data CONCURRENT 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;
|
||||
connection slave;
|
||||
select * from t1;
|
||||
a b
|
||||
1 10
|
||||
@ -38,20 +39,26 @@ day id category name
|
||||
2003-02-22 2461 b a a a @ % ' " a
|
||||
2003-03-22 2161 c asdf
|
||||
2003-03-22 2416 a bbbbb
|
||||
connection master;
|
||||
drop table t1;
|
||||
drop table t2;
|
||||
drop table t3;
|
||||
create table t1(a int, b int, unique(b));
|
||||
connection slave;
|
||||
insert into t1 values(1,10);
|
||||
connection master;
|
||||
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
connection slave;
|
||||
call mtr.add_suppression("Slave SQL.*Error .Duplicate entry .10. for key .b.. on query.* error.* 1062");
|
||||
call mtr.add_suppression("Slave SQL.*Query caused different errors on master and slave.*Error on master:.*error code=1062.*Error on slave:.*error.* 0");
|
||||
include/wait_for_slave_sql_error_and_skip.inc [errno=1062]
|
||||
include/check_slave_no_error.inc
|
||||
connection master;
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
connection slave;
|
||||
include/wait_for_slave_sql_error.inc [errno=1062]
|
||||
include/stop_slave_io.inc
|
||||
change master to master_user='test';
|
||||
@ -59,14 +66,17 @@ change master to master_user='root';
|
||||
include/check_slave_no_error.inc
|
||||
set global sql_slave_skip_counter=1;
|
||||
start slave;
|
||||
connection master;
|
||||
set sql_log_bin=0;
|
||||
delete from t1;
|
||||
set sql_log_bin=1;
|
||||
load data CONCURRENT infile '../../std_data/rpl_loaddata.dat' into table t1;
|
||||
connection slave;
|
||||
include/wait_for_slave_sql_error.inc [errno=1062]
|
||||
stop slave;
|
||||
reset slave;
|
||||
include/check_slave_no_error.inc
|
||||
connection master;
|
||||
reset master;
|
||||
create table t2 (day date,id int(9),category enum('a','b','c'),name varchar(60),
|
||||
unique(day)) engine=MyISAM;
|
||||
@ -78,25 +88,30 @@ select * from t2;
|
||||
day id category name
|
||||
2003-02-22 2461 b a a a @ % ' " a
|
||||
2003-03-22 2161 c asdf
|
||||
connection slave;
|
||||
start slave;
|
||||
select * from t2;
|
||||
day id category name
|
||||
2003-02-22 2461 b a a a @ % ' " a
|
||||
2003-03-22 2161 c asdf
|
||||
alter table t2 drop key day;
|
||||
connection master;
|
||||
delete from t2;
|
||||
load data CONCURRENT 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'
|
||||
connection slave;
|
||||
include/wait_for_slave_sql_error.inc [errno=0]
|
||||
drop table t1, t2;
|
||||
connection master;
|
||||
drop table t1, t2;
|
||||
CREATE TABLE t1 (word CHAR(20) NOT NULL PRIMARY KEY) ENGINE=INNODB;
|
||||
LOAD DATA CONCURRENT INFILE "../../std_data/words.dat" INTO TABLE t1;
|
||||
ERROR 23000: Duplicate entry 'Aarhus' for key 'PRIMARY'
|
||||
DROP TABLE t1;
|
||||
include/rpl_reset.inc
|
||||
connection master;
|
||||
drop database if exists b48297_db1;
|
||||
drop database if exists b42897_db2;
|
||||
create database b48297_db1;
|
||||
@ -112,15 +127,21 @@ LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO
|
||||
### assertion: works without fully qualified name on current database
|
||||
LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE t1;
|
||||
### create connection without default database
|
||||
### connect (conn2,localhost,root,,*NO-ONE*);
|
||||
connect conn2,localhost,root,,*NO-ONE*;
|
||||
connection conn2;
|
||||
### assertion: works without stating the default database
|
||||
LOAD DATA CONCURRENT LOCAL INFILE 'MYSQLTEST_VARDIR/std_data/loaddata5.dat' INTO TABLE b48297_db1.t1;
|
||||
### disconnect and switch back to master connection
|
||||
disconnect conn2;
|
||||
connection master;
|
||||
connection slave;
|
||||
use b48297_db1;
|
||||
include/diff_tables.inc [master:b48297_db1.t1, slave:b48297_db1.t1]
|
||||
connection master;
|
||||
DROP DATABASE b48297_db1;
|
||||
DROP DATABASE b42897_db2;
|
||||
connection slave;
|
||||
include/rpl_reset.inc
|
||||
connection master;
|
||||
use test;
|
||||
CREATE TABLE t1 (`key` TEXT, `text` TEXT);
|
||||
LOAD DATA INFILE '../../std_data/loaddata2.dat' REPLACE INTO TABLE `t1` FIELDS TERMINATED BY ',';
|
||||
@ -131,5 +152,7 @@ Field 1 'Field 2'
|
||||
Field 3 'Field 4'
|
||||
'Field 5' 'Field 6'
|
||||
Field 6 'Field 7'
|
||||
connection slave;
|
||||
connection master;
|
||||
DROP TABLE t1;
|
||||
include/rpl_end.inc
|
||||
|
Reference in New Issue
Block a user