1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge branch '10.0' into 10.1

This commit is contained in:
Sergei Golubchik
2018-10-30 13:02:59 +01:00
250 changed files with 16242 additions and 4270 deletions

View File

@@ -0,0 +1,16 @@
include/master-slave.inc
[connection master]
create table RPL(a int);
insert into RPL values(1);
select * from rpl;
a
1
insert into RPL values(3);
insert into rpl values(4);
select * from rpl;
a
1
3
4
drop table RPL;
include/rpl_end.inc

View File

@@ -0,0 +1,33 @@
include/master-slave.inc
[connection master]
SET SQL_LOG_BIN=0;
CREATE DATABASE B37656;
SET SQL_LOG_BIN=1;
CREATE DATABASE BUG37656;
### action: show that database on slave is created in lowercase
SHOW DATABASES LIKE '%37656';
Database (%37656)
bug37656
USE B37656;
CREATE TABLE T1 (a int);
INSERT INTO T1 VALUES (1);
### assertion: master contains capitalized case table
SHOW TABLES;
Tables_in_B37656
T1
use bug37656;
### assertion: slave contains lowered case table
SHOW TABLES;
Tables_in_bug37656
t1
### assertion: master and slave tables do not differ
include/diff_tables.inc [master:B37656.T1, slave:bug37656.t1]
SET SQL_LOG_BIN=0;
DROP DATABASE B37656;
SET SQL_LOG_BIN=1;
SHOW DATABASES LIKE '%37656';
Database (%37656)
DROP DATABASE BUG37656;
SHOW DATABASES LIKE '%37656';
Database (%37656)
include/rpl_end.inc

View File

@@ -0,0 +1,47 @@
include/master-slave.inc
[connection master]
******** [ MASTER ] ********
CREATE DATABASE BUG_37656;
use BUG_37656;
show databases like 'BUG_37656';
Database (BUG_37656)
BUG_37656
******** [ SLAVE ] ********
show databases like 'bug_37656';
Database (bug_37656)
bug_37656
******** [ MASTER ] ********
CREATE TABLE T1 (a int);
CREATE TABLE T2 (b int) ENGINE=InnoDB;
CREATE TABLE T3 (txt TEXT);
show tables;
Tables_in_BUG_37656
T1
T2
T3
******** [ SLAVE ] ********
use bug_37656;
show tables;
Tables_in_bug_37656
t2
t3
CREATE TABLE t1 (a INT);
******** [ MASTER ] ********
use BUG_37656;
INSERT INTO T1 VALUES (1);
INSERT INTO T2 VALUES (1);
use test;
INSERT INTO BUG_37656.T1 VALUES (2);
INSERT INTO BUG_37656.T2 VALUES (2);
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE BUG_37656.T3;
******** [ SLAVE ] ********
include/diff_tables.inc [master:BUG_37656.T2, slave:bug_37656.t2]
include/diff_tables.inc [master:BUG_37656.T3, slave:bug_37656.t3]
******** [ MASTER ] ********
DROP DATABASE BUG_37656;
CREATE DATABASE B50653;
USE B50653;
CREATE PROCEDURE b50653_proc() BEGIN SELECT 1; END;
DROP PROCEDURE b50653_proc;
DROP DATABASE B50653;
include/rpl_end.inc

View File

@@ -0,0 +1,44 @@
include/master-slave.inc
[connection master]
******** [ MASTER ] ********
CREATE DATABASE BUG_37656;
use BUG_37656;
show databases like 'BUG_37656';
Database (BUG_37656)
BUG_37656
******** [ SLAVE ] ********
show databases like 'bug_37656';
Database (bug_37656)
bug_37656
******** [ MASTER ] ********
CREATE TABLE T1 (a int);
CREATE TABLE T2 (b int) ENGINE=InnoDB;
CREATE TABLE T3 (txt TEXT);
show tables;
Tables_in_BUG_37656
T1
T2
T3
******** [ SLAVE ] ********
use bug_37656;
show tables;
Tables_in_bug_37656
t2
t3
CREATE TABLE t1 (a INT);
******** [ MASTER ] ********
use BUG_37656;
INSERT INTO T1 VALUES (1);
INSERT INTO T2 VALUES (1);
LOAD DATA INFILE '../../std_data/words.dat' INTO TABLE BUG_37656.T3;
******** [ SLAVE ] ********
include/diff_tables.inc [master:BUG_37656.T2, slave:bug_37656.t2]
include/diff_tables.inc [master:BUG_37656.T3, slave:bug_37656.t3]
******** [ MASTER ] ********
DROP DATABASE BUG_37656;
CREATE DATABASE B50653;
USE B50653;
CREATE PROCEDURE b50653_proc() BEGIN SELECT 1; END;
DROP PROCEDURE b50653_proc;
DROP DATABASE B50653;
include/rpl_end.inc

