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.yy12
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index d9a21baf84e..426f6d4d057 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -4136,14 +4136,18 @@ expr_or_default:
opt_insert_update:
/* empty */
| ON DUPLICATE_SYM
- { /* for simplisity, let's forget about
- INSERT ... SELECT ... UPDATE
- for a moment */
- if (Lex->sql_command != SQLCOM_INSERT)
+ {
+ LEX *lex= Lex;
+ /*
+ For simplicity, let's forget about INSERT ... SELECT ... UPDATE
+ for a moment.
+ */
+ if (lex->sql_command != SQLCOM_INSERT)
{
yyerror(ER(ER_SYNTAX_ERROR));
YYABORT;
}
+ lex->duplicates= DUP_UPDATE;
}
KEY_SYM UPDATE_SYM update_list
;