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.yy8
1 files changed, 5 insertions, 3 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 412fcce8625..fdb40407ffb 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -6013,8 +6013,8 @@ field_list_item:
;
column_def:
- field_spec opt_check_constraint
- { $$= $1; $$->check_constraint= $2; }
+ field_spec
+ { $$= $1; }
| field_spec references
{ $$= $1; }
;
@@ -6152,11 +6152,13 @@ field_spec:
lex->init_last_field(f, $1.str, NULL);
$<create_field>$= f;
}
- field_type_or_serial
+ field_type_or_serial opt_check_constraint
{
LEX *lex=Lex;
$$= $<create_field>2;
+ $$->check_constraint= $4;
+
if ($$->check(thd))
MYSQL_YYABORT;