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.2030 06/01/11 12:49:56 andrey@lmy004. +7 -0
WL #1034 (Internal CRON) pre-push fixes
after another merge fixes.
sql/sql_yacc.yy
1.435 06/01/11 12:49:43 andrey@lmy004. +99 -3
fix sql_yacc.yy for WL#1034 (Internal CRON) after the manual
merge. The merge wasn't good :(
sql/share/errmsg.txt
1.70 06/01/11 12:49:43 andrey@lmy004. +32 -0
readd error messages removed during manual update
sql/event_timed.cc
1.16 06/01/11 12:49:43 andrey@lmy004. +2 -2
after fixes for WL1012 fix these to be able to compile
sql/event.cc
1.20 06/01/11 12:49:43 andrey@lmy004. +5 -5
after fixes for WL1012 fix these to be able to compile
mysql-test/r/sp.result
1.178 06/01/11 12:49:43 andrey@lmy004. +2 -0
WL #1034 (Internal CRON)
fix result
mysql-test/r/mysqlcheck.result
1.3 06/01/11 12:49:42 andrey@lmy004. +2 -0
WL #1034 (Internal CRON)
fix result
mysql-test/r/information_schema.result
1.100 06/01/11 12:49:42 andrey@lmy004. +2 -2
WL #1034 (Internal CRON)
fix 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-tt-copy-works
--- 1.434/sql/sql_yacc.yy 2006-01-11 12:01:29 +01:00
+++ 1.435/sql/sql_yacc.yy 2006-01-11 12:49:43 +01:00
@@ -1404,6 +1404,93 @@
lex->alter_tablespace_info->ts_cmd_type= CREATE_TABLESPACE;
}
;
+
+
+ev_schedule_time: EVERY_SYM expr interval
+ {
+ LEX *lex=Lex;
+ if (!lex->et_compile_phase)
+ {
+ switch (lex->et->init_interval(YYTHD , $2, $3)) {
+ case EVEX_PARSE_ERROR:
+ yyerror(ER(ER_SYNTAX_ERROR));
+ YYABORT;
+ break;
+ case EVEX_BAD_PARAMS:
+ my_error(ER_EVENT_INTERVAL_NOT_POSITIVE, MYF(0));
+ YYABORT;
+ break;
+ }
+ }
+ }
+ ev_starts
+ ev_ends
+ | AT_SYM expr
+ {
+ LEX *lex=Lex;
+ if (!lex->et_compile_phase)
+ {
+ switch (lex->et->init_execute_at(YYTHD, $2)) {
+ case EVEX_PARSE_ERROR:
+ yyerror(ER(ER_SYNTAX_ERROR));
+ YYABORT;
+ break;
+ case EVEX_BAD_PARAMS:
+ my_error(ER_EVENT_EXEC_TIME_IN_THE_PAST, MYF(0));
+ YYABORT;
+ break;
+ }
+ }
+ }
+ ;
+
+ev_status: /* empty */ {$<ulong_num>$= 0;}
+ | ENABLED_SYM
+ {
+ LEX *lex=Lex;
+ if (!lex->et_compile_phase)
+ lex->et->status= MYSQL_EVENT_ENABLED;
+ $<ulong_num>$= 1;
+ }
+ | DISABLED_SYM
+ {
+ LEX *lex=Lex;
+
+ if (!lex->et_compile_phase)
+ lex->et->status= MYSQL_EVENT_DISABLED;
+ $<ulong_num>$= 1;
+ }
+ ;
+
+ev_starts: /* empty */
+ | STARTS_SYM expr
+ {
+ LEX *lex= Lex;
+ if (!lex->et_compile_phase)
+ lex->et->init_starts(YYTHD, $2);
+ }
+ ;
+
+ev_ends: /* empty */
+ | ENDS_SYM expr
+ {
+ LEX *lex= Lex;
+ if (!lex->et_compile_phase)
+ {
+ switch (lex->et->init_ends(YYTHD, $2)) {
+ case EVEX_PARSE_ERROR:
+ yyerror(ER(ER_SYNTAX_ERROR));
+ YYABORT;
+ break;
+ case EVEX_BAD_PARAMS:
+ my_error(ER_EVENT_ENDS_BEFORE_STARTS, MYF(0));
+ YYABORT;
+ break;
+ }
+ }
+ }
+ ;
+
ev_on_completion: /* empty */ {$<ulong_num>$= 0;}
| ON COMPLETION_SYM PRESERVE_SYM
{
@@ -1420,6 +1507,7 @@
$<ulong_num>$= 1;
}
;
+
ev_comment: /* empty */ {$<ulong_num>$= 0;}
| COMMENT_SYM TEXT_STRING_sys
{
@@ -1502,6 +1590,7 @@
| sp_proc_stmt_close
;
+
clear_privileges:
/* Nothing */
{
@@ -4603,7 +4692,6 @@
Recursive events are not possible because recursive SPs
are not also possible. lex->sp_head is not stacked.
*/
- // ToDo Andrey : Change the error message
my_error(ER_SP_NO_RECURSIVE_CREATE, MYF(0), "EVENT");
YYABORT;
}
@@ -4672,6 +4760,7 @@
}
;
+
ev_on_schedule: /* empty */ { $<ulong_num>$= 0;}
| ON SCHEDULE_SYM ev_schedule_time
{
@@ -4688,6 +4777,13 @@
$<ulong_num>$= 1;
}
;
+
+ev_opt_sql_stmt: /* empty*/ { $<ulong_num>$= 0;}
+ | DO_SYM ev_sql_stmt
+ {
+ $<ulong_num>$= 1;
+ }
+ ;
ident_or_empty:
@@ -8106,8 +8202,8 @@
{
Lex->sql_command = SQLCOM_SHOW_CREATE_EVENT;
Lex->spname= $3;
- };
- ;
+ }
+ ;
show_engine_param:
STATUS_SYM
--- 1.19/sql/event.cc 2006-01-10 11:31:35 +01:00
+++ 1.20/sql/event.cc 2006-01-11 12:49:43 +01:00
@@ -413,7 +413,7 @@
if ((ret= evex_fill_row(thd, table, et, false)))
goto err;
- if (table->file->write_row(table->record[0]))
+ if (table->file->ha_write_row(table->record[0]))
{
my_error(ER_EVENT_STORE_FAILED, MYF(0), et->name.str, ret);
goto err;
@@ -423,8 +423,8 @@
{
thd->clear_error();
/* Such a statement can always go directly to binlog, no trans cache */
- Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
- mysql_bin_log.write(&qinfo);
+ thd->binlog_query(THD::MYSQL_QUERY_TYPE,
+ thd->query, thd->query_length, FALSE, FALSE);
}
*rows_affected= 1;
@@ -522,7 +522,7 @@
store(new_name->m_name.str, new_name->m_name.length, system_charset_info);
}
- if ((ret= table->file->update_row(table->record[1], table->record[0])))
+ if ((ret= table->file->ha_update_row(table->record[1], table->record[0])))
{
my_error(ER_EVENT_STORE_FAILED, MYF(0), et->name.str, ret);
goto err;
@@ -853,7 +853,7 @@
if (!(ret= evex_db_find_event_aux(thd, et->dbname, et->name, table)))
{
- if ((ret= table->file->delete_row(table->record[0])))
+ if ((ret= table->file->ha_delete_row(table->record[0])))
{
my_error(ER_EVENT_CANNOT_DELETE, MYF(0));
goto done;
--- 1.15/sql/event_timed.cc 2005-12-20 13:20:51 +01:00
+++ 1.16/sql/event_timed.cc 2006-01-11 12:49:43 +01:00
@@ -737,7 +737,7 @@
if (evex_db_find_event_aux(thd, dbname, name, table))
DBUG_RETURN(-2);
- if ((ret= table->file->delete_row(table->record[0])))
+ if ((ret= table->file->ha_delete_row(table->record[0])))
DBUG_RETURN(ret);
close_thread_tables(thd);
@@ -790,7 +790,7 @@
status_changed= false;
}
- if ((table->file->update_row(table->record[1],table->record[0])))
+ if ((table->file->ha_update_row(table->record[1],table->record[0])))
ret= EVEX_WRITE_ROW_FAILED;
done:
--- 1.69/sql/share/errmsg.txt 2006-01-11 12:01:29 +01:00
+++ 1.70/sql/share/errmsg.txt 2006-01-11 12:49:43 +01:00
@@ -5747,3 +5747,35 @@
eng "Table definition on master and slave does not match"
ER_BINLOG_ROW_RBR_TO_SBR
eng "Slave running with --log-slave-updates must use row-based binary logging to be able to replicate row-based binary log events"
+ER_EVENT_ALREADY_EXISTS
+ eng "Event '%-.64s' already exists"
+ER_EVENT_STORE_FAILED
+ eng "Failed to store event %s. Error code %d from storage engine."
+ER_EVENT_DOES_NOT_EXIST
+ eng "Unknown event '%-.64s'"
+ER_EVENT_CANT_ALTER
+ eng "Failed to alter event '%-.64s'"
+ER_EVENT_DROP_FAILED
+ eng "Failed to drop %s"
+ER_EVENT_INTERVAL_NOT_POSITIVE
+ eng "INTERVAL must be positive"
+ER_EVENT_ENDS_BEFORE_STARTS
+ eng "ENDS must be after STARTS"
+ER_EVENT_EXEC_TIME_IN_THE_PAST
+ eng "Activation (AT) time is in the past"
+ER_EVENT_OPEN_TABLE_FAILED
+ eng "Failed to open mysql.event"
+ER_EVENT_NEITHER_M_EXPR_NOR_M_AT
+ eng "No datetime expression provided"
+ER_EVENT_COL_COUNT_DOESNT_MATCH
+ eng "Column count of %s.%s is wrong. Table probably corrupted"
+ER_EVENT_CANNOT_LOAD_FROM_TABLE
+ eng "Cannot load from mysql.event. Table probably corrupted"
+ER_EVENT_CANNOT_DELETE
+ eng "Failed to delete the event from mysql.event"
+ER_EVENT_COMPILE_ERROR
+ eng "Error during compilation of event's body"
+ER_EVENT_SAME_NAME
+ eng "Same old and new event name"
+ER_EVENT_DATA_TOO_LONG
+ eng "Data for column '%s' too long"
--- 1.99/mysql-test/r/information_schema.result 2006-01-10 21:02:08 +01:00
+++ 1.100/mysql-test/r/information_schema.result 2006-01-11 12:49:42 +01:00
@@ -728,7 +728,7 @@
CREATE VIEW a1 (t_CRASHME) AS SELECT f1 FROM t_crashme GROUP BY f1;
CREATE VIEW a2 AS SELECT t_CRASHME FROM a1;
count(*)
-105
+106
drop view a2, a1;
drop table t_crashme;
select table_schema,table_name, column_name from
@@ -811,7 +811,7 @@
SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
table_schema count(*)
information_schema 19
-mysql 18
+mysql 19
create table t1 (i int, j int);
create trigger trg1 before insert on t1 for each row
begin
--- 1.2/mysql-test/r/mysqlcheck.result 2005-11-06 13:12:47 +01:00
+++ 1.3/mysql-test/r/mysqlcheck.result 2006-01-11 12:49:42 +01:00
@@ -1,5 +1,6 @@
mysql.columns_priv OK
mysql.db OK
+mysql.event OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
@@ -18,6 +19,7 @@
mysql.user OK
mysql.columns_priv OK
mysql.db OK
+mysql.event OK
mysql.func OK
mysql.help_category OK
mysql.help_keyword OK
--- 1.177/mysql-test/r/sp.result 2005-12-12 23:53:42 +01:00
+++ 1.178/mysql-test/r/sp.result 2006-01-11 12:49:43 +01:00
@@ -2116,6 +2116,7 @@
Create user Server Admin To create new users
Delete Tables To delete existing rows
Drop Databases,Tables To drop databases, tables, and views
+Event Server Admin Creation, alteration, deletion and execution of events.
Execute Functions,Procedures To execute stored routines
File File access on server To read and write files on the server
Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess
@@ -2170,6 +2171,7 @@
Create user Server Admin To create new users
Delete Tables To delete existing rows
Drop Databases,Tables To drop databases, tables, and views
+Event Server Admin Creation, alteration, deletion and execution of events.
Execute Functions,Procedures To execute stored routines
File File access on server To read and write files on the server
Grant option Databases,Tables,Functions,Procedures To give to other users those privileges you possess
| Thread |
|---|
| • bk commit into 5.1 tree (andrey:1.2030) | ahristov | 11 Jan |