Commit 0d8ecc1f authored by Mayank Prasad's avatar Mayank Prasad

merge from 5.1 to 5.5 for bug#11751148

parents 81c3d1bb 140b9093
...@@ -747,6 +747,15 @@ event_name originator ...@@ -747,6 +747,15 @@ event_name originator
ev1 4294967295 ev1 4294967295
DROP EVENT ev1; DROP EVENT ev1;
SET GLOBAL server_id = @old_server_id; SET GLOBAL server_id = @old_server_id;
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;
SHOW EVENTS;
Db Name Definer Time zone Type Execute at Interval value Interval field Starts Ends Status Originator character_set_client collation_connection Database Collation
DROP DATABASE event_test1;
DROP DATABASE event_test2;
DROP DATABASE events_test; DROP DATABASE events_test;
SET GLOBAL event_scheduler= 'ON'; SET GLOBAL event_scheduler= 'ON';
SET @@global.concurrent_insert= @concurrent_insert; SET @@global.concurrent_insert= @concurrent_insert;
...@@ -1221,6 +1221,21 @@ SELECT event_name, originator FROM INFORMATION_SCHEMA.EVENTS; ...@@ -1221,6 +1221,21 @@ SELECT event_name, originator FROM INFORMATION_SCHEMA.EVENTS;
DROP EVENT ev1; DROP EVENT ev1;
SET GLOBAL server_id = @old_server_id; 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 # End of tests
......
...@@ -433,7 +433,7 @@ Event_db_repository::index_read_for_db_for_i_s(THD *thd, TABLE *schema_table, ...@@ -433,7 +433,7 @@ Event_db_repository::index_read_for_db_for_i_s(THD *thd, TABLE *schema_table,
key_copy(key_buf, event_table->record[0], key_info, key_len); key_copy(key_buf, event_table->record[0], key_info, key_len);
if (!(ret= event_table->file->index_read_map(event_table->record[0], key_buf, if (!(ret= event_table->file->index_read_map(event_table->record[0], key_buf,
(key_part_map)1, (key_part_map)1,
HA_READ_PREFIX))) HA_READ_KEY_EXACT)))
{ {
DBUG_PRINT("info",("Found rows. Let's retrieve them. ret=%d", ret)); DBUG_PRINT("info",("Found rows. Let's retrieve them. ret=%d", ret));
do do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment