mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#11765157 - 58090: mysqlslap drops schema specified in
create_schema if auto-generate-sql also set. mysqlslap uses a schema to run its tests on and later drops it if auto-generate-sql is used. This can be a problem, if the schema is an already existing one. If create-schema is used with auto-generate-sql option, mysqlslap while performing the cleanup, drops the specified database. Fixed by introducing an option --no-drop, which, if used, will prevent the dropping of schema at the end of the test. client/client_priv.h: Bug#11765157 - 58090: mysqlslap drops schema specified in create_schema if auto-generate-sql also set. Added an option. client/mysqlslap.c: Bug#11765157 - 58090: mysqlslap drops schema specified in create_schema if auto-generate-sql also set. Introduced an option 'no-drop' to forbid the removal of schema even if 'create' or 'auto-generate-sql' options are used. mysql-test/r/mysqlslap.result: Added a testcase for Bug#11765157. mysql-test/t/mysqlslap.test: Added a testcase for Bug#11765157.
This commit is contained in:
@ -225,3 +225,23 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
|
||||
DROP PROCEDURE IF EXISTS p1;
|
||||
CREATE PROCEDURE p1() SELECT 1;
|
||||
DROP PROCEDURE p1;
|
||||
#
|
||||
# Bug #11765157 - 58090: mysqlslap drops schema specified in
|
||||
# create_schema if auto-generate-sql also set.
|
||||
#
|
||||
# 'bug58090' database should not be present.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
mtr
|
||||
mysql
|
||||
test
|
||||
# 'bug58090' database should be present.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
bug58090
|
||||
mtr
|
||||
mysql
|
||||
test
|
||||
DROP DATABASE bug58090;
|
||||
|
@ -53,3 +53,18 @@ CREATE PROCEDURE p1() SELECT 1;
|
||||
--exec $MYSQL_SLAP --create-schema=test --delimiter=";" --query="CALL p1; SELECT 1;" --silent 2>&1
|
||||
|
||||
DROP PROCEDURE p1;
|
||||
|
||||
|
||||
--echo #
|
||||
--echo # Bug #11765157 - 58090: mysqlslap drops schema specified in
|
||||
--echo # create_schema if auto-generate-sql also set.
|
||||
--echo #
|
||||
|
||||
--exec $MYSQL_SLAP --silent --create-schema=bug58090 --concurrency=5 --iterations=20 --auto-generate-sql
|
||||
--echo # 'bug58090' database should not be present.
|
||||
SHOW DATABASES;
|
||||
--exec $MYSQL_SLAP --silent --create-schema=bug58090 --no-drop --auto-generate-sql
|
||||
--echo # 'bug58090' database should be present.
|
||||
SHOW DATABASES;
|
||||
DROP DATABASE bug58090;
|
||||
|
||||
|
Reference in New Issue
Block a user