Below is the list of changes that have just been committed into a local
5.1 repository of andrey. When andrey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2394 06/05/04 19:35:30 andrey@lmy004. +3 -0
fix for bug #18896: Events: crash if create within create
sql/event_timed.cc
1.51 06/05/04 19:35:19 andrey@lmy004. +5 -0
change security context before compilation and return it back to what it was.
fix for bug #18896: Events: crash if create within create
mysql-test/t/events_bugs.test
1.7 06/05/04 19:35:18 andrey@lmy004. +14 -0
test case for bug #18896 Events: crash if create within create
mysql-test/r/events_bugs.result
1.9 06/05/04 19:35:18 andrey@lmy004. +8 -0
update result
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: andrey
# Host: lmy004.
# Root: /work/mysql-5.1-bug18896
--- 1.8/mysql-test/r/events_bugs.result 2006-03-28 12:23:20 +02:00
+++ 1.9/mysql-test/r/events_bugs.result 2006-05-04 19:35:18 +02:00
@@ -178,4 +178,12 @@ drop procedure ee_16407_6_pendant;
set global event_scheduler= 0;
drop table events_smode_test;
set sql_mode=@old_sql_mode;
+set global event_scheduler=1;
+create event e18896_1 on schedule every 1 second do create event e18896_2 on schedule every 1 second do set @a=5;
+select event_schema, event_name, definer from information_schema.events order by event_schema, event_name;
+event_schema event_name definer
+events_test e18896_1 root@localhost
+events_test e18896_2 root@localhost
+drop event e18896_1;
+drop event e18896_2;
drop database events_test;
--- 1.6/mysql-test/t/events_bugs.test 2006-03-28 10:42:40 +02:00
+++ 1.7/mysql-test/t/events_bugs.test 2006-05-04 19:35:18 +02:00
@@ -172,4 +172,18 @@ set sql_mode=@old_sql_mode;
#
# End - 16407: Events: Changes in sql_mode won't be taken into account
#
+
+#
+# Start - 18896: Events: crash if create within create
+#
+set global event_scheduler=1;
+--sleep 1
+create event e18896_1 on schedule every 1 second do create event e18896_2 on schedule every 1 second do set @a=5;
+--sleep 2
+select event_schema, event_name, definer from information_schema.events order by event_schema, event_name;
+drop event e18896_1;
+drop event e18896_2;
+#
+# End - 18896: Events: crash if create within create
+#
drop database events_test;
--- 1.50/sql/event_timed.cc 2006-05-03 15:55:30 +02:00
+++ 1.51/sql/event_timed.cc 2006-05-04 19:35:19 +02:00
@@ -1449,6 +1449,9 @@ Event_timed::compile(THD *thd, MEM_ROOT
CHARSET_INFO *old_character_set_client,
*old_collation_connection,
*old_character_set_results;
+ Security_context *save_ctx;
+ /* this one is local and not needed after exec */
+ Security_context security_ctx;
DBUG_ENTER("Event_timed::compile");
@@ -1494,6 +1497,7 @@ Event_timed::compile(THD *thd, MEM_ROOT
thd->query_length= show_create.length();
DBUG_PRINT("Event_timed::compile", ("query:%s",thd->query));
+ change_security_context(thd, &security_ctx, &save_ctx);
thd->lex= &lex;
lex_start(thd, (uchar*)thd->query, thd->query_length);
lex.et_compile_phase= TRUE;
@@ -1531,6 +1535,7 @@ done:
lex.et->deinit_mutexes();
lex_end(&lex);
+ restore_security_context(thd, save_ctx);
DBUG_PRINT("note", ("return old data on its place. set back NAMES"));
thd->lex= old_lex;
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2394) BUG#18896 | ahristov | 4 May |