用于EagleEye3.0 规则集漏报和误报测试的示例项目,项目收集于github和gitee
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1016 B

5 months ago
--source include/have_debug.inc
--source include/force_myisam_default.inc
--source include/have_myisam.inc
CREATE TABLE th1(a TEXT,FULLTEXT INDEX(a)) ENGINE=MyISAM;
CREATE TABLE th2(a TEXT,FULLTEXT INDEX(a)) ENGINE=MyISAM;
DELIMITER $;
CREATE TRIGGER trg_bi BEFORE INSERT ON th1
FOR EACH ROW
BEGIN
INSERT IGNORE INTO th2 SELECT 1 FROM th1
WHERE MATCH(a) AGAINST ( 'test' IN BOOLEAN MODE);
END $
DELIMITER ;$
SET @@debug='+d,simulate_bug18831513';
--error 1064
INSERT INTO th1 VALUES(1);
SET @@debug='-d,simulate_bug18831513';
INSERT INTO th1 VALUES(1);
DROP TRIGGER trg_bi;
DROP TABLE th1;
DROP TABLE th2;
--echo #
--echo # Bug#24506766: SIG 11 IN TRIGGER::ADD_TABLES_AND_ROUTINES
--echo # AT SQL/TRIGGER.CC:697
--echo #
CREATE TABLE t1(a INT);
LOCK TABLES t1 WRITE;
SET @@debug= "+d,create_trigger_fail";
--error ER_LOCK_DEADLOCK
CREATE TRIGGER trig1 BEFORE INSERT ON t1 FOR EACH ROW BEGIN END;
INSERT INTO t1 VALUES(0);
SET @@debug= "-d,create_trigger_fail";
UNLOCK TABLES;
DROP TABLE t1;