Commit d658b408 authored by unknown's avatar unknown

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
parent 0e862b75
......@@ -20,21 +20,17 @@ INSERT INTO t2 VALUES(2);
ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1;
USE mysqltest_sisyfos;
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
SHOW DATABASES;
Database
information_schema
SHOW DATABASES LIKE 'mysql%';
Database (mysql%)
mysql
mysqltest_bob
mysqltest_prometheus
mysqltest_sisyfos
test
SHOW DATABASES;
Database
information_schema
SHOW DATABASES LIKE 'mysql%';
Database (mysql%)
mysql
mysqltest_prometheus
mysqltest_sisyfos
test
DROP DATABASE IF EXISTS mysqltest_sisyfos;
USE mysqltest_prometheus;
CREATE TABLE t1 (a INT);
......@@ -42,21 +38,17 @@ INSERT INTO t1 VALUES (1);
CREATE DATABASE mysqltest_sisyfos;
USE mysqltest_sisyfos;
CREATE TABLE t2 (a INT);
SHOW DATABASES;
Database
information_schema
SHOW DATABASES LIKE 'mysql%';
Database (mysql%)
mysql
mysqltest_bob
mysqltest_prometheus
mysqltest_sisyfos
test
SHOW DATABASES;
Database
information_schema
SHOW DATABASES LIKE 'mysql%';
Database (mysql%)
mysql
mysqltest_prometheus
mysqltest_sisyfos
test
USE mysqltest_prometheus;
SHOW TABLES;
Tables_in_mysqltest_prometheus
......
......@@ -30,13 +30,11 @@ drop database mysqltest2;
set sql_log_bin = 0;
create database mysqltest2;
create database mysqltest;
show databases;
Database
information_schema
show databases like 'mysql%';
Database (mysql%)
mysql
mysqltest
mysqltest2
test
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
create table mysqltest2.t2(n int, s text)ENGINE=MyISAM;
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'),
(13, 'thirteen test');
set sql_log_bin = 1;
show databases;
Database
information_schema
show databases like 'mysql%';
Database (mysql%)
mysql
test
create database mysqltest2;
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
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;
insert into mysqltest.t3 values (1, 'original bar.t3');
load data from master;
show databases;
Database
information_schema
show databases like 'mysql%';
Database (mysql%)
mysql
mysqltest
mysqltest2
mysqltest3
test
use mysqltest2;
show tables;
Tables_in_mysqltest2
......
......@@ -42,9 +42,9 @@ USE mysqltest_sisyfos;
# The following should *not* be replicated
ALTER DATABASE mysqltest_bob CHARACTER SET latin1;
SHOW DATABASES;
SHOW DATABASES LIKE 'mysql%';
sync_slave_with_master;
SHOW DATABASES;
SHOW DATABASES LIKE 'mysql%';
connection master;
DROP DATABASE IF EXISTS mysqltest_sisyfos;
......@@ -55,9 +55,9 @@ CREATE DATABASE mysqltest_sisyfos;
USE mysqltest_sisyfos;
CREATE TABLE t2 (a INT);
let $VERSION=`select version()`;
SHOW DATABASES;
SHOW DATABASES LIKE 'mysql%';
sync_slave_with_master;
SHOW DATABASES;
SHOW DATABASES LIKE 'mysql%';
USE mysqltest_prometheus;
SHOW TABLES;
USE mysqltest_sisyfos;
......
......@@ -54,7 +54,7 @@ connection master;
set sql_log_bin = 0;
create database mysqltest2;
create database mysqltest;
show databases;
show databases like 'mysql%';
create table mysqltest2.t1(n int, s char(20))ENGINE=MyISAM;
create table mysqltest2.t2(n int, s text)ENGINE=MyISAM;
insert into mysqltest2.t1 values (1, 'one'), (2, 'two'), (3, 'three');
......@@ -71,7 +71,7 @@ connection slave;
sync_with_master;
# 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
# MASTER will neither touch database mysqltest nor mysqltest3
create database mysqltest2;
......@@ -95,7 +95,7 @@ insert into mysqltest.t3 values (1, 'original bar.t3');
load data from master;
# Now let's check if we have the right tables and the right data in them
show databases;
show databases like 'mysql%';
use mysqltest2;
# LOAD DATA FROM MASTER uses only replicate_*_db rules to decide which
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment