summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy16
1 files changed, 14 insertions, 2 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 5e6863178b9..ead4e38628d 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -501,6 +501,7 @@ bool my_yyoverflow(short **a, YYSTYPE **b,int *yystacksize);
grant revoke set lock unlock string_list field_options field_option
field_opt_list opt_binary table_lock_list table_lock varchar
references opt_on_delete opt_on_delete_list opt_on_delete_item use
+ opt_delete_options opt_delete_option
opt_outer table_list table opt_option opt_place opt_low_priority
opt_attribute opt_attribute_list attribute column_list column_list_id
opt_column_list grant_privileges opt_table user_list grant_option
@@ -2085,10 +2086,21 @@ opt_low_priority:
/* Delete rows from a table */
delete:
- DELETE_SYM opt_low_priority FROM table where_clause delete_limit_clause
- { Lex->sql_command= SQLCOM_DELETE; }
+ DELETE_SYM
+ { Lex->sql_command= SQLCOM_DELETE; Lex->options=0;
+ Lex->lock_option= current_thd->update_lock_default; }
+ opt_delete_options FROM table
+ where_clause delete_limit_clause
+opt_delete_options:
+ /* empty */ {}
+ | opt_delete_option opt_delete_options {}
+
+opt_delete_option:
+ QUICK { Lex->options|= OPTION_QUICK; }
+ | LOW_PRIORITY { Lex->lock_option= TL_WRITE_LOW_PRIORITY; }
+
/* Show things */
show: SHOW { Lex->wild=0;} show_param