mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
WL#4077, added mask for SHOW DATABASES statement
mysql-test/suite/rpl/r/rpl_create_database.result: updated result file mysql-test/suite/rpl/r/rpl_load_from_master.result: updated result file mysql-test/suite/rpl/t/rpl_create_database.test: added the mask 'mysql%' for SHOW DATABASES mysql-test/suite/rpl/t/rpl_load_from_master.test: added the mask 'mysql%' for SHOw DATABASES
This commit is contained in:
@ -20,21 +20,17 @@ INSERT INTO t2 VALUES(2);
|
|||||||
ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1;
|
ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1;
|
||||||
USE mysqltest_sisyfos;
|
USE mysqltest_sisyfos;
|
||||||
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
|
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
|
||||||
SHOW DATABASES;
|
SHOW DATABASES LIKE 'mysql%';
|
||||||
Database
|
Database (mysql%)
|
||||||
information_schema
|
|
||||||
mysql
|
mysql
|
||||||
mysqltest_bob
|
mysqltest_bob
|
||||||
mysqltest_prometheus
|
mysqltest_prometheus
|
||||||
mysqltest_sisyfos
|
mysqltest_sisyfos
|
||||||
test
|
SHOW DATABASES LIKE 'mysql%';
|
||||||
SHOW DATABASES;
|
Database (mysql%)
|
||||||
Database
|
|
||||||
information_schema
|
|
||||||
mysql
|
mysql
|
||||||
mysqltest_prometheus
|
mysqltest_prometheus
|
||||||
mysqltest_sisyfos
|
mysqltest_sisyfos
|
||||||
test
|
|
||||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||||
USE mysqltest_prometheus;
|
USE mysqltest_prometheus;
|
||||||
CREATE TABLE t1 (a INT);
|
CREATE TABLE t1 (a INT);
|
||||||
@ -42,21 +38,17 @@ INSERT INTO t1 VALUES (1);
|
|||||||
CREATE DATABASE mysqltest_sisyfos;
|
CREATE DATABASE mysqltest_sisyfos;
|
||||||
USE mysqltest_sisyfos;
|
USE mysqltest_sisyfos;
|
||||||
CREATE TABLE t2 (a INT);
|
CREATE TABLE t2 (a INT);
|
||||||
SHOW DATABASES;
|
SHOW DATABASES LIKE 'mysql%';
|
||||||
Database
|
Database (mysql%)
|
||||||
information_schema
|
|
||||||
mysql
|
mysql
|
||||||
mysqltest_bob
|
mysqltest_bob
|
||||||
mysqltest_prometheus
|
mysqltest_prometheus
|
||||||
mysqltest_sisyfos
|
mysqltest_sisyfos
|
||||||
test
|
SHOW DATABASES LIKE 'mysql%';
|
||||||
SHOW DATABASES;
|
Database (mysql%)
|
||||||
Database
|
|
||||||
information_schema
|
|
||||||
mysql
|
mysql
|
||||||
mysqltest_prometheus
|
mysqltest_prometheus
|
||||||
mysqltest_sisyfos
|
mysqltest_sisyfos
|
||||||
test
|
|
||||||
USE mysqltest_prometheus;
|
USE mysqltest_prometheus;
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
Tables_in_mysqltest_prometheus
|
Tables_in_mysqltest_prometheus
|
||||||
|
@ -30,13 +30,11 @@ drop database mysqltest2;
|
|||||||
set sql_log_bin = 0;
|
set sql_log_bin = 0;
|
||||||
create database mysqltest2;
|
create database mysqltest2;
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
show databases;
|
show databases like 'mysql%';
|
||||||
Database
|
Database (mysql%)
|
||||||
information_schema
|
|
||||||
mysql
|
mysql
|
||||||
mysqltest
|
mysqltest
|
||||||
mysqltest2
|
mysqltest2
|
||||||
test
|
|
||||||
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
||||||
create table mysqltest2.t2(n int, s text)ENGINE=MyISAM;
|
create table mysqltest2.t2(n int, s text)ENGINE=MyISAM;
|
||||||
insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three');
|
insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three');
|
||||||
@ -47,11 +45,9 @@ insert into mysqltest.t1 values (1, 'one test'), (2, 'two test'), (3, 'three tes
|
|||||||
insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'),
|
insert into mysqltest.t2 values (11, 'eleven test'), (12, 'twelve test'),
|
||||||
(13, 'thirteen test');
|
(13, 'thirteen test');
|
||||||
set sql_log_bin = 1;
|
set sql_log_bin = 1;
|
||||||
show databases;
|
show databases like 'mysql%';
|
||||||
Database
|
Database (mysql%)
|
||||||
information_schema
|
|
||||||
mysql
|
mysql
|
||||||
test
|
|
||||||
create database mysqltest2;
|
create database mysqltest2;
|
||||||
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
||||||
insert into mysqltest2.t1 values (1, 'original foo.t1');
|
insert into mysqltest2.t1 values (1, 'original foo.t1');
|
||||||
@ -66,14 +62,12 @@ insert into mysqltest.t1 values (1, 'original bar.t1');
|
|||||||
create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM;
|
create table mysqltest.t3(n int, s char(20))ENGINE=MyISAM;
|
||||||
insert into mysqltest.t3 values (1, 'original bar.t3');
|
insert into mysqltest.t3 values (1, 'original bar.t3');
|
||||||
load data from master;
|
load data from master;
|
||||||
show databases;
|
show databases like 'mysql%';
|
||||||
Database
|
Database (mysql%)
|
||||||
information_schema
|
|
||||||
mysql
|
mysql
|
||||||
mysqltest
|
mysqltest
|
||||||
mysqltest2
|
mysqltest2
|
||||||
mysqltest3
|
mysqltest3
|
||||||
test
|
|
||||||
use mysqltest2;
|
use mysqltest2;
|
||||||
show tables;
|
show tables;
|
||||||
Tables_in_mysqltest2
|
Tables_in_mysqltest2
|
||||||
|
@ -42,9 +42,9 @@ USE mysqltest_sisyfos;
|
|||||||
# The following should *not* be replicated
|
# The following should *not* be replicated
|
||||||
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
|
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
|
||||||
|
|
||||||
SHOW DATABASES;
|
SHOW DATABASES LIKE 'mysql%';
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
SHOW DATABASES;
|
SHOW DATABASES LIKE 'mysql%';
|
||||||
|
|
||||||
connection master;
|
connection master;
|
||||||
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
DROP DATABASE IF EXISTS mysqltest_sisyfos;
|
||||||
@ -55,9 +55,9 @@ CREATE DATABASE mysqltest_sisyfos;
|
|||||||
USE mysqltest_sisyfos;
|
USE mysqltest_sisyfos;
|
||||||
CREATE TABLE t2 (a INT);
|
CREATE TABLE t2 (a INT);
|
||||||
let $VERSION=`select version()`;
|
let $VERSION=`select version()`;
|
||||||
SHOW DATABASES;
|
SHOW DATABASES LIKE 'mysql%';
|
||||||
sync_slave_with_master;
|
sync_slave_with_master;
|
||||||
SHOW DATABASES;
|
SHOW DATABASES LIKE 'mysql%';
|
||||||
USE mysqltest_prometheus;
|
USE mysqltest_prometheus;
|
||||||
SHOW TABLES;
|
SHOW TABLES;
|
||||||
USE mysqltest_sisyfos;
|
USE mysqltest_sisyfos;
|
||||||
|
@ -54,7 +54,7 @@ connection master;
|
|||||||
set sql_log_bin = 0;
|
set sql_log_bin = 0;
|
||||||
create database mysqltest2;
|
create database mysqltest2;
|
||||||
create database mysqltest;
|
create database mysqltest;
|
||||||
show databases;
|
show databases like 'mysql%';
|
||||||
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
|
||||||
create table mysqltest2.t2(n int, s text)ENGINE=MyISAM;
|
create table mysqltest2.t2(n int, s text)ENGINE=MyISAM;
|
||||||
insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three');
|
insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three');
|
||||||
@ -71,7 +71,7 @@ connection slave;
|
|||||||
sync_with_master;
|
sync_with_master;
|
||||||
|
|
||||||
# This should show that the slave is empty at this point
|
# This should show that the slave is empty at this point
|
||||||
show databases;
|
show databases like 'mysql%';
|
||||||
# Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM
|
# Create mysqltest2 and mysqltest3 on slave; we expect that LOAD DATA FROM
|
||||||
# MASTER will neither touch database mysqltest nor mysqltest3
|
# MASTER will neither touch database mysqltest nor mysqltest3
|
||||||
create database mysqltest2;
|
create database mysqltest2;
|
||||||
@ -95,7 +95,7 @@ insert into mysqltest.t3 values (1, 'original bar.t3');
|
|||||||
load data from master;
|
load data from master;
|
||||||
|
|
||||||
# Now let's check if we have the right tables and the right data in them
|
# Now let's check if we have the right tables and the right data in them
|
||||||
show databases;
|
show databases like 'mysql%';
|
||||||
use mysqltest2;
|
use mysqltest2;
|
||||||
|
|
||||||
# LOAD DATA FROM MASTER uses only replicate_*_db rules to decide which
|
# LOAD DATA FROM MASTER uses only replicate_*_db rules to decide which
|
||||||
|
Reference in New Issue
Block a user