mariadb/mysql-test/main/change_user.result
Fariha Shaikh 212fad1b7e MDEV-36397 Record change_user command in MTR output
MTR .result files currently do not contain output to indicate if a
change_user command has been executed in the corresponding .test files.

Record change_user command in the following format in MTR output only if
disable_query_log is set to false: change_user <user>,<password>,<db>;

All new code of the whole pull request, including one or several files
that are either new files or modified ones, are contributed under the
BSD-new license. I am contributing on behalf of my employer Amazon Web
Services, Inc.
2025-06-23 20:38:36 +02:00

117 lines
4 KiB
Text

connect old,localhost,root,,,,,auth=mysql_old_password:mysql_native_password;
set global secure_auth=0;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
create user test_nopw;
grant select on test.* to test_nopw;
create user test_oldpw identified by password "09301740536db389";
grant select on test.* to test_oldpw;
create user test_newpw identified by "newpw";
grant select on test.* to test_newpw;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<root@localhost> <root@localhost> test
change_user test_nopw,,;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<test_nopw@localhost> <test_nopw@%> NULL
change_user test_oldpw,oldpw,;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<test_oldpw@localhost> <test_oldpw@%> NULL
change_user test_newpw,newpw,;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<test_newpw@localhost> <test_newpw@%> NULL
change_user root,,;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<root@localhost> <root@localhost> NULL
change_user test_nopw,,test;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<test_nopw@localhost> <test_nopw@%> test
change_user test_oldpw,oldpw,test;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<test_oldpw@localhost> <test_oldpw@%> test
change_user test_newpw,newpw,test;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<test_newpw@localhost> <test_newpw@%> test
change_user root,,test;
select concat('<', user(), '>'), concat('<', current_user(), '>'), database();
concat('<', user(), '>') concat('<', current_user(), '>') database()
<root@localhost> <root@localhost> test
drop user test_nopw;
drop user test_oldpw;
drop user test_newpw;
Bug#20023
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
1
SELECT @@global.max_join_size;
@@global.max_join_size
HA_POS_ERROR
change_user root,,test;
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
1
SELECT @@global.max_join_size;
@@global.max_join_size
HA_POS_ERROR
SET @@global.max_join_size = 10000;
SET @@session.max_join_size = default;
change_user root,,test;
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
0
SET @@global.max_join_size = 18446744073709551615;
SET @@session.max_join_size = default;
change_user root,,test;
SELECT @@session.sql_big_selects;
@@session.sql_big_selects
1
SELECT @@global.max_join_size;
@@global.max_join_size
18446744073709551615
SELECT @@session.max_join_size;
@@session.max_join_size
18446744073709551615
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') = CONNECTION_ID();
IS_USED_LOCK('bug31418') = CONNECTION_ID()
1
change_user root,,test;
SELECT IS_FREE_LOCK('bug31418');
IS_FREE_LOCK('bug31418')
1
SELECT IS_USED_LOCK('bug31418');
IS_USED_LOCK('bug31418')
NULL
FLUSH STATUS;
change_user root,,test;
Value of com_select did not change
set global secure_auth=default;
Warnings:
Warning 1287 '@@secure_auth' is deprecated and will be removed in a future release
set timestamp=unix_timestamp('2010-10-10 10:10:10');
select now();
now()
2010-10-10 10:10:10
select year(now()) > 2011;
year(now()) > 2011
0
change_user root,,test;
select year(now()) > 2011;
year(now()) > 2011
1