diff options
-rw-r--r-- | mysql-test/r/events.result | 8 | ||||
-rw-r--r-- | mysql-test/r/events_bugs.result | 11 | ||||
-rw-r--r-- | mysql-test/t/events.test | 8 | ||||
-rw-r--r-- | mysql-test/t/events_bugs.test | 10 | ||||
-rw-r--r-- | sql/mysqld.cc | 3 | ||||
-rw-r--r-- | sql/share/errmsg.txt | 4 |
6 files changed, 22 insertions, 22 deletions
diff --git a/mysql-test/r/events.result b/mysql-test/r/events.result index 37561e3b25a..146f46edc2b 100644 --- a/mysql-test/r/events.result +++ b/mysql-test/r/events.result @@ -334,7 +334,7 @@ select definer, name, db from mysql.event; definer name db root@localhost закачка events_test "Should be only 1 process" -select /*1*/ user, host, db, command, state, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; +select /*1*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db command state info select release_lock("test_lock1"); release_lock("test_lock1") @@ -353,7 +353,7 @@ get_lock("test_lock2", 20) create event закачка on schedule every 10 hour do select get_lock("test_lock2", 20); "Let some time pass to the event starts" "Should have only 2 processes: the scheduler and the locked event" -select /*2*/ user, host, db, command, state, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; +select /*2*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db command state info event_scheduler localhost NULL Daemon Waiting for next activation NULL root localhost events_test Connect User lock select get_lock("test_lock2", 20) @@ -369,13 +369,13 @@ get_lock("test_lock2_1", 20) 1 create event закачка21 on schedule every 10 hour do select get_lock("test_lock2_1", 20); "Should have only 3 processes: the scheduler, our conn and the locked event" -select /*3*/ user, host, db, command, state, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; +select /*3*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db command state info event_scheduler localhost NULL Daemon Waiting for next activation NULL root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) set global event_scheduler=off; "Should have only our process now:" -select /*4*/ user, host, db, command, state, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; +select /*4*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db command state info root localhost events_test Connect User lock select get_lock("test_lock2_1", 20) drop event закачка21; diff --git a/mysql-test/r/events_bugs.result b/mysql-test/r/events_bugs.result index 4ac1cfc413b..458fd151130 100644 --- a/mysql-test/r/events_bugs.result +++ b/mysql-test/r/events_bugs.result @@ -50,9 +50,8 @@ select get_lock('test_bug16407', 60); drop table "hashed_num"; end| "Now if everything is fine the event has compiled and is locked -select /*1*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*1*/ user, host, db, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; user host db info -event_scheduler localhost NULL NULL root localhost events_test select get_lock('test_bug16407', 60) select release_lock('test_bug16407'); release_lock('test_bug16407') @@ -106,7 +105,7 @@ event_schema event_name sql_mode events_test ee_16407_2 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER events_test ee_16407_3 STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER events_test ee_16407_4 -select /*2*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*2*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db info event_scheduler localhost NULL NULL root localhost events_test select get_lock('ee_16407_2', 60) @@ -115,7 +114,7 @@ root localhost events_test select get_lock('ee_16407_2', 60) select release_lock('ee_16407_2'); release_lock('ee_16407_2') 1 -select /*3*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*3*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db info event_scheduler localhost NULL NULL set global event_scheduler= off; @@ -156,7 +155,7 @@ select release_lock('ee_16407_5'); call events_test.ee_16407_6_pendant(); end| "Should have 2 locked processes" -select /*4*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*4*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db info event_scheduler localhost NULL NULL root localhost events_test select get_lock('ee_16407_5', 60) @@ -165,7 +164,7 @@ select release_lock('ee_16407_5'); release_lock('ee_16407_5') 1 "Should have 0 processes locked" -select /*5*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*5*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; user host db info event_scheduler localhost NULL NULL select * from events_smode_test order by ev_name, a; diff --git a/mysql-test/t/events.test b/mysql-test/t/events.test index 384ec818ac1..add5dbcaa24 100644 --- a/mysql-test/t/events.test +++ b/mysql-test/t/events.test @@ -295,7 +295,7 @@ create event закачка on schedule every 10 hour do select get_lock("test_l select definer, name, db from mysql.event; --echo "Should be only 1 process" -select /*1*/ user, host, db, command, state, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; +select /*1*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; select release_lock("test_lock1"); drop event закачка; --echo "Should have 0 events" @@ -312,7 +312,7 @@ create event закачка on schedule every 10 hour do select get_lock("test_l --echo "Let some time pass to the event starts" --sleep 1 --echo "Should have only 2 processes: the scheduler and the locked event" -select /*2*/ user, host, db, command, state, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info;--echo "Release the mutex, the event worker should finish." +select /*2*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info;--echo "Release the mutex, the event worker should finish." --echo "Release the mutex, the event worker should finish." select release_lock("test_lock2"); drop event закачка; @@ -330,11 +330,11 @@ select get_lock("test_lock2_1", 20); create event закачка21 on schedule every 10 hour do select get_lock("test_lock2_1", 20); --sleep 1 --echo "Should have only 3 processes: the scheduler, our conn and the locked event" -select /*3*/ user, host, db, command, state, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; +select /*3*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; set global event_scheduler=off; --sleep 0.8 --echo "Should have only our process now:" -select /*4*/ user, host, db, command, state, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; +select /*4*/ user, host, db, command, state, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; drop event закачка21; #### diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test index 04c6d8e91f5..c9a8842f8f0 100644 --- a/mysql-test/t/events_bugs.test +++ b/mysql-test/t/events_bugs.test @@ -80,7 +80,7 @@ end| delimiter ;| --sleep 0.8 --echo "Now if everything is fine the event has compiled and is locked -select /*1*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*1*/ user, host, db, info from information_schema.processlist where command!='Daemon' and (info is null or info not like '%processlist%') order by info; select release_lock('test_bug16407'); set global event_scheduler= off; @@ -128,10 +128,10 @@ end| delimiter ;| select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; --sleep 1 -select /*2*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*2*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; select release_lock('ee_16407_2'); --sleep 1.2 -select /*3*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*3*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; set global event_scheduler= off; select * from events_smode_test order by ev_name, a; --echo "OK, last check before we drop them" @@ -167,11 +167,11 @@ end| delimiter ;| --sleep 1 --echo "Should have 2 locked processes" -select /*4*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*4*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; select release_lock('ee_16407_5'); --sleep 1.3 --echo "Should have 0 processes locked" -select /*5*/ user, host, db, info from information_schema.processlist where info is null or info not like '%processlist%' order by info; +select /*5*/ user, host, db, info from information_schema.processlist where (command!='Daemon' || user='event_scheduler') and (info is null or info not like '%processlist%') order by info; select * from events_smode_test order by ev_name, a; --echo "And here we check one more time before we drop the events" select event_schema, event_name, sql_mode from information_schema.events order by event_schema, event_name; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 457cadea8a0..2ea2036d328 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -7331,9 +7331,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), case 3: /* 0 */ Events::opt_event_scheduler= Events::EVENTS_OFF; break; - default: - DBUG_ASSERT(0); - unireg_abort(1); } } break; diff --git a/sql/share/errmsg.txt b/sql/share/errmsg.txt index 2228ded870b..ffffb8b2280 100644 --- a/sql/share/errmsg.txt +++ b/sql/share/errmsg.txt @@ -5952,6 +5952,10 @@ ER_BAD_LOG_ENGINE eng "One can use only CSV and MyISAM engines for the log tables" ER_CANT_DROP_LOG_TABLE eng "Cannot drop log table if log is enabled" +ER_EVENT_RECURSIVITY_FORBIDDEN + eng "Recursivity of EVENT DDL statements is forbidden when body is present" +ER_EVENTS_DB_ERROR + eng "Cannot proceed because the tables used by events were found damaged at server start" ER_ONLY_INTEGERS_ALLOWED eng "Only normal integers allowed as number here" ER_USERNAME |