Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/MariaDB/mysql-test/suite/rpl/r/   (MariaDB Server Version 8.1-8.4©)  Datei vom 1.9.2026 mit Größe 7 kB image not shown  

Quelle  rpl_reversed_comments.result   Sprache: Lisp

 

include/rpl_init.inc [topology=1->2, 2->3]
connection server_1;
CREATE TABLE t1(c1 INT);
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; CREATE TABLE t1(c1 INT)

# Case 1:
# ------------------------------------------------------------------
# Mix of applied and not-applied reversed CCs in a single statement.
# /*!!999999 ... */ executes (server version < 999999).
# /*!!100000 ... */ does not execute (server version >= 100000).
# The not-applied ones must become plain comments in the binlog.
/*!!100000 --- */INSERT /*!!999999 INTO*/ /*!10000 t1 */ VALUES(10) /*!!100000 ,(11)*/;
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`; /*  100000 --- */INSERT /*!!       INTO*/ /*!10000 t1 */ VALUES(10) /*  100000 ,(11)*/
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]

# Case 2:
# -----------------------------------------------------------------
# Prepared statements with reversed executable comments.
connection server_1;
PREPARE stmt FROM 'INSERT INTO /*!!100000 blabla*/ t1 VALUES(60) /*!!100000 ,(61)*/';
EXECUTE stmt;
DROP TABLE t1;
CREATE TABLE t1(c1 INT);
EXECUTE stmt;
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;

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]

# Case 3:
# -----------------------------------------------------------------
# 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;
ERROR 42000: 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 '/*!!100000 t1 WHEREN' at line 1

# Case 4:
# -----------------------------------------------------------------
# Nested comments inside reversed executable comments.
insert t1 values (/*!!999999 1 /* foo */
 */ + 2);
insert t1 values (/*!!100000 10 /* foo */ */ + 20);
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 t1 values (/*!!       1 /* foo */ */ + 2)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; insert t1 values (/*  100000 10 (* foo *) */ + 20)
master-bin.000001 # Query # # COMMIT
include/save_master_gtid.inc
connection server_3;
include/sync_with_master_gtid.inc
select * from t1;
c1
62
3
20
connection server_1;

# Case 5:
# -----------------------------------------------------------------
# Delimiter change with reversed executable comment. A parse error
# must not cause master/slave divergence.
insert t1 values /*!! (100);insert t1 values */ (200) //
ERROR 42000: 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;

# Case 6:
# -----------------------------------------------------------------
# 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
# Case 7:
# -----------------------------------------------------------------
#  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 or replace 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 or replace 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 or replace 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
C=49 H=100 G=78

¤ Dauer der Verarbeitung: 0.13 Sekunden  (vorverarbeitet am  2026-10-10) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.