mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge branch '10.2' into 10.3
This commit is contained in:
@@ -5,9 +5,9 @@
|
||||
# Requirements:
|
||||
#########################################
|
||||
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
sync_slave_with_master;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
connection master;
|
||||
|
||||
|
@@ -20,21 +20,21 @@ GRANT DROP ON `test`.* TO 'rpl_do_grant'@'localhost'
|
||||
connection master;
|
||||
set password for rpl_do_grant@localhost=password("does it work?");
|
||||
connection slave;
|
||||
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
|
||||
password<>_binary''
|
||||
select authentication_string<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
|
||||
authentication_string<>_binary''
|
||||
1
|
||||
connection master;
|
||||
update mysql.user set password='' where user='rpl_do_grant';
|
||||
update mysql.user set authentication_string='' where user='rpl_do_grant';
|
||||
flush privileges;
|
||||
select password<>'' from mysql.user where user='rpl_do_grant';
|
||||
password<>''
|
||||
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
|
||||
authentication_string<>''
|
||||
0
|
||||
set sql_mode='ANSI_QUOTES';
|
||||
set password for rpl_do_grant@localhost=password('does it work?');
|
||||
set sql_mode='';
|
||||
connection slave;
|
||||
select password<>'' from mysql.user where user='rpl_do_grant';
|
||||
password<>''
|
||||
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
|
||||
authentication_string<>''
|
||||
1
|
||||
connection master;
|
||||
delete from mysql.user where user=_binary'rpl_do_grant';
|
||||
|
@@ -480,72 +480,72 @@ SET TRANSACTION ISOLATION LEVEL SERIALIZABLE;
|
||||
|
||||
******************** CREATE USER ********************
|
||||
CREATE USER 'user_test_rpl'@'localhost' IDENTIFIED BY PASSWORD '*1111111111111111111111111111111111111111';
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
connection master;
|
||||
|
||||
******************** GRANT ********************
|
||||
GRANT SELECT ON *.* TO 'user_test_rpl'@'localhost';
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 Y
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 Y
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 Y
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 Y
|
||||
connection master;
|
||||
|
||||
******************** REVOKE ********************
|
||||
REVOKE SELECT ON *.* FROM 'user_test_rpl'@'localhost';
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl *1111111111111111111111111111111111111111 N
|
||||
connection master;
|
||||
|
||||
******************** SET PASSWORD ********************
|
||||
SET PASSWORD FOR 'user_test_rpl'@'localhost' = '*0000000000000000000000000000000000000000';
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl *0000000000000000000000000000000000000000 N
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl mysql_native_password *0000000000000000000000000000000000000000 N
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl *0000000000000000000000000000000000000000 N
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl mysql_native_password *0000000000000000000000000000000000000000 N
|
||||
connection master;
|
||||
|
||||
******************** RENAME USER ********************
|
||||
RENAME USER 'user_test_rpl'@'localhost' TO 'user_test_rpl_2'@'localhost';
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl_2 *0000000000000000000000000000000000000000 N
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl_2 mysql_native_password *0000000000000000000000000000000000000000 N
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
localhost user_test_rpl_2 *0000000000000000000000000000000000000000 N
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
localhost user_test_rpl_2 mysql_native_password *0000000000000000000000000000000000000000 N
|
||||
connection master;
|
||||
|
||||
******************** DROP USER ********************
|
||||
DROP USER 'user_test_rpl_2'@'localhost';
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
connection slave;
|
||||
USE test_rpl;
|
||||
SELECT host, user, password, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password select_priv
|
||||
SELECT host, user, password, plugin, authentication_string, select_priv FROM mysql.user WHERE user LIKE 'user_test_rpl%';
|
||||
host user password plugin authentication_string select_priv
|
||||
connection master;
|
||||
INSERT INTO t1 VALUES(100, 'test');
|
||||
|
||||
|
@@ -610,8 +610,39 @@ a b
|
||||
57 7
|
||||
58 8
|
||||
59 9
|
||||
connection server_1;
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
include/save_master_gtid.inc
|
||||
connection server_2;
|
||||
include/sync_with_master_gtid.inc
|
||||
connection server_2;
|
||||
set global log_warnings=2;
|
||||
BEGIN;
|
||||
INSERT INTO t1 SET a=1;
|
||||
connection server_1;
|
||||
SET @save.binlog_format=@@session.binlog_format;
|
||||
SET @@SESSION.binlog_format=row;
|
||||
BEGIN;
|
||||
INSERT INTO t1 SET a=1;
|
||||
INSERT INTO t2 SET a=1;
|
||||
COMMIT;
|
||||
BEGIN;
|
||||
DELETE FROM t2;
|
||||
COMMIT;
|
||||
connection server_2;
|
||||
connection server_2;
|
||||
ROLLBACK;
|
||||
connection server_1;
|
||||
SET @@SESSION.binlog_format= @save.binlog_format;
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
include/save_master_gtid.inc
|
||||
connection server_2;
|
||||
include/sync_with_master_gtid.inc
|
||||
connection server_2;
|
||||
include/stop_slave.inc
|
||||
set global log_warnings=default;
|
||||
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
|
||||
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
|
||||
include/start_slave.inc
|
||||
|
@@ -27,20 +27,20 @@ show grants for rpl_do_grant@localhost;
|
||||
connection master;
|
||||
set password for rpl_do_grant@localhost=password("does it work?");
|
||||
sync_slave_with_master;
|
||||
select password<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
|
||||
select authentication_string<>_binary'' from mysql.user where user=_binary'rpl_do_grant';
|
||||
|
||||
#
|
||||
# Bug#24158 SET PASSWORD in binary log fails under ANSI_QUOTES
|
||||
#
|
||||
connection master;
|
||||
update mysql.user set password='' where user='rpl_do_grant';
|
||||
update mysql.user set authentication_string='' where user='rpl_do_grant';
|
||||
flush privileges;
|
||||
select password<>'' from mysql.user where user='rpl_do_grant';
|
||||
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
|
||||
set sql_mode='ANSI_QUOTES';
|
||||
set password for rpl_do_grant@localhost=password('does it work?');
|
||||
set sql_mode='';
|
||||
sync_slave_with_master;
|
||||
select password<>'' from mysql.user where user='rpl_do_grant';
|
||||
select authentication_string<>'' from mysql.user where user='rpl_do_grant';
|
||||
|
||||
|
||||
# clear what we have done, to not influence other tests.
|
||||
|
@@ -484,10 +484,69 @@ SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
|
||||
SELECT * FROM t1 WHERE a >= 40 ORDER BY a;
|
||||
SELECT * FROM t2 WHERE a >= 40 ORDER BY a;
|
||||
|
||||
# Clean up.
|
||||
# partial cleanup to reuse the tables by following tests
|
||||
--connection server_1
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
--source include/save_master_gtid.inc
|
||||
|
||||
--connection server_2
|
||||
--source include/sync_with_master_gtid.inc
|
||||
|
||||
#
|
||||
# MDEV-13577 optimistic parallel slave errors out to error log unnecessary
|
||||
#
|
||||
|
||||
# The 1st of the following two trx:s a blocker on slave
|
||||
--connection server_2
|
||||
set global log_warnings=2;
|
||||
BEGIN;
|
||||
INSERT INTO t1 SET a=1;
|
||||
|
||||
--connection server_1
|
||||
SET @save.binlog_format=@@session.binlog_format;
|
||||
SET @@SESSION.binlog_format=row;
|
||||
|
||||
BEGIN;
|
||||
INSERT INTO t1 SET a=1;
|
||||
INSERT INTO t2 SET a=1;
|
||||
COMMIT;
|
||||
|
||||
# This transaction is going to win optimistical race with above INSERT
|
||||
# on slave while being depend on it. That means it will face a kind of temporary error
|
||||
# and then will retry to succeed.
|
||||
BEGIN;
|
||||
DELETE FROM t2;
|
||||
COMMIT;
|
||||
|
||||
# First make sure DELETE raced indeed to get stuck at retrying stage
|
||||
# where it runs "realistically" now. There is nomore optimistic error
|
||||
# in the errorlog, which is downgraded to the warning level (when
|
||||
# --log-warnings > 1), see above suppression.
|
||||
--connection server_2
|
||||
--let $wait_condition= SELECT COUNT(*) = 1 FROM information_schema.processlist WHERE state = "Waiting for prior transaction to commit"
|
||||
--source include/wait_condition.inc
|
||||
|
||||
# Next release the 1st trx to commit.
|
||||
--connection server_2
|
||||
ROLLBACK;
|
||||
|
||||
# MDEV-13577 local cleanup:
|
||||
--connection server_1
|
||||
SET @@SESSION.binlog_format= @save.binlog_format;
|
||||
DELETE FROM t1;
|
||||
DELETE FROM t2;
|
||||
--source include/save_master_gtid.inc
|
||||
|
||||
--connection server_2
|
||||
--source include/sync_with_master_gtid.inc
|
||||
|
||||
#
|
||||
# Clean up.
|
||||
#
|
||||
--connection server_2
|
||||
--source include/stop_slave.inc
|
||||
set global log_warnings=default;
|
||||
SET GLOBAL slave_parallel_mode=@old_parallel_mode;
|
||||
SET GLOBAL slave_parallel_threads=@old_parallel_threads;
|
||||
--source include/start_slave.inc
|
||||
|
Reference in New Issue
Block a user