mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
MDEV-25595 DROP part of failed CREATE OR REPLACE is not written into binary log
Do log_drop_table() in case of failed mysql_prepare_create_table().
This commit is contained in:
@@ -1073,3 +1073,26 @@ Variable_name Value
|
||||
unique_checks OFF
|
||||
DROP TABLE t1;
|
||||
disconnect fresh;
|
||||
connection default;
|
||||
#
|
||||
# MDEV-25595 DROP part of failed CREATE OR REPLACE is not written into binary log
|
||||
#
|
||||
reset master;
|
||||
create table t as select 1 as b, 2 as b;
|
||||
ERROR 42S21: Duplicate column name 'b'
|
||||
create table t (old_table_field int);
|
||||
create or replace table t as select 1 as b, 2 as b;
|
||||
ERROR 42S21: Duplicate column name 'b'
|
||||
create or replace temporary table t as select 1 as b, 2 as b;
|
||||
ERROR 42S21: Duplicate column name 'b'
|
||||
create table t (new_table_field 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 t (old_table_field int)
|
||||
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; DROP TABLE IF EXISTS `test`.`t`/* Generated to handle failed CREATE OR REPLACE */
|
||||
master-bin.000001 # Query # # ROLLBACK
|
||||
master-bin.000001 # Gtid # # GTID #-#-#
|
||||
master-bin.000001 # Query # # use `test`; create table t (new_table_field int)
|
||||
drop table t;
|
||||
|
Reference in New Issue
Block a user