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.yy21
1 files changed, 14 insertions, 7 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index a09694ee1e6..9235ce1fb6d 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1849,8 +1849,9 @@ alter:
{
THD *thd= YYTHD;
LEX *lex= thd->lex;
- lex->sql_command = SQLCOM_ALTER_TABLE;
- lex->name=0;
+ lex->sql_command= SQLCOM_ALTER_TABLE;
+ lex->name= 0;
+ lex->duplicates= DUP_ERROR;
if (!lex->select_lex.add_table_to_list(thd, $4, NULL,
TL_OPTION_UPDATING))
YYABORT;
@@ -2035,8 +2036,9 @@ opt_column:
| COLUMN_SYM {};
opt_ignore:
- /* empty */ { Lex->duplicates=DUP_ERROR; }
- | IGNORE_SYM { Lex->duplicates=DUP_IGNORE; };
+ /* empty */ { Lex->ignore= 0;}
+ | IGNORE_SYM { Lex->ignore= 1;}
+ ;
opt_restrict:
/* empty */ {}
@@ -4012,7 +4014,8 @@ insert:
INSERT
{
LEX *lex= Lex;
- lex->sql_command = SQLCOM_INSERT;
+ lex->sql_command= SQLCOM_INSERT;
+ lex->duplicates= DUP_ERROR;
/* for subselects */
lex->lock_option= (using_update_log) ? TL_READ_NO_INSERT : TL_READ;
lex->select_lex.resolve_mode= SELECT_LEX::INSERT_MODE;
@@ -4174,6 +4177,7 @@ update:
mysql_init_select(lex);
lex->sql_command= SQLCOM_UPDATE;
lex->lock_option= TL_UNLOCK; /* Will be set later */
+ lex->duplicates= DUP_ERROR;
}
opt_low_priority opt_ignore join_table_list
SET update_list
@@ -4233,6 +4237,7 @@ delete:
LEX *lex= Lex;
lex->sql_command= SQLCOM_DELETE;
lex->lock_option= lex->thd->update_lock_default;
+ lex->ignore= 0;
lex->select_lex.init_order();
}
opt_delete_options single_multi {}
@@ -4289,7 +4294,7 @@ opt_delete_options:
opt_delete_option:
QUICK { Select->options|= OPTION_QUICK; }
| LOW_PRIORITY { Lex->lock_option= TL_WRITE_LOW_PRIORITY; }
- | IGNORE_SYM { Lex->duplicates= DUP_IGNORE; };
+ | IGNORE_SYM { Lex->ignore= 1; };
truncate:
TRUNCATE_SYM opt_table_sym table_name
@@ -4698,6 +4703,8 @@ load: LOAD DATA_SYM load_data_lock opt_local INFILE TEXT_STRING_sys
lex->sql_command= SQLCOM_LOAD;
lex->lock_option= $3;
lex->local_file= $4;
+ lex->duplicates= DUP_ERROR;
+ lex->ignore= 0;
if (!(lex->exchange= new sql_exchange($6.str,0)))
YYABORT;
lex->field_list.empty();
@@ -4735,7 +4742,7 @@ load_data_lock:
opt_duplicate:
/* empty */ { Lex->duplicates=DUP_ERROR; }
| REPLACE { Lex->duplicates=DUP_REPLACE; }
- | IGNORE_SYM { Lex->duplicates=DUP_IGNORE; };
+ | IGNORE_SYM { Lex->ignore= 1; };
opt_field_term:
/* empty */