diff options
author | Mayank Prasad <mayank.prasad@oracle.com> | 2011-03-21 21:32:47 +0530 |
---|---|---|
committer | Mayank Prasad <mayank.prasad@oracle.com> | 2011-03-21 21:32:47 +0530 |
commit | c8b724b2aa6dd0ccc5af1a2b7eb5b92271556ccb (patch) | |
tree | def56f36b799dc42fbfceec31536fe58df74d32b /mysql-test/t | |
parent | 91688f1d302a8e16c5ba8ac8c61a46d1b2753d23 (diff) | |
download | mariadb-git-c8b724b2aa6dd0ccc5af1a2b7eb5b92271556ccb.tar.gz |
Bug #11751148 : show events shows events in other schema
Issue:
------
Due to prefix match, database like 'k' was matching with 'ka' and events of 'ka' we getting displayed for 'show event' of 'k'.
Resolution:
-----------
Scan for listing of events in a schema is made to be done on exact match of database (schema) name instead of just prefix.
mysql-test/r/events_bugs.result:
modified expected file with the expected results.
mysql-test/t/events_bugs.test:
added a test case to reproduce the scenario.
sql/event_db_repository.cc:
Scan for schema name is made to be done on exact db name match.
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/events_bugs.test | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/events_bugs.test b/mysql-test/t/events_bugs.test index 81397b333f9..83e37cdccdb 100644 --- a/mysql-test/t/events_bugs.test +++ b/mysql-test/t/events_bugs.test @@ -1221,6 +1221,21 @@ SELECT event_name, originator FROM INFORMATION_SCHEMA.EVENTS; DROP EVENT ev1; SET GLOBAL server_id = @old_server_id; +# +# Bug#11751148: show events shows events in other schema +# + +CREATE DATABASE event_test1; +USE event_test1; +CREATE EVENT ev1 ON SCHEDULE EVERY 1 DAY DO SELECT 1; +CREATE DATABASE event_test2; +USE event_test2; +# Following show events should not show ev1 +SHOW EVENTS; +DROP DATABASE event_test1; +DROP DATABASE event_test2; + + ########################################################################### # # End of tests |