Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0(EOL), 10.1(EOL)
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.
Attachments
Activity
Field | Original Value | New Value |
---|---|---|
Summary | ALTER TABLE {ADD|DROP} INDEX IF [NOT] EXISTS do not get written into binlog if nothing to do | ALTER TABLE {ADD|DROP} INDEX IF [NOT] EXISTS does not get written into binlog if nothing to do |
Component/s | Data Definition - Alter Table [ 10114 ] | |
Affects Version/s | 10.1 [ 16100 ] | |
Affects Version/s | 10.0 [ 16000 ] |
Labels | verified |
Workflow | MariaDB v2 [ 60202 ] | MariaDB v3 [ 66965 ] |
Assignee | Alexander Barkov [ bar ] |
Assignee | Alexey Botchkov [ holyfoot ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Alexey Botchkov [ holyfoot ] | Alexander Barkov [ bar ] |
Assignee | Alexander Barkov [ bar ] | Alexey Botchkov [ holyfoot ] |
Fix Version/s | 10.1.8 [ 19605 ] | |
Fix Version/s | 10.1 [ 16100 ] | |
Resolution | Fixed [ 1 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 66965 ] | MariaDB v4 [ 148924 ] |
this might have been introduced in
MDEV-7390accidentally. sorry if this was the case.