diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index bd2adc3..fc1104a 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -6154,7 +6154,7 @@ field_spec:
 
 field_def:
           opt_attribute
-        | opt_generated_always AS
+        | opt_attribute_vcol_compat opt_generated_always AS
           '(' virtual_column_func ')'
           vcol_opt_specifier vcol_opt_attribute
         ;
@@ -6561,6 +6561,16 @@ opt_attribute_list:
         | attribute
         ;
 
+opt_attribute_vcol_compat:
+          /* empty */ {}
+        | opt_attribute_vcol_compat_list {}
+        ;
+
+opt_attribute_vcol_compat_list:
+          opt_attribute_vcol_compat_list attribute_vcol_compat {}
+        | attribute_vcol_compat
+        ;
+
 attribute:
           NULL_SYM { Lex->last_field->flags&= ~ NOT_NULL_FLAG; }
         | not NULL_SYM { Lex->last_field->flags|= NOT_NULL_FLAG; }
@@ -6597,20 +6607,7 @@ attribute:
             lex->last_field->flags|= UNIQUE_KEY_FLAG;
             lex->alter_info.flags|= Alter_info::ALTER_ADD_INDEX; 
           }
-        | COMMENT_SYM TEXT_STRING_sys { Lex->last_field->comment= $2; }
-        | COLLATE_SYM collation_name
-          {
-            if (Lex->charset && !my_charset_same(Lex->charset,$2))
-            {
-              my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
-                       $2->name,Lex->charset->csname);
-              MYSQL_YYABORT;
-            }
-            else
-            {
-              Lex->last_field->charset= $2;
-            }
-          }
+        | attribute_vcol_compat
         | IDENT_sys equal TEXT_STRING_sys
           {
             new (thd->mem_root)
@@ -6636,6 +6633,22 @@ attribute:
           }
         ;
 
+attribute_vcol_compat:
+          COMMENT_SYM TEXT_STRING_sys { Lex->last_field->comment= $2; }
+        | COLLATE_SYM collation_name
+          {
+            if (Lex->charset && !my_charset_same(Lex->charset,$2))
+            {
+              my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
+                       $2->name,Lex->charset->csname);
+              MYSQL_YYABORT;
+            }
+            else
+            {
+              Lex->last_field->charset= $2;
+            }
+          }
+        ;
 
 type_with_opt_collate:
         field_type opt_collate
