mariadb/mysql-test/suite/rpl/t/rpl_create_drop_db.test
Alexander Barkov 31c7458e1a MDEV-7280 DATABASE: CREATE OR REPLACE
A test clean-up: The "SHOW DATABASES" queries now use "LIKE 'db%'",
to display only the databases created during this test,
thus exclude the system databases, as some of them can be optional
(e.g. performance_schema).
2014-12-10 08:19:19 +04:00

33 lines
599 B
Text

--source include/master-slave.inc
connection master;
CREATE DATABASE db1;
CREATE DATABASE IF NOT EXISTS db1;
CREATE OR REPLACE DATABASE db2;
CREATE OR REPLACE DATABASE db1;
sync_slave_with_master;
SHOW DATABASES LIKE 'db%';
connection master;
--error ER_DB_CREATE_EXISTS
CREATE DATABASE db1;
--error ER_DB_DROP_EXISTS
DROP DATABASE db3;
CREATE DATABASE IF NOT EXISTS db3;
sync_slave_with_master;
SHOW DATABASES LIKE 'db%';
connection master;
DROP DATABASE db1;
DROP DATABASE db2;
DROP DATABASE IF EXISTS db3;
sync_slave_with_master;
SHOW DATABASES LIKE 'db%';
--source include/rpl_end.inc