mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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.
This commit is contained in:
35
mysql-test/t/change_user.test
Normal file
35
mysql-test/t/change_user.test
Normal file
@@ -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');
|
||||
Reference in New Issue
Block a user