fixup DROP USER
This commit is contained in:
parent
2a71684683
commit
5067d83bf8
@ -62,7 +62,6 @@ user()
|
||||
plug_user@localhost
|
||||
Tables_in_test_user_db
|
||||
t1
|
||||
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user';
|
||||
DROP USER plug_user,plug_dest;
|
||||
========== test 1.2 ========================================
|
||||
GRANT ALL PRIVILEGES ON test_user_db.* TO plug_user
|
||||
|
@ -4,6 +4,7 @@
|
||||
--source include/not_embedded.inc
|
||||
#enable view protocol after fix MDEV-29542
|
||||
--source include/no_view_protocol.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
CREATE DATABASE test_user_db;
|
||||
|
||||
@ -27,6 +28,7 @@ GRANT ALL ON test_user_db.* TO 'plug_dest'@'%';
|
||||
REVOKE PROXY ON plug_dest FROM plug_user;
|
||||
--error 1
|
||||
--exec $MYSQL -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
||||
--source include/wait_until_count_sessions.inc
|
||||
DROP USER plug_user,plug_dest;
|
||||
#
|
||||
# GRANT...WITH
|
||||
@ -48,6 +50,7 @@ REVOKE PROXY ON plug_dest FROM plug_user;
|
||||
--echo 3)
|
||||
--error 1
|
||||
--exec $MYSQL -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
||||
--source include/wait_until_count_sessions.inc
|
||||
DROP USER plug_user,plug_dest;
|
||||
#
|
||||
# GRANT...WITH/CREATE...BY
|
||||
@ -62,8 +65,7 @@ GRANT ALL ON test_user_db.* TO 'plug_dest'@'%';
|
||||
--echo 2)
|
||||
--replace_result $MASTER_MYSOCK MASTER_MYSOCK
|
||||
--exec $MYSQL -u plug_user --password=plug_dest -e "SELECT current_user();SELECT user();USE test_user_db;CREATE TABLE t1(a int);SHOW TABLES;DROP TABLE t1;" 2>&1
|
||||
REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_user';
|
||||
#REVOKE ALL PRIVILEGES ON test_user_db.* FROM 'plug_dest'';
|
||||
--source include/wait_until_count_sessions.inc
|
||||
DROP USER plug_user,plug_dest;
|
||||
|
||||
--echo ========== test 1.2 ========================================
|
||||
@ -83,6 +85,7 @@ GRANT PROXY ON new_dest TO plug_user;
|
||||
--exec $MYSQL -u plug_user --password=new_dest -e "SELECT current_user();SELECT user();" 2>&1
|
||||
--sorted_result
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
--source include/wait_until_count_sessions.inc
|
||||
DROP USER plug_user,new_dest;
|
||||
|
||||
# CREATE...WITH/CREATE...BY
|
||||
@ -102,6 +105,7 @@ GRANT PROXY ON new_dest TO plug_user;
|
||||
--exec $MYSQL -u plug_user --password=new_dest -e "SELECT current_user();SELECT user();" 2>&1
|
||||
--sorted_result
|
||||
SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root';
|
||||
--source include/wait_until_count_sessions.inc
|
||||
DROP USER plug_user,new_dest;
|
||||
# CREATE...WITH
|
||||
CREATE USER plug_user
|
||||
|
@ -1,4 +1,3 @@
|
||||
DROP TABLE IF EXISTS t1, t2;
|
||||
connect ssl_con,localhost,root,,,,,SSL;
|
||||
create table t1 (a int);
|
||||
disconnect ssl_con;
|
||||
|
@ -195,7 +195,9 @@ call mtr.add_suppression("Access denied; you need (at least one of) the BINLOG R
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/mysqlbinlog.sql
|
||||
--disconnect user1
|
||||
DROP TABLE t2,t1;
|
||||
--disable_warnings
|
||||
DROP USER user1@localhost;
|
||||
--enable_warnings
|
||||
|
||||
--echo #
|
||||
--echo # End of 10.5 test
|
||||
|
@ -34,11 +34,11 @@ a users
|
||||
3 tester@localhost
|
||||
4 @localhost%
|
||||
connection master;
|
||||
disconnect m_1;
|
||||
DROP DATABASE mysqltest1;
|
||||
REVOKE ALL ON mysqltest1.* FROM 'tester'@'%';
|
||||
REVOKE ALL ON mysqltest1.* FROM ''@'localhost%';
|
||||
DROP USER tester@'%';
|
||||
DROP USER ''@'localhost%';
|
||||
FLUSH PRIVILEGES;
|
||||
connection slave;
|
||||
include/rpl_end.inc
|
||||
|
@ -30,6 +30,8 @@ n
|
||||
==== Delete new replication user ====
|
||||
connection master;
|
||||
DROP USER rpl@127.0.0.1;
|
||||
Warnings:
|
||||
Note 4240 Dropped users 'rpl'@'127.0.0.1' have active connections. Use KILL CONNECTION if they should not be used anymore.
|
||||
FLUSH PRIVILEGES;
|
||||
connection slave;
|
||||
==== Restart slave without privileges =====
|
||||
|
@ -336,6 +336,7 @@ a
|
||||
connection master;
|
||||
drop procedure foo;
|
||||
connection slave;
|
||||
disconnect con1;
|
||||
connection master;
|
||||
drop function fn1;
|
||||
drop database mysqltest1;
|
||||
|
@ -85,6 +85,7 @@ select * from t2 ORDER BY f;
|
||||
f
|
||||
5
|
||||
7
|
||||
disconnect con3;
|
||||
drop table t1, t2;
|
||||
drop user zedjzlcsjhd@localhost;
|
||||
use test;
|
||||
|
@ -92,6 +92,8 @@ UNINSTALL PLUGIN plg;
|
||||
Got one of the listed errors
|
||||
connection node_1;
|
||||
DROP USER 'userMW416'@'localhost';
|
||||
Warnings:
|
||||
Note 4240 Dropped users 'userMW416'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
|
||||
SHOW DATABASES;
|
||||
Database
|
||||
information_schema
|
||||
|
@ -33,3 +33,5 @@ DROP TABLE t2;
|
||||
SET GLOBAL read_only=FALSE;
|
||||
DROP TABLE t1;
|
||||
DROP USER foo@localhost;
|
||||
Warnings:
|
||||
Note 4240 Dropped users 'foo'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
|
||||
|
@ -167,6 +167,8 @@ disconnect foo_node_2;
|
||||
# Connect with node_1
|
||||
connection node_1;
|
||||
DROP USER foo@localhost;
|
||||
Warnings:
|
||||
Note 4240 Dropped users 'foo'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
|
||||
DROP DATABASE test1;
|
||||
#
|
||||
# MDEV-10566: Create role statement replicated inconsistently in Galera Cluster
|
||||
|
@ -44,5 +44,7 @@ i
|
||||
1
|
||||
connection node_1;
|
||||
DROP USER foo@localhost;
|
||||
Warnings:
|
||||
Note 4240 Dropped users 'foo'@'localhost' have active connections. Use KILL CONNECTION if they should not be used anymore.
|
||||
DROP TABLE t2;
|
||||
# End of tests
|
||||
|
@ -1,4 +1,5 @@
|
||||
--source include/not_ubsan.inc
|
||||
--source include/count_sessions.inc
|
||||
|
||||
let $REGEX_VERSION_ID=/$mysql_get_server_version/VERSION_ID/;
|
||||
let $REGEX_PASSWORD_LAST_CHANGED=/password_last_changed": [0-9]*/password_last_changed": #/;
|
||||
@ -48,6 +49,7 @@ show create user mysqltest1;
|
||||
--echo # name does not match, password bad = failure
|
||||
--error 1
|
||||
--exec $try_auth -u mysqltest1 -pbad
|
||||
--source include/wait_until_count_sessions.inc
|
||||
--replace_result $dreplace "drop user 'USER'"
|
||||
eval $dreplace, mysqltest1;
|
||||
|
||||
@ -68,6 +70,7 @@ show create user mysqltest1;
|
||||
--echo # name does not match, password bad = failure
|
||||
--error 1
|
||||
--exec $try_auth -u mysqltest1 -pbad
|
||||
--source include/wait_until_count_sessions.inc
|
||||
--replace_result $dreplace "drop user 'USER'"
|
||||
eval $dreplace, mysqltest1;
|
||||
|
||||
@ -88,6 +91,7 @@ show create user mysqltest1;
|
||||
--echo # name does not match, password bad = failure
|
||||
--error 1
|
||||
--exec $try_auth -u mysqltest1 -pbad
|
||||
--source include/wait_until_count_sessions.inc
|
||||
--replace_result $dreplace "drop user 'USER'"
|
||||
eval $dreplace, mysqltest1;
|
||||
|
||||
@ -108,6 +112,7 @@ show create user mysqltest1;
|
||||
--echo # name does not match, password bad = failure
|
||||
--error 1
|
||||
--exec $try_auth -u mysqltest1 -pbad
|
||||
--source include/wait_until_count_sessions.inc
|
||||
--replace_result $dreplace "drop user 'USER'"
|
||||
eval $dreplace, mysqltest1;
|
||||
|
||||
@ -130,6 +135,7 @@ show create user mysqltest1;
|
||||
--echo # name does not match, password bad = failure
|
||||
--error 1
|
||||
--exec $try_auth -u mysqltest1 -pbad
|
||||
--source include/wait_until_count_sessions.inc
|
||||
--replace_result $dreplace "drop user 'USER'"
|
||||
eval $dreplace, mysqltest1;
|
||||
|
||||
@ -146,6 +152,7 @@ show create user mysqltest1;
|
||||
--echo # password bad = failure
|
||||
--error 1
|
||||
--exec $try_auth -u mysqltest1 -pbad
|
||||
--source include/wait_until_count_sessions.inc
|
||||
drop user mysqltest1;
|
||||
|
||||
#
|
||||
@ -198,6 +205,7 @@ show create user mysqltest1;
|
||||
--echo # SET PASSWORD helps
|
||||
set password for mysqltest1 = password('bla');
|
||||
--exec $try_auth -u mysqltest1 -pbla
|
||||
--source include/wait_until_count_sessions.inc
|
||||
--replace_result $dreplace "drop user 'USER'"
|
||||
eval $dreplace, mysqltest1;
|
||||
|
||||
@ -219,9 +227,8 @@ show create user mysqltest1;
|
||||
--exec $try_auth -u mysqltest1 -pgood --plugin-dir=$plugindir/no
|
||||
--echo # no plugin, second password works = ok
|
||||
--exec $try_auth -u mysqltest1 -pworks --plugin-dir=$plugindir/no
|
||||
--disable_warnings
|
||||
--source include/wait_until_count_sessions.inc
|
||||
drop user mysqltest1;
|
||||
--enable_warnings
|
||||
|
||||
uninstall soname 'auth_ed25519';
|
||||
--remove_file $MYSQLTEST_VARDIR/tmp/peercred_test.txt
|
||||
|
@ -1,5 +1,6 @@
|
||||
source include/platform.inc;
|
||||
source include/not_embedded.inc;
|
||||
source include/count_sessions.inc;
|
||||
|
||||
if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'parsec'`)
|
||||
{
|
||||
@ -41,6 +42,7 @@ if ($MTR_COMBINATION_WIN) {
|
||||
--echo # mysql -utest1 -ppwd --ssl-verify-server-cert -e "select test.have_ssl()"
|
||||
--exec $MYSQL --protocol tcp $host -utest1 -ppwd --ssl-verify-server-cert -e "select test.have_ssl()" 2>&1
|
||||
|
||||
source include/wait_until_count_sessions.inc;
|
||||
drop function have_ssl;
|
||||
drop user test1@'%';
|
||||
|
||||
@ -57,4 +59,5 @@ disconnect con4;
|
||||
--error ER_ACCESS_DENIED_ERROR
|
||||
connect con5, localhost, test2, "wrong_pwd";
|
||||
connection default;
|
||||
source include/wait_until_count_sessions.inc;
|
||||
drop user test2@'%';
|
||||
|
@ -208,8 +208,6 @@ connect(plug_con,localhost,plug,plug_dest,"*NO-ONE*");
|
||||
select USER(),CURRENT_USER();
|
||||
connection default;
|
||||
disconnect plug_con;
|
||||
--sleep 2
|
||||
--sleep 2
|
||||
DROP USER plug;
|
||||
DROP USER plug_dest;
|
||||
|
||||
@ -220,7 +218,6 @@ connect (conssl1,localhost,ssl_user1,,sa_db,,,SSL);
|
||||
select variable_value > '' as 'have_ssl' from information_schema.session_status where variable_name='ssl_cipher';
|
||||
disconnect conssl1;
|
||||
connection default;
|
||||
--sleep 2
|
||||
DROP USER ssl_user1@localhost;
|
||||
|
||||
set global server_audit_query_log_limit= 15;
|
||||
|
@ -49,6 +49,7 @@ Master_SSL_CA_File = 'MYSQL_TEST_DIR/std_data/cacert.pem'
|
||||
Master_SSL_Cert = 'MYSQL_TEST_DIR/std_data/client-cert.pem'
|
||||
Master_SSL_Key = 'MYSQL_TEST_DIR/std_data/client-key.pem'
|
||||
include/check_slave_is_running.inc
|
||||
# End of 4.1 tests
|
||||
connection slave;
|
||||
stop slave;
|
||||
include/wait_for_slave_to_stop.inc
|
||||
|
@ -61,13 +61,15 @@ change master to master_user='root',master_password='', master_ssl=0;
|
||||
start slave;
|
||||
--source include/wait_for_slave_to_start.inc
|
||||
connection master;
|
||||
disable_warnings;
|
||||
drop user replssl@localhost;
|
||||
enable_warnings;
|
||||
drop table t1;
|
||||
|
||||
sync_slave_with_master;
|
||||
source include/show_slave_status.inc;
|
||||
source include/check_slave_is_running.inc;
|
||||
# End of 4.1 tests
|
||||
--echo # End of 4.1 tests
|
||||
|
||||
# Start replication with ssl_verify_server_cert turned on
|
||||
connection slave;
|
||||
|
Loading…
x
Reference in New Issue
Block a user