File tree Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Expand file tree Collapse file tree 3 files changed +32
-4
lines changed Original file line number Diff line number Diff line change @@ -986,4 +986,15 @@ Warning 1196 Some non-transactional changed tables couldn't be rolled back
986
986
include/diff_tables.inc [master:t1, slave:t1]
987
987
include/diff_tables.inc [master:log, slave:log]
988
988
drop table t1, log;
989
+ drop trigger if exists notexistent;
990
+ Warnings:
991
+ Note 1360 Trigger does not exist
992
+ include/show_binlog_events.inc
993
+ Log_name Pos Event_type Server_id End_log_pos Info
994
+ master-bin.000001 # Gtid # # GTID #-#-#
995
+ master-bin.000001 # Query # # use `test`; drop trigger if exists notexistent
996
+ include/show_binlog_events.inc
997
+ Log_name Pos Event_type Server_id End_log_pos Info
998
+ slave-bin.000001 # Gtid # # GTID #-#-#
999
+ slave-bin.000001 # Query # # use `test`; drop trigger if exists notexistent
989
1000
include/rpl_end.inc
Original file line number Diff line number Diff line change @@ -532,6 +532,19 @@ connection master;
532
532
drop table t1, log;
533
533
sync_slave_with_master;
534
534
535
+ #
536
+ # MDEV-6769 DROP TRIGGER IF NOT EXIST binlogged on master but not on slave
537
+ #
538
+ let $slave_pos= query_get_value(SHOW MASTER STATUS, Position, 1);
539
+ connection master;
540
+ let $binlog_start= query_get_value(SHOW MASTER STATUS, Position, 1);
541
+ drop trigger if exists notexistent;
542
+ source include/show_binlog_events.inc;
543
+ sync_slave_with_master;
544
+ let $binlog_start= $slave_pos;
545
+ source include/show_binlog_events.inc;
546
+ connection master;
547
+
535
548
#
536
549
# End of tests
537
550
#
Original file line number Diff line number Diff line change @@ -2283,11 +2283,15 @@ mysql_execute_command(THD *thd)
2283
2283
according to slave filtering rules.
2284
2284
Returning success without producing any errors in this case.
2285
2285
*/
2286
- DBUG_RETURN (0 );
2286
+ if (!thd->lex ->check_exists )
2287
+ DBUG_RETURN (0 );
2288
+ /*
2289
+ DROP TRIGGER IF NOT EXISTS will return without an error later
2290
+ after possibly writing the query to a binlog
2291
+ */
2287
2292
}
2288
-
2289
- // force searching in slave.cc:tables_ok()
2290
- all_tables->updating = 1 ;
2293
+ else // force searching in slave.cc:tables_ok()
2294
+ all_tables->updating = 1 ;
2291
2295
}
2292
2296
2293
2297
/*
You can’t perform that action at this time.
0 commit comments