1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-07 00:04:31 +03:00

MDEV-29732 mysqlbinlog produces syntactically incorrect output with system_versioning_insert_history

This commit is contained in:
Sergei Golubchik
2022-10-10 20:27:26 +02:00
parent 4d1e3671d3
commit e536cb8845
28 changed files with 143 additions and 94 deletions

View File

@@ -1,7 +1,9 @@
#
# MDEV-29741 SHOW BINLOG EVENTS shows garbage with system_versioning_insert_history=on
# MDEV-29732 mysqlbinlog produces syntactically incorrect output with system_versioning_insert_history
#
reset master;
set timestamp=1000000000;
create table t (a int) with system versioning;
set system_versioning_insert_history= on;
insert into t (a) values (1);
@@ -16,3 +18,40 @@ master-bin.000001 # Query # # use `test`; set @@system_versioning_insert_history
master-bin.000001 # Query # # set @@system_versioning_insert_history=1; COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; DROP TABLE `t` /* generated by server */
flush binary logs;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
ROLLBACK/*!*/;
use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1, @@session.sql_if_exists=0, @@session.explicit_defaults_for_timestamp=1, @@session.system_versioning_insert_history=0/*!*/;
SET @@session.sql_mode=1411383296/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
create table t (a int) with system versioning
/*!*/;
START TRANSACTION
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.system_versioning_insert_history=1/*!*/;
insert into t (a) values (1)
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
COMMIT
/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.system_versioning_insert_history=0/*!*/;
DROP TABLE `t` /* generated by server */
/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
set timestamp=default;