View File

@@ -0,0 +1 @@
--lower_case_table_names=1

View File

@@ -0,0 +1,18 @@
--source include/have_case_sensitive_file_system.inc
--source include/have_innodb.inc
--source include/master-slave.inc
--connection master
create table RPL(a int);
insert into RPL values(1);
--sync_slave_with_master
select * from rpl;
insert into RPL values(3);
insert into rpl values(4);
select * from rpl;
--connection master
drop table RPL;
--source include/rpl_end.inc

View File

@@ -0,0 +1 @@
--lower-case-table-names=1 "--replicate-rewrite-db=b37656->bug37656"

View File

@@ -0,0 +1,60 @@
# BUG#37656
#
# DESCRIPTION
#
#
# This test case is tests whether replication works properly when
# slave is configured with --lower-case-table-names=1 and replication
# rewrite rules are in effect.
#
# It checks four issues:
#
# (i) master contains capitalized table name
#
# (ii) slave contains lowered case table name
#
# (iii) master and slave tables do not differ
#
-- source include/master-slave.inc
-- source include/not_windows.inc
SET SQL_LOG_BIN=0;
CREATE DATABASE B37656;
SET SQL_LOG_BIN=1;
-- connection slave
CREATE DATABASE BUG37656;
-- echo ### action: show that database on slave is created in lowercase
SHOW DATABASES LIKE '%37656';
-- connection master
USE B37656;
CREATE TABLE T1 (a int);
INSERT INTO T1 VALUES (1);
-- echo ### assertion: master contains capitalized case table
SHOW TABLES;
-- sync_slave_with_master
use bug37656;
-- echo ### assertion: slave contains lowered case table
SHOW TABLES;
-- echo ### assertion: master and slave tables do not differ
let $diff_tables= master:B37656.T1, slave:bug37656.t1;
-- source include/diff_tables.inc
-- connection master
SET SQL_LOG_BIN=0;
DROP DATABASE B37656;
SET SQL_LOG_BIN=1;
SHOW DATABASES LIKE '%37656';
-- connection slave
DROP DATABASE BUG37656;
SHOW DATABASES LIKE '%37656';
--source include/rpl_end.inc

View File

@@ -0,0 +1 @@
--replicate-do-db=bug_37656 --replicate-ignore-table=buG_37656.T1 --replicate-do-table=bUg_37656.T2 --replicate-do-table=bUg_37656.T3 --lower-case-table-names=1

View File

@@ -0,0 +1,12 @@
# BUG#37656
#
# For details look into extra/rpl_tests/rpl_lower_case_table_names.test
#
-- source include/master-slave.inc
-- source include/have_innodb.inc
-- source include/not_windows.inc
-- source include/have_binlog_format_row.inc
-- let $engine=InnoDB
-- source extra/rpl_tests/rpl_lower_case_table_names.test

View File

@@ -0,0 +1 @@
--replicate-do-db=bug_37656 --replicate-ignore-table=bug_37656.t1 --replicate-do-table=bug_37656.t2 --replicate-do-table=bug_37656.t3 --lower-case-table-names=1

View File

@@ -0,0 +1,12 @@
# BUG#37656
#
# For details look into extra/rpl_tests/rpl_lower_case_table_names.test
#
-- source include/master-slave.inc
-- source include/have_innodb.inc
-- source include/not_windows.inc
-- source include/have_binlog_format_mixed_or_statement.inc
-- let $engine=InnoDB
-- source extra/rpl_tests/rpl_lower_case_table_names.test