| 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 |
drop table if exists test.t1; |
| 7 |
reset master; |
| 8 |
create table test.t1(a int); |
| 9 |
drop table test.t1; |
| 10 |
include/show_binlog_events.inc |
| 11 |
Log_name Pos Event_type Server_id End_log_pos Info |
| 12 |
slave-bin.000001 # Query # # use `test`; create table test.t1(a int) |
| 13 |
slave-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */ |
| 14 |
"============ Performance schema on master ============" |
| 15 |
select ID from INFORMATION_SCHEMA.PROCESSLIST |
| 16 |
where COMMAND = "Binlog Dump" |
| 17 |
into @master_dump_pid; |
| 18 |
Warnings: |
| 19 |
Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead |
| 20 |
select COMMAND, STATE |
| 21 |
from INFORMATION_SCHEMA.PROCESSLIST |
| 22 |
where ID = @master_dump_pid; |
| 23 |
COMMAND STATE |
| 24 |
Binlog Dump Source has sent all binlog to replica; waiting for more updates |
| 25 |
Warnings: |
| 26 |
Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead |
| 27 |
select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE |
| 28 |
from performance_schema.threads |
| 29 |
where PROCESSLIST_ID = @master_dump_pid; |
| 30 |
NAME TYPE PROCESSLIST_COMMAND PROCESSLIST_STATE |
| 31 |
thread/sql/one_connection FOREGROUND Binlog Dump Source has sent all binlog to replica; waiting for more updates |
| 32 |
select THREAD_ID from performance_schema.threads |
| 33 |
where PROCESSLIST_ID = @master_dump_pid |
| 34 |
into @master_dump_tid; |
| 35 |
select VARIABLE_NAME, |
| 36 |
IF (VARIABLE_VALUE = @master_dump_pid, "same", "different") as 'test' |
| 37 |
from performance_schema.variables_by_thread |
| 38 |
where VARIABLE_NAME = 'pseudo_thread_id' and THREAD_ID = @master_dump_tid; |
| 39 |
VARIABLE_NAME test |
| 40 |
pseudo_thread_id same |
| 41 |
select VARIABLE_NAME, VARIABLE_VALUE |
| 42 |
from performance_schema.status_by_thread |
| 43 |
where VARIABLE_NAME = 'Compression_level' and THREAD_ID = @master_dump_tid; |
| 44 |
VARIABLE_NAME VARIABLE_VALUE |
| 45 |
Compression_level 0 |
| 46 |
"============ Performance schema on slave ============" |
| 47 |
select ID from INFORMATION_SCHEMA.PROCESSLIST |
| 48 |
where STATE like "Waiting for source to send event%" |
| 49 |
into @slave_io_pid; |
| 50 |
Warnings: |
| 51 |
Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead |
| 52 |
select COMMAND, STATE |
| 53 |
from INFORMATION_SCHEMA.PROCESSLIST |
| 54 |
where ID = @slave_io_pid; |
| 55 |
COMMAND STATE |
| 56 |
Connect Waiting for source to send event |
| 57 |
Warnings: |
| 58 |
Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead |
| 59 |
select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE |
| 60 |
from performance_schema.threads |
| 61 |
where PROCESSLIST_ID = @slave_io_pid; |
| 62 |
NAME TYPE PROCESSLIST_COMMAND PROCESSLIST_STATE |
| 63 |
thread/sql/replica_io FOREGROUND Connect Waiting for source to send event |
| 64 |
select THREAD_ID from performance_schema.threads |
| 65 |
where PROCESSLIST_ID = @slave_io_pid |
| 66 |
into @slave_io_tid; |
| 67 |
select VARIABLE_NAME, |
| 68 |
IF (VARIABLE_VALUE = @slave_io_pid, "same", "different") as 'test' |
| 69 |
from performance_schema.variables_by_thread |
| 70 |
where VARIABLE_NAME = 'pseudo_thread_id' and THREAD_ID = @slave_io_tid; |
| 71 |
VARIABLE_NAME test |
| 72 |
pseudo_thread_id same |
| 73 |
select VARIABLE_NAME, VARIABLE_VALUE |
| 74 |
from performance_schema.status_by_thread |
| 75 |
where VARIABLE_NAME = 'Compression_level' and THREAD_ID = @slave_io_tid; |
| 76 |
VARIABLE_NAME VARIABLE_VALUE |
| 77 |
Compression_level 0 |
| 78 |
select ID from INFORMATION_SCHEMA.PROCESSLIST |
| 79 |
where STATE like "Replica has read all relay log%" |
| 80 |
into @slave_sql_pid; |
| 81 |
Warnings: |
| 82 |
Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead |
| 83 |
select COMMAND, STATE |
| 84 |
from INFORMATION_SCHEMA.PROCESSLIST |
| 85 |
where ID = @slave_sql_pid; |
| 86 |
COMMAND STATE |
| 87 |
Query Replica has read all relay log; waiting for more updates |
| 88 |
Warnings: |
| 89 |
Warning 1287 'INFORMATION_SCHEMA.PROCESSLIST' is deprecated and will be removed in a future release. Please use performance_schema.processlist instead |
| 90 |
select NAME, TYPE, PROCESSLIST_COMMAND, PROCESSLIST_STATE |
| 91 |
from performance_schema.threads |
| 92 |
where PROCESSLIST_ID = @slave_sql_pid; |
| 93 |
NAME TYPE PROCESSLIST_COMMAND PROCESSLIST_STATE |
| 94 |
thread/sql/replica_sql FOREGROUND Query Replica has read all relay log; waiting for more updates |
| 95 |
select THREAD_ID from performance_schema.threads |
| 96 |
where PROCESSLIST_ID = @slave_sql_pid |
| 97 |
into @slave_sql_tid; |
| 98 |
select VARIABLE_NAME, |
| 99 |
IF (VARIABLE_VALUE = @slave_sql_pid, "same", "different") as 'test' |
| 100 |
from performance_schema.variables_by_thread |
| 101 |
where VARIABLE_NAME = 'pseudo_thread_id' and THREAD_ID = @slave_sql_tid; |
| 102 |
VARIABLE_NAME test |
| 103 |
pseudo_thread_id same |
| 104 |
select VARIABLE_NAME, VARIABLE_VALUE |
| 105 |
from performance_schema.status_by_thread |
| 106 |
where VARIABLE_NAME = 'Compression_level' and THREAD_ID = @slave_sql_tid; |
| 107 |
VARIABLE_NAME VARIABLE_VALUE |
| 108 |
Compression_level 0 |
| 109 |
include/rpl_end.inc |