When ROW binlog_format is used then CREATE statement does not increase the GTID sequence number as the CREATE is not logged to the binary log. However, on connection termination a DROP statement is written to the binary log which increases the GTID sequence number.
mysql> show master status;
+------------------+----------+--------------+------------------+---------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+---------------------------------------------+
| mysql-bin.000004 | 433 | | | bedd0818-5f32-11e6-bfa0-0242ac110002:1-7061 |
+------------------+----------+--------------+------------------+---------------------------------------------+
1 row in set (0.00 sec)
mysql> Bye
root@4b9ad2a13f3d:/# mysql -proot
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.6.31-77.0-log Percona Server (GPL), Release 77.0, Revision 5c1061c
Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show master status;
+------------------+----------+--------------+------------------+---------------------------------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------------------+----------+--------------+------------------+---------------------------------------------+
| mysql-bin.000004 | 602 | | | bedd0818-5f32-11e6-bfa0-0242ac110002:1-7062 |
+------------------+----------+--------------+------------------+---------------------------------------------+
1 row in set (0.00 sec)
When ROW binlog_format is used then CREATE statement does not increase the GTID sequence number as the CREATE is not logged to the binary log. However, on connection termination a DROP statement is written to the binary log which increases the GTID sequence number.
```
mysql> set session binlog_format=row;
Query OK, 0 rows affected (0.00 sec)
mysql> 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
mysql> insert into t1 values();
Query OK, 1 row affected (0.00 sec)
mysql> show master status; ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+ ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+ 5f32-11e6- bfa0-0242ac1100 02:1-7061 | ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+
+------
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------
| mysql-bin.000004 | 433 | | | bedd0818-
+------
1 row in set (0.00 sec)
mysql> create temporary table t1_temp_3 as select * from t1;
Query OK, 6 rows affected (0.01 sec)
Records: 6 Duplicates: 0 Warnings: 0
mysql> show master status; ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+ ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+ 5f32-11e6- bfa0-0242ac1100 02:1-7061 | ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+
+------
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------
| mysql-bin.000004 | 433 | | | bedd0818-
+------
1 row in set (0.00 sec)
mysql> Bye 3d:/# mysql -proot
root@4b9ad2a13f
Warning: Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.6.31-77.0-log Percona Server (GPL), Release 77.0, Revision 5c1061c
Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show master status; ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+ ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+ 5f32-11e6- bfa0-0242ac1100 02:1-7062 | ------- -----+- ------- --+---- ------- ---+--- ------- ------- -+----- ------- ------- ------- ------- ------- -----+
+------
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+------
| mysql-bin.000004 | 602 | | | bedd0818-
+------
1 row in set (0.00 sec)
mysql> Bye
```