MySQL 5.6 create table like 同步异常问题分析与总结(2)

Database changed
linuxidc@21:03:56> show tables;
+------------------+
| Tables_in_linuxidc |
+------------------+
| t_check_sync    |
| linuxidc_a        |
| linuxidc_b        |
| linuxidc_c        |
| linuxidc_d        |
+------------------+
5 rows in set (0.00 sec)

linuxidc@21:04:26>

再看从库上实际创建的表的情况,linuxidc库中有两张,test库没有:
linuxidc@20:38:26> show tables;
+------------------+
| Tables_in_linuxidc |
+------------------+
| t_check_sync    |
| linuxidc_a        |
| linuxidc_c        |
+------------------+
3 rows in set (0.00 sec)

linuxidc@20:40:55> use test;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
test@20:40:58> show tables;
+----------------+
| Tables_in_test |
+----------------+
| tmp_1126      |
+----------------+
1 row in set (0.00 sec)

test@20:41:00>

在从库上查看relay-log,说明在主库上创建8张对照表的binlog已经同步过来了,只不过slave在reply的时候过滤掉了,日志内容如下:
[root@localhost logs]# /usr/local/mysql/bin/mysqlbinlog -vv --start-datetime='2016-10-27 20:39:55' --stop-datetime='2016-10-27 20:39:56' relay_log.003689 > /tmp/test.sql
[root@localhost logs]# grep 'test_[a-z]\|linuxidc_[a-z]' /tmp/test.sql
create table test.test_a like linuxidc.t_check_sync
create table linuxidc.linuxidc_a like linuxidc.t_check_sync
create table test.test_b like test.t_store
create table linuxidc.linuxidc_b like test.t_store
create table test.test_c like linuxidc.t_check_sync
create table linuxidc.linuxidc_c like linuxidc.t_check_sync
create table test.test_d like test.t_store
create table linuxidc.linuxidc_d like test.t_store
[root@localhost logs]#

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/a64a658f3233462c18e875f0b1d52fa5.html