SET @value=62;
PREPARE stmt FROM 'INSERT INTO /*!!100000 blabla */ t1 VALUES(?) /*!!100000 ,(63)*/';
EXECUTE stmt USING @value;
DROP TABLE t1;
CREATE TABLE t1(c1 INT);
EXECUTE stmt USING @value;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO /* 100000 blabla*/ t1 VALUES(60) /* 100000 ,(61)*/
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO /* 100000 blabla*/ t1 VALUES(60) /* 100000 ,(61)*/
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO /* 100000 blabla */ t1 VALUES(62) /* 100000 ,(63)*/
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO /* 100000 blabla */ t1 VALUES(62) /* 100000 ,(63)*/
master-bin.000001 # Query # # COMMIT
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:t1,server_3:t1]
# Case3:
# -----------------------------------------------------------------
# Unclosed reversed executable comment — the '!!' must be restored
# so the parser produces a proper syntax error.
connection server_1;
SELECT c1 FROM /*!!100000 t1 WHEREN; ERROR42000:YouhaveanerrorinyourSQLsyntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '/*!!100000 t1 WHEREN' at line 1
# Case5:
# -----------------------------------------------------------------
# Delimiter change with reversed executable comment. A parse error
# must not cause master/slave divergence.
insert t1 values /*!! (100);insert t1 values */ (200) // ERROR42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'insert t1 values */ (200)' at line 1
select * from t1;
c1 62 3 20
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
select * from t1;
c1 62 3 20
connection server_1;
# Case6:
# -----------------------------------------------------------------
# MariaDB-specific reversed comments /*M!!version */
# /*M!!100000 */ does not execute (server >= 100000), must be plain
# comment in binlog. /*M!!999999 */ executes (server < 999999).
DROP TABLE t1;
CREATE TABLE t1(c1 INT);
INSERT /*M!!100000 blabla */ INTO t1 VALUES(70);
INSERT INTO t1 VALUES(/*M!!999999 80 + */ 1);
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT /*M 100000 blabla */ INTO t1 VALUES(70)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES(/*M!! 80 + */ 1)
master-bin.000001 # Query # # COMMIT
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
include/diff_tables.inc [server_1:t1,server_3:t1]
connection server_1;
DROP TABLE t1;
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
# Case7:
# -----------------------------------------------------------------
# combination of forward and reverse comments
connection server_1;
create table t1 (correct int);
create /*!990000 or replace*/ table /*!!989999 if not exists */ t1 (wrong int);
Warnings:
Note 1050 Table 't1' already exists
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`correct` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
connection server_1;
create orreplace table t1 (wrong int);
create /*!!989999 or replace*/ table /*!999999 if not exists */ t1 (correct int);
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`correct` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
connection server_1;
create orreplace table t1 (correct int);
create /*!!120000 or replace*/ table /*!119999 if not exists */ t1 (wrong int);
Warnings:
Note 1050 Table 't1' already exists
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`correct` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
connection server_1;
create orreplace table t1 (wrong int);
create /*!120000 or replace*/ table /*!!119999 if not exists */ t1 (correct int);
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`correct` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_uca1400_ai_ci
connection server_1;
drop table t1;
include/rpl_end.inc
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-10-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.