Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 10.1, 10.0
-
Fix Version/s: 10.1.8
-
Component/s: Data Definition - Alter Table
-
Labels:
Description
I add this code into an mtr test:
CREATE TABLE t1(a INT, b INT); CREATE TABLE IF NOT EXISTS t1(a INT, b INT); CREATE INDEX IF NOT EXISTS i1 ON t1(a); CREATE INDEX IF NOT EXISTS i1 ON t1(a); SHOW CREATE TABLE t1; DROP INDEX IF EXISTS i1 ON t1; DROP INDEX IF EXISTS i1 ON t1; DROP TABLE t1; DROP TABLE IF EXISTS t1; --replace_column 1 # 2 # 5 # --replace_regex /xid=[0-9]+/xid=XX/ /GTID [0-9]+-[0-9]+-[0-9]+/GTID #-#-#/ /Server.ver.*/VER/ SHOW BINLOG EVENTS; RESET MASTER;
and see this output:
+SHOW BINLOG EVENTS; +Log_name Pos Event_type Server_id End_log_pos Info +# # Format_desc 1 # VER +# # Gtid_list 1 # [] +# # Binlog_checkpoint 1 # master-bin.000001 +# # Gtid 1 # GTID #-#-# +# # Query 1 # use `test`; CREATE TABLE t1(a INT, b INT) +# # Gtid 1 # GTID #-#-# +# # Query 1 # use `test`; CREATE TABLE IF NOT EXISTS t1(a INT, b INT) +# # Gtid 1 # GTID #-#-# +# # Query 1 # use `test`; CREATE INDEX IF NOT EXISTS i1 ON t1(a) +# # Gtid 1 # GTID #-#-# +# # Query 1 # use `test`; DROP INDEX IF EXISTS i1 ON t1 +# # Gtid 1 # GTID #-#-# +# # Query 1 # use `test`; DROP TABLE `t1` /* generated by server */ +# # Gtid 1 # GTID #-#-# +# # Query 1 # use `test`; DROP TABLE IF EXISTS `t1` /* generated by server */ +RESET MASTER;
Notice, these queries do get logged even if nothing to do:
- CREATE TABLE IF NOT EXISTS
- DROP TABLE IF EXISTS
Unlike the above, these queries do not get logged if nothing todo:
- CREATE INDEX IF NOT EXISTS i1 ON t1(a);
- DROP INDEX IF EXISTS i1 ON t1;
They should be get logged.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions
this might have been introduced in
MDEV-7390accidentally. sorry if this was the case.