1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-17658 change the structure of mysql.user table

Implement User_table_json.
Fix scripts to use mysql.global_priv.
Fix tests.
This commit is contained in:
Sergei Golubchik
2018-11-24 14:13:41 +01:00
parent d68d7e50f9
commit 4abb8216a0
180 changed files with 1843 additions and 3198 deletions

View File

@ -14,10 +14,6 @@
SET global secure_auth=0;
--disable_warnings
drop table if exists t1,t2;
--enable_warnings
#connect (con1,localhost,root,,"");
#show tables;
connect (con1,localhost,root,,mysql);
@ -66,6 +62,7 @@ connect (fail_con,localhost,test,zorro,test2);
connect (fail_con,localhost,test,zorro,);
# check if old password version also works
source include/switch_to_mysql_user.inc;
update mysql.user set plugin="", authentication_string="", password=old_password("gambling2") where user=_binary"test";
flush privileges;
@ -97,11 +94,10 @@ connect (fail_con,localhost,test,zorro,test2);
--error ER_ACCESS_DENIED_ERROR
connect (fail_con,localhost,test,zorro,);
source include/switch_to_mysql_global_priv.inc;
# remove user 'test' so that other tests which may use 'test'
# do not depend on this test.
delete from mysql.user where user=_binary"test";
flush privileges;
#
# Bug#12517 Clear user variables and replication events before
@ -403,6 +399,7 @@ connection default;
#
# cannot connect when password is set and plugin=mysql_native_password
#
source include/switch_to_mysql_user.inc;
update mysql.user set plugin='mysql_native_password' where user = 'mysqltest_up1';
update mysql.user set plugin='mysql_old_password' where user = 'mysqltest_up2';
select user, password, plugin, authentication_string from mysql.user
@ -418,13 +415,14 @@ select user(), current_user();
disconnect pcon7;
connection default;
source include/switch_to_mysql_global_priv.inc;
DROP USER mysqltest_up1@'%';
DROP USER mysqltest_up2@'%';
# Wait till all disconnects are completed
--source include/wait_until_count_sessions.inc
--echo #
--echo # BUG#1010351: New "via" keyword in 5.2+ can't be used as identifier anymore
--echo #
@ -436,10 +434,6 @@ create table t1 (col1 int);
alter table t1 add via int not null;
drop table t1;
--disable_warnings
drop procedure if exists p1;
--enable_warnings
delimiter |;
create procedure p1(x int)
foo: loop
@ -454,6 +448,4 @@ delimiter ;|
call p1(2);
drop procedure p1;
SET global secure_auth=default;