1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

fix for bug #16411 Events: Microsecond intervals are allowed

WL#1034


mysql-test/r/events.result:
  output fix
sql/event.cc:
  - handle also INTERVAL_MICROSECOND, was missing.
  - use renamed ER_ code which is generic
sql/event.h:
  add new error code
sql/event_executor.cc:
  - use new ER_ code name
  - handle EVEX_MICROSECOND_UNSUP error code
sql/event_timed.cc:
  forbid MICROSECOND intervals for events
sql/share/errmsg.txt:
  rename error code, it's generic
sql/sql_show.cc:
  use new error code name
sql/sql_yacc.yy:
  bail out if any MICROSECOND interval is specified
This commit is contained in:
unknown
2006-02-20 16:06:05 +01:00
parent bac7f10448
commit 17fb7f96a2
9 changed files with 109 additions and 24 deletions

View File

@ -438,6 +438,7 @@ common_1_lev_code:
case INTERVAL_HOUR_MICROSECOND:
case INTERVAL_MINUTE_MICROSECOND:
case INTERVAL_SECOND_MICROSECOND:
case INTERVAL_MICROSECOND:
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "MICROSECOND");
return 1;
break;
@ -494,7 +495,7 @@ evex_open_event_table(THD *thd, enum thr_lock_type lock_type, TABLE **table)
if (table_check_intact(tables.table, EVEX_FIELD_COUNT, event_table_fields,
&mysql_event_last_create_time,
ER_EVENT_CANNOT_LOAD_FROM_TABLE))
ER_CANNOT_LOAD_FROM_TABLE))
{
close_thread_tables(thd);
DBUG_RETURN(2);
@ -976,7 +977,7 @@ db_find_event(THD *thd, sp_name *name, LEX_STRING *definer, event_timed **ett,
*/
if ((ret= et->load_from_row(root, table)))
{
my_error(ER_EVENT_CANNOT_LOAD_FROM_TABLE, MYF(0));
my_error(ER_CANNOT_LOAD_FROM_TABLE, MYF(0));
goto done;
}