mariadb/mysql-test/t/change_user.test
unknown 27498bbaba Fixed a test.
mysql-test/r/change_user.result:
  Replaced value in result file, it was dependend on architecture.
mysql-test/t/change_user.test:
  Replaced an architecture dependend value in test
sql/mysqld.cc:
  Can be made shorter and without ifdefs.
2008-02-20 16:59:03 +02:00

40 lines
1.1 KiB
Text

#
# Bug#20023 mysql_change_user() resets the value of SQL_BIG_SELECTS
#
--echo Bug#20023
SELECT @@session.sql_big_selects;
--replace_result 18446744073709551615 MAX_JOIN_SIZE 4294967295 MAX_JOIN_SIZE
SELECT @@global.max_join_size;
--echo change_user
--change_user
SELECT @@session.sql_big_selects;
--replace_result 18446744073709551615 MAX_JOIN_SIZE 4294967295 MAX_JOIN_SIZE
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;
# On some machines the following will result into a warning
--disable_warnings
SET @@global.max_join_size = -1;
--enable_warnings
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') = CONNECTION_ID();
--echo change_user
--change_user
SELECT IS_FREE_LOCK('bug31418');
SELECT IS_USED_LOCK('bug31418');