mysql>
mysql> select * from inno;
+---+----------+
| i | j |
+---+----------+
| 1 | aaaaaaaa |
+---+----------+
1 row in set (0.00 sec)
mysql> select * from mem;
+---+----------+
| i | j |
+---+----------+
| 1 | aaaaaaaa |
+---+----------+
1 row in set (0.00 sec)
mysql> show master status;
+------------------+----------+--------------+------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+-------------------+
| mysql-bin.000001 | 1800 | | | |
+------------------+----------+--------------+------------------+-------------------+
1 row in set (0.00 sec)
mysql> quit
Bye
root@debian:/var/log/mysql# ll
-bash: ll: command not found
root@debian:/var/log/mysql# ls -al
total 16
drwxr-s--- 2 mysql adm 4096 Aug 6 15:44 .
drwxr-xr-x 15 root root 4096 Jul 23 13:30 ..
-rw-rw---- 1 mysql adm 1800 Aug 6 15:47 mysql-bin.000001
-rw-rw---- 1 mysql adm 32 Aug 6 15:44 mysql-bin.index
root@debian:/var/log/mysql#
root@debian:/var/log/mysql#
root@debian:/var/log/mysql# mysqlbinlog --base64-output=DECODE-ROWS --verbose mysql-bin.000001
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#140806 15:44:48 server id 1 end_log_pos 120 CRC32 0x1206506c Start: binlog v 4, server v 5.6.19-67.0-56-log created 140806 15:44:48 at startup
# Warning: this binlog is either in use or was not closed properly.
ROLLBACK/*!*/;
# at 120
#140806 15:45:56 server id 1 end_log_pos 214 CRC32 0xd5f0c018 Query thread_id=4 exec_time=0 error_code=0
use `nil`/*!*/;
SET TIMESTAMP=1407320156/*!*/;
SET @@session.pseudo_thread_id=4/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=1073741824/*!*/;
SET @@session.auto_increment_increment=2, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
DELETE FROM `nil`.`mem`
/*!*/;
# at 214
#140806 15:46:02 server id 1 end_log_pos 330 CRC32 0x01e56fb5 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320162/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
DROP TABLE `black` /* generated by server */
/*!*/;
# at 330
#140806 15:46:05 server id 1 end_log_pos 444 CRC32 0x0f7ba2e4 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320165/*!*/;
DROP TABLE `mem` /* generated by server */
/*!*/;
# at 444
#140806 15:46:07 server id 1 end_log_pos 559 CRC32 0xef52b35a Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320167/*!*/;
DROP TABLE `inno` /* generated by server */
/*!*/;
# at 559
#140806 15:46:30 server id 1 end_log_pos 787 CRC32 0x4f634473 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320190/*!*/;
CREATE TABLE `inno` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
`j` varchar(32) NOT NULL,
PRIMARY KEY (`i`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!*/;
# at 787
#140806 15:46:36 server id 1 end_log_pos 1014 CRC32 0x0a47f20d Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320196/*!*/;
CREATE TABLE `mem` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
`j` varchar(32) NOT NULL,
PRIMARY KEY (`i`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
/*!*/;
# at 1014
#140806 15:46:46 server id 1 end_log_pos 1246 CRC32 0x3ffa78a6 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320206/*!*/;
CREATE TABLE `black` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
`j` varchar(32) NOT NULL,
PRIMARY KEY (`i`)
) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1
/*!*/;
# at 1246
#140806 15:47:17 server id 1 end_log_pos 1322 CRC32 0xcf7a07ee Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320237/*!*/;
SET @@session.auto_increment_increment=2, @@session.auto_increment_offset=1/*!*/;
BEGIN
/*!*/;
# at 1322
#140806 15:47:17 server id 1 end_log_pos 1370 CRC32 0x1ae166e3 Table_map: `nil`.`mem` mapped to number 74
# at 1370
#140806 15:47:17 server id 1 end_log_pos 1419 CRC32 0xd2c138b7 Write_rows: table id 74 flags: STMT_END_F
### INSERT INTO `nil`.`mem`
### SET
### @1=1
### @2='aaaaaaaa'
# at 1419
#140806 15:47:17 server id 1 end_log_pos 1496 CRC32 0x06765dd0 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320237/*!*/;
COMMIT
/*!*/;
# at 1496
#140806 15:46:55 server id 1 end_log_pos 1572 CRC32 0x4c5e252b Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=1407320215/*!*/;
BEGIN
/*!*/;
# at 1572
#140806 15:46:55 server id 1 end_log_pos 1621 CRC32 0x62b41f19 Table_map: `nil`.`inno` mapped to number 73
# at 1621
#140806 15:46:55 server id 1 end_log_pos 1670 CRC32 0x9a142544 Write_rows: table id 73 flags: STMT_END_F
### INSERT INTO `nil`.`inno`
### SET
### @1=1
### @2='aaaaaaaa'
# at 1670
#140806 15:47:41 server id 1 end_log_pos 1720 CRC32 0xaf3956c0 Table_map: `nil`.`black` mapped to number 75
# at 1720
#140806 15:47:41 server id 1 end_log_pos 1769 CRC32 0xd9ab5633 Write_rows: table id 75 flags: STMT_END_F
### INSERT INTO `nil`.`black`
### SET
### @1=1
### @2='aaaaaaaa'
# at 1769
#140806 15:47:45 server id 1 end_log_pos 1800 CRC32 0x02b2e32e Xid = 38
COMMIT/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
root@debian:/var/log/mysql#
On Node2:
mysql> select * from inno;
+---+----------+
| i | j |
+---+----------+
| 1 | aaaaaaaa |
+---+----------+
1 row in set (0.00 sec)
Verified above the same thing with PXC 5.6
On Node1:
mysql> CREATE TABLE `inno` (
-> `i` int(10) unsigned NOT NULL AUTO_INCREMENT,
-> `j` varchar(32) NOT NULL,
-> PRIMARY KEY (`i`)
-> ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.18 sec)
mysql> CREATE TABLE `mem` (
-> `i` int(10) unsigned NOT NULL AUTO_INCREMENT,
-> `j` varchar(32) NOT NULL,
-> PRIMARY KEY (`i`)
-> ) ENGINE=MEMORY DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.05 sec)
mysql> CREATE TABLE `black` (
-> `i` int(10) unsigned NOT NULL AUTO_INCREMENT,
-> `j` varchar(32) NOT NULL,
-> PRIMARY KEY (`i`)
-> ) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1;
Query OK, 0 rows affected (0.03 sec)
mysql>
mysql>
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into inno (j) values ('aaaaaaaa' );
Query OK, 1 row affected (0.00 sec)
mysql> insert into mem (j) values ('aaaaaaaa' );
Query OK, 1 row affected (0.00 sec)
mysql> insert into black (j) values ('aaaaaaaa' );
Query OK, 1 row affected (0.00 sec)
mysql> commit;
Query OK, 0 rows affected (0.03 sec)
mysql>
mysql> select * from inno;
+---+----------+
| i | j |
+---+----------+
| 1 | aaaaaaaa |
+---+----------+
1 row in set (0.00 sec)
mysql> select * from mem;
+---+----------+
| i | j |
+---+----------+
| 1 | aaaaaaaa |
+---+----------+
1 row in set (0.00 sec)
mysql> show master status; ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- + ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- + ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- +
+------
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------
| mysql-bin.000001 | 1800 | | | |
+------
1 row in set (0.00 sec)
mysql> quit /var/log/ mysql# ll /var/log/ mysql# ls -al /var/log/ mysql# /var/log/ mysql# /var/log/ mysql# mysqlbinlog --base64- output= DECODE- ROWS --verbose mysql-bin.000001 PSEUDO_ SLAVE_MODE= 1*/; max_insert_ delayed_ threads= 0*/; _TYPE=@ @COMPLETION_ TYPE,COMPLETION _TYPE=0* /; 1407320156/ *!*/; pseudo_ thread_ id=4/*! */; foreign_ key_checks= 1, @@session. sql_auto_ is_null= 0, @@session. unique_ checks= 1, @@session. autocommit= 1/*!*/; sql_mode= 1073741824/ *!*/; auto_increment_ increment= 2, @@session. auto_increment_ offset= 1/*!*/; character_ set_client= 33,@@session. collation_ connection= 33,@@session. collation_ server= 8/*!*/; lc_time_ names=0/ *!*/; collation_ database= DEFAULT/ *!*/; 1407320162/ *!*/; auto_increment_ increment= 1, @@session. auto_increment_ offset= 1/*!*/; 1407320165/ *!*/; 1407320167/ *!*/; 1407320190/ *!*/; 1407320196/ *!*/; 1407320206/ *!*/; 1407320237/ *!*/; auto_increment_ increment= 2, @@session. auto_increment_ offset= 1/*!*/; 1407320237/ *!*/; 1407320215/ *!*/; TYPE=@OLD_ COMPLETION_ TYPE*/; PSEUDO_ SLAVE_MODE= 0*/; /var/log/ mysql#
Bye
root@debian:
-bash: ll: command not found
root@debian:
total 16
drwxr-s--- 2 mysql adm 4096 Aug 6 15:44 .
drwxr-xr-x 15 root root 4096 Jul 23 13:30 ..
-rw-rw---- 1 mysql adm 1800 Aug 6 15:47 mysql-bin.000001
-rw-rw---- 1 mysql adm 32 Aug 6 15:44 mysql-bin.index
root@debian:
root@debian:
root@debian:
/*!50530 SET @@SESSION.
/*!40019 SET @@session.
/*!50003 SET @OLD_COMPLETION
DELIMITER /*!*/;
# at 4
#140806 15:44:48 server id 1 end_log_pos 120 CRC32 0x1206506c Start: binlog v 4, server v 5.6.19-67.0-56-log created 140806 15:44:48 at startup
# Warning: this binlog is either in use or was not closed properly.
ROLLBACK/*!*/;
# at 120
#140806 15:45:56 server id 1 end_log_pos 214 CRC32 0xd5f0c018 Query thread_id=4 exec_time=0 error_code=0
use `nil`/*!*/;
SET TIMESTAMP=
SET @@session.
SET @@session.
SET @@session.
SET @@session.
/*!\C utf8 *//*!*/;
SET @@session.
SET @@session.
SET @@session.
DELETE FROM `nil`.`mem`
/*!*/;
# at 214
#140806 15:46:02 server id 1 end_log_pos 330 CRC32 0x01e56fb5 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
SET @@session.
DROP TABLE `black` /* generated by server */
/*!*/;
# at 330
#140806 15:46:05 server id 1 end_log_pos 444 CRC32 0x0f7ba2e4 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
DROP TABLE `mem` /* generated by server */
/*!*/;
# at 444
#140806 15:46:07 server id 1 end_log_pos 559 CRC32 0xef52b35a Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
DROP TABLE `inno` /* generated by server */
/*!*/;
# at 559
#140806 15:46:30 server id 1 end_log_pos 787 CRC32 0x4f634473 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
CREATE TABLE `inno` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
`j` varchar(32) NOT NULL,
PRIMARY KEY (`i`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
/*!*/;
# at 787
#140806 15:46:36 server id 1 end_log_pos 1014 CRC32 0x0a47f20d Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
CREATE TABLE `mem` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
`j` varchar(32) NOT NULL,
PRIMARY KEY (`i`)
) ENGINE=MEMORY DEFAULT CHARSET=latin1
/*!*/;
# at 1014
#140806 15:46:46 server id 1 end_log_pos 1246 CRC32 0x3ffa78a6 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
CREATE TABLE `black` (
`i` int(10) unsigned NOT NULL AUTO_INCREMENT,
`j` varchar(32) NOT NULL,
PRIMARY KEY (`i`)
) ENGINE=BLACKHOLE DEFAULT CHARSET=latin1
/*!*/;
# at 1246
#140806 15:47:17 server id 1 end_log_pos 1322 CRC32 0xcf7a07ee Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
SET @@session.
BEGIN
/*!*/;
# at 1322
#140806 15:47:17 server id 1 end_log_pos 1370 CRC32 0x1ae166e3 Table_map: `nil`.`mem` mapped to number 74
# at 1370
#140806 15:47:17 server id 1 end_log_pos 1419 CRC32 0xd2c138b7 Write_rows: table id 74 flags: STMT_END_F
### INSERT INTO `nil`.`mem`
### SET
### @1=1
### @2='aaaaaaaa'
# at 1419
#140806 15:47:17 server id 1 end_log_pos 1496 CRC32 0x06765dd0 Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
COMMIT
/*!*/;
# at 1496
#140806 15:46:55 server id 1 end_log_pos 1572 CRC32 0x4c5e252b Query thread_id=4 exec_time=0 error_code=0
SET TIMESTAMP=
BEGIN
/*!*/;
# at 1572
#140806 15:46:55 server id 1 end_log_pos 1621 CRC32 0x62b41f19 Table_map: `nil`.`inno` mapped to number 73
# at 1621
#140806 15:46:55 server id 1 end_log_pos 1670 CRC32 0x9a142544 Write_rows: table id 73 flags: STMT_END_F
### INSERT INTO `nil`.`inno`
### SET
### @1=1
### @2='aaaaaaaa'
# at 1670
#140806 15:47:41 server id 1 end_log_pos 1720 CRC32 0xaf3956c0 Table_map: `nil`.`black` mapped to number 75
# at 1720
#140806 15:47:41 server id 1 end_log_pos 1769 CRC32 0xd9ab5633 Write_rows: table id 75 flags: STMT_END_F
### INSERT INTO `nil`.`black`
### SET
### @1=1
### @2='aaaaaaaa'
# at 1769
#140806 15:47:45 server id 1 end_log_pos 1800 CRC32 0x02b2e32e Xid = 38
COMMIT/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_
/*!50530 SET @@SESSION.
root@debian:
On Node2:
mysql> select * from inno;
+---+----------+
| i | j |
+---+----------+
| 1 | aaaaaaaa |
+---+----------+
1 row in set (0.00 sec)
mysql> select * from mem;
Empty set (0.00 sec)