diff options
author | unknown <andrey@lmy004.> | 2005-12-07 19:26:44 +0100 |
---|---|---|
committer | unknown <andrey@lmy004.> | 2005-12-07 19:26:44 +0100 |
commit | bc3708a5b9fd72a1fb5e066b3084fec809138558 (patch) | |
tree | 24fd545951265c7b420f45e4e6d69101c3da295b /sql/sql_yacc.yy | |
parent | a581a4a1c590aaf333e349ed4f6413e200eadd69 (diff) | |
download | mariadb-git-bc3708a5b9fd72a1fb5e066b3084fec809138558.tar.gz |
WL#1034 ongoing updates after review
sql/event.cc:
-my_error() as close as possible to the place where the error
occurs.
-a thought how to replicate events
-use close_thread_tables() in some cases and for others rely on
this call being done in sql_parse.cc::do_command()
sql/event.h:
remove redundant defines
sql/event_executor.cc:
- reenable the compilation again
- don't backup the open_tables_state, it's not needed
sql/event_timed.cc:
- inline a bit
- comment added
sql/mysqld.cc:
- start mysqld with --event-scheduler=0 by default
sql/share/errmsg.txt:
3 new messages
sql/sql_parse.cc:
remove now obsolete error checking - the errors are reported
as closer as possible to the place where they are detected
sql/sql_yacc.yy:
add WARNING message. fix a bug that was corrupting
thd->client_capabilites ->
select count(*) from mysql.event
was reporting : "Unknown table test.event"!!!
Using temporal variable is nice but IMO quite error-prone.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index b16436dd74a..082eee98e57 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -1312,6 +1312,10 @@ create: Lex->sql_command = SQLCOM_CREATE_USER; } | CREATE EVENT_SYM opt_if_not_exists sp_name + /* + BE CAREFUL when you add a new rule to update the block where + YYTHD->client_capabilities is set back to original value + */ { LEX *lex=Lex; @@ -1351,12 +1355,19 @@ create: DO_SYM ev_sql_stmt { /* - sql_command is set here because some rules in ev_sql_stmt - can overwrite it + Restore flag if it was cleared above + $1 - CREATE + $2 - EVENT_SYM + $3 - opt_if_not_exists + $4 - sp_name + $5 - the block above */ - // Restore flag if it was cleared above YYTHD->client_capabilities |= $<ulong_num>5; + /* + sql_command is set here because some rules in ev_sql_stmt + can overwrite it + */ Lex->sql_command= SQLCOM_CREATE_EVENT; } ; @@ -4192,6 +4203,10 @@ alter: view_list_opt AS view_select view_check_option {} | ALTER EVENT_SYM sp_name + /* + BE CAREFUL when you add a new rule to update the block where + YYTHD->client_capabilities is set back to original value + */ { LEX *lex=Lex; event_timed *et; @@ -4234,10 +4249,17 @@ alter: ev_opt_sql_stmt { /* + $1 - ALTER + $2 - EVENT_SYM + $3 - sp_name + $4 - the block above + */ + YYTHD->client_capabilities |= $<ulong_num>4; + + /* sql_command is set here because some rules in ev_sql_stmt can overwrite it */ - YYTHD->client_capabilities |= $<ulong_num>3; Lex->sql_command= SQLCOM_ALTER_EVENT; } ; |