Spracherkennung für: .test vermutete Sprache: SQL {SQL[188] VDM[94] VHDL[94]} [Methode: maximale Elemente, drei Dimensionen]
--source include/not_embedded.inc
--source include/have_binlog_format_statement.inc
--disable_query_log
reset master; # get rid of previous tests binlog
--enable_query_log
--echo #
--echo # WL#3253: multiple triggers per table
--echo #
--echo # Testing that the FOLLOWS and PRECEDES clauses get logged
CREATE TABLE t1 (a INT, b INT);
CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 (a) VALUES (NEW.a + 100);
CREATE TRIGGER tr4_bi BEFORE INSERT ON t1 FOR EACH ROW INSERT INTO t2 (a) VALUES (NEW.a + 300);
CREATE TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW FOLLOWS tr1_bi INSERT INTO t2 (a) VALUES (NEW.a + 200);
CREATE TRIGGER tr3_bi BEFORE INSERT ON t1 FOR EACH ROW precedes tr4_bi INSERT INTO t2 (a) VALUES (NEW.a + 400);
DROP TABLE t1;
--let $binlog_file = LAST
source include/show_binlog_events.inc;
--echo #
--echo # MDEV-25517 Atomic DDL: Assertion `query_arg' in THD::binlog_query
--echo # upon DROP TRIGGER
--echo #
# This test case is 'random' by design. For most cases the second DROP TRIGGER
# will generate a warning "Dropped orphan trigger...", but if there is a timing
# issue, we may get another error or warning later. This is ok as it enables
# us to have more code paths tested over time.
CREATE TABLE t1 (a INT);
CREATE TRIGGER trg AFTER INSERT ON t1 FOR EACH ROW SET @x = 1;
--disable_warnings
--connect (con1,localhost,root,,test)
--send
DROP TRIGGER trg;
--connection default
--error 0,ER_TRG_DOES_NOT_EXIST
DROP TRIGGER trg;
# Cleanup
--connection con1
--error 0,ER_TRG_DOES_NOT_EXIST
--reap
--disconnect con1
--connection default
--enable_warnings
DROP TABLE t1;
[Dauer der Verarbeitung: 0.10 Sekunden, vorverarbeitet 2026-10-08]