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.2198 06/03/17 09:40:48 andrey@lmy004. +3 -0
manual merge
mysql-test/t/events_bugs.test
1.3 06/03/17 09:40:41 andrey@lmy004. +0 -0
manual merge
mysql-test/r/events_bugs.result
1.4 06/03/17 09:40:41 andrey@lmy004. +2 -0
manual merge
sql/event_timed.cc
1.47 06/03/17 09:36:32 andrey@lmy004. +0 -0
Auto merged
# 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-bug16406/RESYNC
--- 1.3/mysql-test/r/events_bugs.result 2006-03-03 01:39:00 +01:00
+++ 1.4/mysql-test/r/events_bugs.result 2006-03-17 09:40:41 +01:00
@@ -1,5 +1,21 @@
create database if not exists events_test;
use events_test;
+
+set @a=3;
+CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5;
+call p_16();
+"Here we used to crash!"
+call p_16();
+ERROR HY000: Event 'e_16' already exists
+call p_16();
+ERROR HY000: Event 'e_16' already exists
+DROP EVENT e_16;
+CALL p_16();
+CALL p_16();
+ERROR HY000: Event 'e_16' already exists
+DROP PROCEDURE p_16;
+DROP EVENT e_16;
+
create event e_55 on schedule at 99990101000000 do drop table t;
ERROR HY000: Incorrect AT value: '99990101000000'
create event e_55 on schedule every 10 hour starts 99990101000000 do drop table t;
--- 1.2/mysql-test/t/events_bugs.test 2006-03-03 01:39:00 +01:00
+++ 1.3/mysql-test/t/events_bugs.test 2006-03-17 09:40:41 +01:00
@@ -1,6 +1,27 @@
create database if not exists events_test;
use events_test;
#
+# START - BUG#16408: Events: crash for an event in a procedure
+#
+set @a=3;
+CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5;
+call p_16();
+--echo "Here we used to crash!"
+--error 1516
+call p_16();
+--error 1516
+call p_16();
+DROP EVENT e_16;
+CALL p_16();
+--error 1516
+CALL p_16();
+DROP PROCEDURE p_16;
+DROP EVENT e_16;
+#
+# END - BUG#16408: Events: crash for an event in a procedure
+#
+
+#
# Start - 16396: Events: Distant-future dates become past dates
#
--error 1503
--- 1.46/sql/event_timed.cc 2006-03-03 01:39:00 +01:00
+++ 1.47/sql/event_timed.cc 2006-03-17 09:36:32 +01:00
@@ -14,13 +14,14 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#define MYSQL_LEX 1
#include "event_priv.h"
#include "event.h"
#include "sp.h"
-extern int yyparse(void *thd);
+extern int MYSQLparse(void *thd);
/*
Init all member variables
@@ -1088,8 +1089,6 @@ Event_timed::get_create_event(THD *thd,
DBUG_RETURN(EVEX_MICROSECOND_UNSUP);
buf->append(STRING_WITH_LEN("CREATE EVENT "));
- append_identifier(thd, buf, dbname.str, dbname.length);
- buf->append(STRING_WITH_LEN("."));
append_identifier(thd, buf, name.str, name.length);
buf->append(STRING_WITH_LEN(" ON SCHEDULE "));
@@ -1254,12 +1253,12 @@ Event_timed::change_security_context(THD
definer_host.str, dbname.str))
{
my_error(ER_NO_SUCH_USER, MYF(0), definer_user.str, definer_host.str);
- DBUG_RETURN(TRUE);
+ DBUG_RETURN(true);
}
*backup= thd->security_ctx;
thd->security_ctx= s_ctx;
#endif
- DBUG_RETURN(FALSE);
+ DBUG_RETURN(false);
}
@@ -1363,7 +1362,7 @@ Event_timed::compile(THD *thd, MEM_ROOT
thd->lex= &lex;
lex_start(thd, (uchar*)thd->query, thd->query_length);
lex.et_compile_phase= TRUE;
- if (yyparse((void *)thd) || thd->is_fatal_error)
+ if (MYSQLparse((void *)thd) || thd->is_fatal_error)
{
DBUG_PRINT("error", ("error during compile or thd->is_fatal_error=%d",
thd->is_fatal_error));
@@ -1394,7 +1393,8 @@ Event_timed::compile(THD *thd, MEM_ROOT
ret= 0;
done:
lex.et->free_sphead_on_delete= false;
- delete lex.et;
+ lex.et->deinit_mutexes();
+
lex_end(&lex);
DBUG_PRINT("note", ("return old data on its place. set back NAMES"));
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2198) | ahristov | 17 Mar |