mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-32810 events.events_1 fails in 11.1 and above
fix test cases like
... prepare the test, create a table or a user
create event ... on schedule every 1 second ... do something ...
... verify that something was done
... cleanup drop event, table or user
here the event scheduler can manage to start the worker for the
second execution of the event, then cleanup happens
and the worker realizes that it cannot change the security context
(as the user is dropped) or cannot insert (as the table is dropped).
followup for 279b0db8c6
(that removed suppression of /Event Schedule/)
This commit is contained in:
@@ -2,10 +2,6 @@ set sql_mode="";
|
||||
call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, found .*\. The table is probably corrupted");
|
||||
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
|
||||
call mtr.add_suppression("Event Scheduler: .* DROP command denied to user");
|
||||
drop database if exists events_test;
|
||||
drop database if exists db_x;
|
||||
drop database if exists mysqltest_db2;
|
||||
drop database if exists mysqltest_no_such_database;
|
||||
create database events_test;
|
||||
use events_test;
|
||||
CREATE USER pauline@localhost;
|
||||
|
@@ -11,12 +11,6 @@ call mtr.add_suppression("Column count of mysql.event is wrong. Expected .*, fou
|
||||
call mtr.add_suppression("Incorrect definition of table mysql.event:.*");
|
||||
call mtr.add_suppression("Event Scheduler: .* DROP command denied to user");
|
||||
|
||||
--disable_warnings
|
||||
drop database if exists events_test;
|
||||
drop database if exists db_x;
|
||||
drop database if exists mysqltest_db2;
|
||||
drop database if exists mysqltest_no_such_database;
|
||||
--enable_warnings
|
||||
create database events_test;
|
||||
use events_test;
|
||||
|
||||
@@ -44,6 +38,8 @@ DROP EVENT e_x1;
|
||||
DROP EVENT e_x2;
|
||||
disconnect priv_conn;
|
||||
connection default;
|
||||
let $wait_condition= SELECT count(*)=1 from information_schema.processlist;
|
||||
--source include/wait_condition.inc
|
||||
DROP DATABASE db_x;
|
||||
DROP USER pauline@localhost;
|
||||
USE events_test;
|
||||
@@ -103,6 +99,8 @@ delimiter ;|
|
||||
set global event_scheduler = on;
|
||||
let $wait_condition= SELECT count(*)>0 from mysql.event where name='e_43' and interval_value= 5;
|
||||
--source include/wait_condition.inc
|
||||
let $wait_condition= SELECT count(*)=2 from information_schema.processlist;
|
||||
--source include/wait_condition.inc
|
||||
select db, name, body, status, interval_field, interval_value from mysql.event;
|
||||
drop event e_43;
|
||||
drop table test_nested;
|
||||
|
@@ -1,6 +1,7 @@
|
||||
include/master-slave.inc
|
||||
[connection master]
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Event Scheduler: .* Duplicate entry '10' for key 'a'");
|
||||
# Create tables
|
||||
CREATE TABLE t1 (a INT NOT NULL PRIMARY KEY, b INT, c VARCHAR(64)) ENGINE=myisam;
|
||||
INSERT INTO t1 VALUES (1,1,'1');
|
||||
|
@@ -9,6 +9,7 @@
|
||||
--source include/master-slave.inc
|
||||
|
||||
call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT");
|
||||
call mtr.add_suppression("Event Scheduler: .* Duplicate entry '10' for key 'a'");
|
||||
|
||||
# --disable_warnings/--enable_warnings added before/after query
|
||||
# if one uses UUID() function because we need to avoid warnings
|
||||
|
Reference in New Issue
Block a user