Browse Source
Bug#31608 missing mysqltest change_user command
Bug#31608 missing mysqltest change_user command
The problem is that currently there is no way to test the behavior of the mysql_change_user() function using the mysqltest suite because there is no internal command for it. The solution is to introduce a change_user command that can be used to test aspects of the MySQL client function mysql_change_user(). client/mysqltest.c: Add change_user command to mysqltest. mysql-test/r/mysqltest.result: Add test case result for change_user command mysql-test/t/mysqltest.test: Add test case for change_user command mysql-test/r/change_user.result: Add new file with test case results for bugs 20023 and 31418. mysql-test/t/change_user.test: Add new file with test cases for bugs 20023 and 31418.pull/374/head
5 changed files with 162 additions and 1 deletions
-
61client/mysqltest.c
-
46mysql-test/r/change_user.result
-
3mysql-test/r/mysqltest.result
-
35mysql-test/t/change_user.test
-
18mysql-test/t/mysqltest.test
@ -0,0 +1,46 @@ |
|||
Bug#20023 |
|||
SELECT @@session.sql_big_selects; |
|||
@@session.sql_big_selects |
|||
1 |
|||
SELECT @@global.max_join_size; |
|||
@@global.max_join_size |
|||
-1 |
|||
change_user |
|||
SELECT @@session.sql_big_selects; |
|||
@@session.sql_big_selects |
|||
1 |
|||
SELECT @@global.max_join_size; |
|||
@@global.max_join_size |
|||
-1 |
|||
SET @@global.max_join_size = 10000; |
|||
SET @@session.max_join_size = default; |
|||
change_user |
|||
SELECT @@session.sql_big_selects; |
|||
@@session.sql_big_selects |
|||
0 |
|||
SET @@global.max_join_size = -1; |
|||
SET @@session.max_join_size = default; |
|||
change_user |
|||
SELECT @@session.sql_big_selects; |
|||
@@session.sql_big_selects |
|||
1 |
|||
Bug#31418 |
|||
SELECT IS_FREE_LOCK('bug31418'); |
|||
IS_FREE_LOCK('bug31418') |
|||
1 |
|||
SELECT IS_USED_LOCK('bug31418'); |
|||
IS_USED_LOCK('bug31418') |
|||
NULL |
|||
SELECT GET_LOCK('bug31418', 1); |
|||
GET_LOCK('bug31418', 1) |
|||
1 |
|||
SELECT IS_USED_LOCK('bug31418'); |
|||
IS_USED_LOCK('bug31418') |
|||
1 |
|||
change_user |
|||
SELECT IS_FREE_LOCK('bug31418'); |
|||
IS_FREE_LOCK('bug31418') |
|||
1 |
|||
SELECT IS_USED_LOCK('bug31418'); |
|||
IS_USED_LOCK('bug31418') |
|||
NULL |
|||
@ -0,0 +1,35 @@ |
|||
# |
|||
# Bug#20023 mysql_change_user() resets the value of SQL_BIG_SELECTS |
|||
# |
|||
|
|||
--echo Bug#20023 |
|||
SELECT @@session.sql_big_selects; |
|||
SELECT @@global.max_join_size; |
|||
--echo change_user |
|||
--change_user |
|||
SELECT @@session.sql_big_selects; |
|||
SELECT @@global.max_join_size; |
|||
SET @@global.max_join_size = 10000; |
|||
SET @@session.max_join_size = default; |
|||
--echo change_user |
|||
--change_user |
|||
SELECT @@session.sql_big_selects; |
|||
SET @@global.max_join_size = -1; |
|||
SET @@session.max_join_size = default; |
|||
--echo change_user |
|||
--change_user |
|||
SELECT @@session.sql_big_selects; |
|||
|
|||
# |
|||
# Bug#31418 User locks misfunctioning after mysql_change_user() |
|||
# |
|||
|
|||
--echo Bug#31418 |
|||
SELECT IS_FREE_LOCK('bug31418'); |
|||
SELECT IS_USED_LOCK('bug31418'); |
|||
SELECT GET_LOCK('bug31418', 1); |
|||
SELECT IS_USED_LOCK('bug31418'); |
|||
--echo change_user |
|||
--change_user |
|||
SELECT IS_FREE_LOCK('bug31418'); |
|||
SELECT IS_USED_LOCK('bug31418'); |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue