Commit 31c7458e authored by Alexander Barkov's avatar Alexander Barkov

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).
parent dd270e43
...@@ -6,38 +6,23 @@ Warnings: ...@@ -6,38 +6,23 @@ Warnings:
Note 1007 Can't create database 'db1'; database exists Note 1007 Can't create database 'db1'; database exists
CREATE OR REPLACE DATABASE db2; CREATE OR REPLACE DATABASE db2;
CREATE OR REPLACE DATABASE db1; CREATE OR REPLACE DATABASE db1;
SHOW DATABASES; SHOW DATABASES LIKE 'db%';
Database Database (db%)
db1 db1
db2 db2
information_schema
mtr
mysql
performance_schema
test
CREATE DATABASE db1; CREATE DATABASE db1;
ERROR HY000: Can't create database 'db1'; database exists ERROR HY000: Can't create database 'db1'; database exists
DROP DATABASE db3; DROP DATABASE db3;
ERROR HY000: Can't drop database 'db3'; database doesn't exist ERROR HY000: Can't drop database 'db3'; database doesn't exist
CREATE DATABASE IF NOT EXISTS db3; CREATE DATABASE IF NOT EXISTS db3;
SHOW DATABASES; SHOW DATABASES LIKE 'db%';
Database Database (db%)
db1 db1
db2 db2
db3 db3
information_schema
mtr
mysql
performance_schema
test
DROP DATABASE db1; DROP DATABASE db1;
DROP DATABASE db2; DROP DATABASE db2;
DROP DATABASE IF EXISTS db3; DROP DATABASE IF EXISTS db3;
SHOW DATABASES; SHOW DATABASES LIKE 'db%';
Database Database (db%)
information_schema
mtr
mysql
performance_schema
test
include/rpl_end.inc include/rpl_end.inc
...@@ -8,7 +8,7 @@ CREATE OR REPLACE DATABASE db2; ...@@ -8,7 +8,7 @@ CREATE OR REPLACE DATABASE db2;
CREATE OR REPLACE DATABASE db1; CREATE OR REPLACE DATABASE db1;
sync_slave_with_master; sync_slave_with_master;
SHOW DATABASES; SHOW DATABASES LIKE 'db%';
connection master; connection master;
--error ER_DB_CREATE_EXISTS --error ER_DB_CREATE_EXISTS
...@@ -20,7 +20,7 @@ DROP DATABASE db3; ...@@ -20,7 +20,7 @@ DROP DATABASE db3;
CREATE DATABASE IF NOT EXISTS db3; CREATE DATABASE IF NOT EXISTS db3;
sync_slave_with_master; sync_slave_with_master;
SHOW DATABASES; SHOW DATABASES LIKE 'db%';
connection master; connection master;
DROP DATABASE db1; DROP DATABASE db1;
...@@ -28,6 +28,6 @@ DROP DATABASE db2; ...@@ -28,6 +28,6 @@ DROP DATABASE db2;
DROP DATABASE IF EXISTS db3; DROP DATABASE IF EXISTS db3;
sync_slave_with_master; sync_slave_with_master;
SHOW DATABASES; SHOW DATABASES LIKE 'db%';
--source include/rpl_end.inc --source include/rpl_end.inc
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