| 1 |
include/master-slave.inc |
| 2 |
Warnings: |
| 3 |
Note #### Sending passwords in plain text without SSL/TLS is extremely insecure. |
| 4 |
Note #### Storing MySQL user name or password information in the connection metadata repository is not secure and is therefore not recommended. Please consider using the USER and PASSWORD connection options for START REPLICA; see the 'START REPLICA Syntax' in the MySQL Manual for more information. |
| 5 |
[connection master] |
| 6 |
call mtr.add_suppression("Replica: Can\'t find record in \'user\' Error_code: 1032"); |
| 7 |
reset master; |
| 8 |
CREATE TEMPORARY TABLE t1 (a char(1)); |
| 9 |
INSERT INTO t1 VALUES ('a'); |
| 10 |
include/sync_slave_sql_with_master.inc |
| 11 |
include/stop_slave.inc |
| 12 |
include/start_slave.inc |
| 13 |
INSERT INTO t1 VALUES ('b'); |
| 14 |
include/sync_slave_sql_with_master.inc |
| 15 |
DROP TABLE t1; |
| 16 |
include/sync_slave_sql_with_master.inc |
| 17 |
SET @save_select_limit=@@session.sql_select_limit; |
| 18 |
SET @@session.sql_select_limit=10, @@session.pseudo_thread_id=100; |
| 19 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation |
| 20 |
SELECT @@session.sql_select_limit = @save_select_limit; |
| 21 |
@@session.sql_select_limit = @save_select_limit |
| 22 |
1 |
| 23 |
SET @@session.sql_select_limit=10, @@session.sql_log_bin=0; |
| 24 |
ERROR 42000: Access denied; you need (at least one of) the SUPER, SYSTEM_VARIABLES_ADMIN or SESSION_VARIABLES_ADMIN privilege(s) for this operation |
| 25 |
SELECT @@session.sql_select_limit = @save_select_limit; |
| 26 |
@@session.sql_select_limit = @save_select_limit |
| 27 |
1 |
| 28 |
SET @save_conn_id= connection_id(); |
| 29 |
SET @@session.pseudo_thread_id=100; |
| 30 |
SET @@session.pseudo_thread_id=connection_id(); |
| 31 |
SET @@session.pseudo_thread_id=@save_conn_id; |
| 32 |
SET @@session.sql_log_bin=0; |
| 33 |
SET @@session.sql_log_bin=1; |
| 34 |
create table t1(f int); |
| 35 |
create table t2(f int); |
| 36 |
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); |
| 37 |
SELECT COUNT(*) FROM t1; |
| 38 |
COUNT(*) |
| 39 |
10 |
| 40 |
create temporary table t3(f int); |
| 41 |
insert into t3 select * from t1 where f<6; |
| 42 |
create temporary table t3(f int); |
| 43 |
insert into t2 select count(*) from t3; |
| 44 |
insert into t3 select * from t1 where f>=4; |
| 45 |
drop temporary table t3; |
| 46 |
insert into t2 select count(*) from t3; |
| 47 |
drop temporary table t3; |
| 48 |
select * from t2 ORDER BY f; |
| 49 |
f |
| 50 |
5 |
| 51 |
7 |
| 52 |
drop table t1, t2; |
| 53 |
use test; |
| 54 |
SET TIMESTAMP=1040323920; |
| 55 |
create table t1(f int); |
| 56 |
SET TIMESTAMP=1040323931; |
| 57 |
create table t2(f int); |
| 58 |
SET TIMESTAMP=1040323938; |
| 59 |
insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10); |
| 60 |
SET TIMESTAMP=1040323945; |
| 61 |
SET @@session.pseudo_thread_id=1; |
| 62 |
create temporary table t3(f int); |
| 63 |
SET TIMESTAMP=1040323952; |
| 64 |
SET @@session.pseudo_thread_id=1; |
| 65 |
insert into t3 select * from t1 where f<6; |
| 66 |
SET TIMESTAMP=1040324145; |
| 67 |
SET @@session.pseudo_thread_id=2; |
| 68 |
create temporary table t3(f int); |
| 69 |
SET TIMESTAMP=1040324186; |
| 70 |
SET @@session.pseudo_thread_id=1; |
| 71 |
insert into t2 select count(*) from t3; |
| 72 |
SET TIMESTAMP=1040324200; |
| 73 |
SET @@session.pseudo_thread_id=2; |
| 74 |
insert into t3 select * from t1 where f>=4; |
| 75 |
SET TIMESTAMP=1040324211; |
| 76 |
SET @@session.pseudo_thread_id=1; |
| 77 |
drop temporary table t3; |
| 78 |
SET TIMESTAMP=1040324219; |
| 79 |
SET @@session.pseudo_thread_id=2; |
| 80 |
insert into t2 select count(*) from t3; |
| 81 |
SET TIMESTAMP=1040324224; |
| 82 |
SET @@session.pseudo_thread_id=2; |
| 83 |
drop temporary table t3; |
| 84 |
select * from t2 ORDER BY f; |
| 85 |
f |
| 86 |
5 |
| 87 |
7 |
| 88 |
drop table t1,t2; |
| 89 |
create temporary table t3 (f int); |
| 90 |
include/sync_slave_sql_with_master.inc |
| 91 |
create temporary table t4 (f int); |
| 92 |
create table t5 (f int); |
| 93 |
include/sync_slave_sql_with_master.inc |
| 94 |
stop slave; |
| 95 |
insert into t5 select * from t4; |
| 96 |
start slave; |
| 97 |
Warnings: |
| 98 |
Warning 1287 'START SLAVE' is deprecated and will be removed in a future release. Please use START REPLICA instead |
| 99 |
select * from t5 /* must be 1 after reconnection */; |
| 100 |
f |
| 101 |
drop temporary table t4; |
| 102 |
drop table t5; |
| 103 |
set @@session.pseudo_thread_id=100; |
| 104 |
create temporary table t101 (id int); |
| 105 |
create temporary table t102 (id int); |
| 106 |
set @@session.pseudo_thread_id=200; |
| 107 |
create temporary table t201 (id int); |
| 108 |
create temporary table `t``201` (id int); |
| 109 |
create temporary table `#sql_not_user_table202` (id int); |
| 110 |
set @@session.pseudo_thread_id=300; |
| 111 |
create temporary table t301 (id int); |
| 112 |
create temporary table t302 (id int); |
| 113 |
create temporary table `#sql_not_user_table303` (id int); |
| 114 |
create table t1(f int); |
| 115 |
insert into t1 values (1); |
| 116 |
include/sync_slave_sql_with_master.inc |
| 117 |
select * from t1 /* must be 1 */; |
| 118 |
f |
| 119 |
1 |
| 120 |
drop table t1; |
| 121 |
include/sync_slave_sql_with_master.inc |
| 122 |
select * from t1; |
| 123 |
a |
| 124 |
1 |
| 125 |
drop table t1; |
| 126 |
include/sync_slave_sql_with_master.inc |
| 127 |
include/stop_slave.inc |
| 128 |
include/rpl_reset.inc |
| 129 |
-- Bug#43748 |
| 130 |
-- make a user on the slave that can list but not kill system threads. |
| 131 |
FLUSH PRIVILEGES; |
| 132 |
CREATE USER [email protected] IDENTIFIED BY 'meow'; |
| 133 |
GRANT PROCESS ON *.* TO [email protected]; |
| 134 |
-- try to KILL system-thread as that non-privileged user (on slave). |
| 135 |
SELECT id INTO @id FROM information_schema.processlist WHERE user='system user' LIMIT 1; |
| 136 |
Warnings: |
| 137 |
Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead |
| 138 |
KILL @id; |
| 139 |
Got one of the listed errors |
| 140 |
-- throw out test-user on slave. |
| 141 |
DROP USER [email protected]; |
| 142 |
End of 5.1 tests |
| 143 |
include/rpl_end.inc |