Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
01f0090c
Commit
01f0090c
authored
Apr 08, 2011
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Plain Diff
Merging patch for bug#11765157 from mysql-5.1.
parents
1d07af25
cb0e49c0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
3 deletions
+44
-3
client/client_priv.h
client/client_priv.h
+1
-0
client/mysqlslap.c
client/mysqlslap.c
+8
-3
mysql-test/r/mysqlslap.result
mysql-test/r/mysqlslap.result
+20
-0
mysql-test/t/mysqlslap.test
mysql-test/t/mysqlslap.test
+15
-0
No files found.
client/client_priv.h
View file @
01f0090c
...
@@ -75,6 +75,7 @@ enum options_client
...
@@ -75,6 +75,7 @@ enum options_client
OPT_SLAP_POST_SYSTEM
,
OPT_SLAP_POST_SYSTEM
,
OPT_SLAP_COMMIT
,
OPT_SLAP_COMMIT
,
OPT_SLAP_DETACH
,
OPT_SLAP_DETACH
,
OPT_SLAP_NO_DROP
,
OPT_MYSQL_REPLACE_INTO
,
OPT_BASE64_OUTPUT_MODE
,
OPT_SERVER_ID
,
OPT_MYSQL_REPLACE_INTO
,
OPT_BASE64_OUTPUT_MODE
,
OPT_SERVER_ID
,
OPT_FIX_TABLE_NAMES
,
OPT_FIX_DB_NAMES
,
OPT_SSL_VERIFY_SERVER_CERT
,
OPT_FIX_TABLE_NAMES
,
OPT_FIX_DB_NAMES
,
OPT_SSL_VERIFY_SERVER_CERT
,
OPT_AUTO_VERTICAL_OUTPUT
,
OPT_AUTO_VERTICAL_OUTPUT
,
...
...
client/mysqlslap.c
View file @
01f0090c
...
@@ -128,7 +128,7 @@ const char *delimiter= "\n";
...
@@ -128,7 +128,7 @@ const char *delimiter= "\n";
const
char
*
create_schema_string
=
"mysqlslap"
;
const
char
*
create_schema_string
=
"mysqlslap"
;
static
my_bool
opt_preserve
=
TRUE
;
static
my_bool
opt_preserve
=
TRUE
,
opt_no_drop
=
FALSE
;
static
my_bool
debug_info_flag
=
0
,
debug_check_flag
=
0
;
static
my_bool
debug_info_flag
=
0
,
debug_check_flag
=
0
;
static
my_bool
opt_only_print
=
FALSE
;
static
my_bool
opt_only_print
=
FALSE
;
static
my_bool
opt_compress
=
FALSE
,
tty_password
=
FALSE
,
static
my_bool
opt_compress
=
FALSE
,
tty_password
=
FALSE
,
...
@@ -607,6 +607,8 @@ static struct my_option my_long_options[] =
...
@@ -607,6 +607,8 @@ static struct my_option my_long_options[] =
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"iterations"
,
'i'
,
"Number of times to run the tests."
,
&
iterations
,
{
"iterations"
,
'i'
,
"Number of times to run the tests."
,
&
iterations
,
&
iterations
,
0
,
GET_UINT
,
REQUIRED_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
&
iterations
,
0
,
GET_UINT
,
REQUIRED_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
{
"no-drop"
,
OPT_SLAP_NO_DROP
,
"Do not drop the schema after the test."
,
&
opt_no_drop
,
&
opt_no_drop
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"number-char-cols"
,
'x'
,
{
"number-char-cols"
,
'x'
,
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql."
,
"Number of VARCHAR columns to create in table if specifying --auto-generate-sql."
,
&
num_char_cols_opt
,
&
num_char_cols_opt
,
0
,
GET_STR
,
REQUIRED_ARG
,
&
num_char_cols_opt
,
&
num_char_cols_opt
,
0
,
GET_STR
,
REQUIRED_ARG
,
...
@@ -1149,8 +1151,11 @@ get_options(int *argc,char ***argv)
...
@@ -1149,8 +1151,11 @@ get_options(int *argc,char ***argv)
if
(
!
user
)
if
(
!
user
)
user
=
(
char
*
)
"root"
;
user
=
(
char
*
)
"root"
;
/* If something is created we clean it up, otherwise we leave schemas alone */
/*
if
(
create_string
||
auto_generate_sql
)
If something is created and --no-drop is not specified, we drop the
schema.
*/
if
(
!
opt_no_drop
&&
(
create_string
||
auto_generate_sql
))
opt_preserve
=
FALSE
;
opt_preserve
=
FALSE
;
if
(
auto_generate_sql
&&
(
create_string
||
user_supplied_query
))
if
(
auto_generate_sql
&&
(
create_string
||
user_supplied_query
))
...
...
mysql-test/r/mysqlslap.result
View file @
01f0090c
...
@@ -225,3 +225,23 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
...
@@ -225,3 +225,23 @@ DROP SCHEMA IF EXISTS `mysqlslap`;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p1;
CREATE PROCEDURE p1() SELECT 1;
CREATE PROCEDURE p1() SELECT 1;
DROP PROCEDURE p1;
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;
mysql-test/t/mysqlslap.test
View file @
01f0090c
...
@@ -53,3 +53,18 @@ CREATE PROCEDURE p1() SELECT 1;
...
@@ -53,3 +53,18 @@ CREATE PROCEDURE p1() SELECT 1;
--
exec
$MYSQL_SLAP
--
create
-
schema
=
test
--
delimiter
=
";"
--
query
=
"CALL p1; SELECT 1;"
--
silent
2
>&
1
--
exec
$MYSQL_SLAP
--
create
-
schema
=
test
--
delimiter
=
";"
--
query
=
"CALL p1; SELECT 1;"
--
silent
2
>&
1
DROP
PROCEDURE
p1
;
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
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment