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@stripped, 2006-08-15 00:50:26+02:00, andrey@stripped +5 -0
post-merge and testing fixes
mysql-test/r/events_bugs.result@stripped, 2006-08-15 00:50:00+02:00, andrey@stripped +8 -8
update results after merge
mysql-test/t/events.test@stripped, 2006-08-15 00:50:00+02:00, andrey@stripped +2 -2
num to name
mysql-test/t/events_bugs.test@stripped, 2006-08-15 00:50:01+02:00, andrey@stripped +1 -1
num to name
sql/share/errmsg.txt@stripped, 2006-08-15 00:50:05+02:00, andrey@stripped +2 -0
add the message back
sql/sql_yacc.yy@stripped, 2006-08-15 00:50:04+02:00, andrey@stripped +13 -2
post-merge fixes regarding init_sp_name
put back code which I unintentionally removed during merg
# 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: example.com
# Root: /work/mysql-5.1-runtime-wl3337
--- 1.491/sql/sql_yacc.yy 2006-08-15 00:51:44 +02:00
+++ 1.492/sql/sql_yacc.yy 2006-08-15 00:51:44 +02:00
@@ -1429,6 +1429,7 @@ ev_sql_stmt:
lex->sphead->reset_thd_mem_root(YYTHD);
lex->sphead->init(lex);
+ lex->sphead->init_sp_name(YYTHD, Lex->event_parse_data->identifier);
lex->sphead->m_type= TYPE_ENUM_PROCEDURE;
@@ -1445,8 +1446,7 @@ ev_sql_stmt:
LEX *lex=Lex;
// return back to the original memory root ASAP
- lex->sphead->init_strings(YYTHD, lex,
- Lex->event_parse_data->identifier);
+ lex->sphead->init_strings(YYTHD, lex);
lex->sphead->restore_thd_mem_root(YYTHD);
lex->sp_chistics.suid= SP_IS_SUID;//always the definer!
@@ -1523,6 +1523,17 @@ create_function_tail:
RETURNS_SYM udf_type SONAME_SYM TEXT_STRING_sys
{
LEX *lex=Lex;
+ if (lex->definer != NULL)
+ {
+ /*
+ DEFINER is a concept meaningful when interpreting SQL code.
+ UDF functions are compiled.
+ Using DEFINER with UDF has therefore no semantic,
+ and is considered a parsing error.
+ */
+ my_error(ER_WRONG_USAGE, MYF(0), "SONAME", "DEFINER");
+ YYABORT;
+ }
lex->sql_command = SQLCOM_CREATE_FUNCTION;
lex->udf.name = lex->spname->m_name;
lex->udf.returns=(Item_result) $2;
--- 1.17/mysql-test/r/events_bugs.result 2006-08-15 00:51:45 +02:00
+++ 1.18/mysql-test/r/events_bugs.result 2006-08-15 00:51:45 +02:00
@@ -5,10 +5,10 @@ CREATE EVENT Lower_case ON SCHEDULE EVER
ERROR HY000: Event 'Lower_case' already exists
DROP EVENT Lower_case;
SET NAMES cp1251;
-CREATE EVENT äîëåí_ðåãèñòúð_1251 ON SCHEDULE EVERY 1 YEAR DO SELECT 100;
-CREATE EVENT ÄîËåÍ_ðåãèñòúð_1251 ON SCHEDULE EVERY 2 YEAR DO SELECT 200;
ERROR HY000: Event 'ДоЛеН_регистър_1251' already exists
-DROP EVENT ÄîËåÍ_ðåãèñòúð_1251;
SET NAMES utf8;
CREATE EVENT долен_регистър_утф8 ON SCHEDULE EVERY 3 YEAR DO SELECT 300;
CREATE EVENT ДОЛЕН_регистър_утф8 ON SCHEDULE EVERY 4 YEAR DO SELECT 400;
@@ -109,9 +109,9 @@ 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;
user host db info
event_scheduler localhost NULL NULL
-root localhost events_test select get_lock('ee_16407_2', 60) /*ee_16407_2*/
-root localhost events_test select get_lock('ee_16407_2', 60) /*ee_16407_3*/
-root localhost events_test select get_lock('ee_16407_2', 60) /*ee_16407_4*/
+root localhost events_test select get_lock('ee_16407_2', 60)
+root localhost events_test select get_lock('ee_16407_2', 60)
+root localhost events_test select get_lock('ee_16407_2', 60)
select release_lock('ee_16407_2');
release_lock('ee_16407_2')
1
@@ -159,8 +159,8 @@ end|
select /*4*/ user, host, db, info from information_schema.processlist where 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) /*ee_16407_5*/
-root localhost events_test select get_lock('ee_16407_5', 60) /*ee_16407_6*/
+root localhost events_test select get_lock('ee_16407_5', 60)
+root localhost events_test select get_lock('ee_16407_5', 60)
select release_lock('ee_16407_5');
release_lock('ee_16407_5')
1
--- 1.37/mysql-test/t/events.test 2006-08-15 00:51:45 +02:00
+++ 1.38/mysql-test/t/events.test 2006-08-15 00:51:45 +02:00
@@ -83,7 +83,7 @@ DROP EVENT event_starts_test;
#
create table test_nested(a int);
create event e_43 on schedule every 1 second do set @a = 5;
---error 1562
+--error ER_EVENT_RECURSIVITY_FORBIDDEN
alter event e_43 do alter event e_43 do set @a = 4;
delimiter |;
alter event e_43 do
@@ -339,7 +339,7 @@ drop event закачка21;
# Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement
#
create table t_16 (s1 int);
---error 1562
+--error ER_EVENT_RECURSIVITY_FORBIDDEN
create trigger t_16_bi before insert on t_16 for each row create event e_16 on schedule every 1 second do set @a=5;
drop table t_16;
#
--- 1.13/mysql-test/t/events_bugs.test 2006-08-15 00:51:45 +02:00
+++ 1.14/mysql-test/t/events_bugs.test 2006-08-15 00:51:45 +02:00
@@ -30,7 +30,7 @@ SET NAMES latin1;
# START - BUG#16408: Events: crash for an event in a procedure
#
set @a=3;
---error 1562
+--error ER_EVENT_RECURSIVITY_FORBIDDEN
CREATE PROCEDURE p_16 () CREATE EVENT e_16 ON SCHEDULE EVERY @a SECOND DO SET @a=5;
#
# END - BUG#16408: Events: crash for an event in a procedure
--- 1.117/sql/share/errmsg.txt 2006-08-15 00:51:45 +02:00
+++ 1.118/sql/share/errmsg.txt 2006-08-15 00:51:45 +02:00
@@ -5849,3 +5849,5 @@ 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"
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2277) | ahristov | 15 Aug |