1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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).
This commit is contained in:
Alexander Barkov
2014-12-10 08:19:19 +04:00
parent dd270e43bf
commit 31c7458e1a
2 changed files with 9 additions and 24 deletions

View File

@@ -6,38 +6,23 @@ Warnings:
Note 1007 Can't create database 'db1'; database exists
CREATE OR REPLACE DATABASE db2;
CREATE OR REPLACE DATABASE db1;
SHOW DATABASES;
Database
SHOW DATABASES LIKE 'db%';
Database (db%)
db1
db2
information_schema
mtr
mysql
performance_schema
test
CREATE DATABASE db1;
ERROR HY000: Can't create database 'db1'; database exists
DROP DATABASE db3;
ERROR HY000: Can't drop database 'db3'; database doesn't exist
CREATE DATABASE IF NOT EXISTS db3;
SHOW DATABASES;
Database
SHOW DATABASES LIKE 'db%';
Database (db%)
db1
db2
db3
information_schema
mtr
mysql
performance_schema
test
DROP DATABASE db1;
DROP DATABASE db2;
DROP DATABASE IF EXISTS db3;
SHOW DATABASES;
Database
information_schema
mtr
mysql
performance_schema
test
SHOW DATABASES LIKE 'db%';
Database (db%)
include/rpl_end.inc

View File

@@ -8,7 +8,7 @@ CREATE OR REPLACE DATABASE db2;
CREATE OR REPLACE DATABASE db1;
sync_slave_with_master;
SHOW DATABASES;
SHOW DATABASES LIKE 'db%';
connection master;
--error ER_DB_CREATE_EXISTS
@@ -20,7 +20,7 @@ DROP DATABASE db3;
CREATE DATABASE IF NOT EXISTS db3;
sync_slave_with_master;
SHOW DATABASES;
SHOW DATABASES LIKE 'db%';
connection master;
DROP DATABASE db1;
@@ -28,6 +28,6 @@ DROP DATABASE db2;
DROP DATABASE IF EXISTS db3;
sync_slave_with_master;
SHOW DATABASES;
SHOW DATABASES LIKE 'db%';
--source include/rpl_end.inc