Commit 2de4f09a authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-438 Microseconds: Precision is ignored in CURRENT_TIMESTAMP(N) when it is...

MDEV-438 Microseconds: Precision is ignored in CURRENT_TIMESTAMP(N) when it is given as a default column value

The syntax for specifying precision in the DEFAULT clause is unintentional and unsupported.
Don't allow it anymore.
parent 3444e8e9
......@@ -5453,9 +5453,9 @@ attribute:
NULL_SYM { Lex->type&= ~ NOT_NULL_FLAG; }
| not NULL_SYM { Lex->type|= NOT_NULL_FLAG; }
| DEFAULT now_or_signed_literal { Lex->default_value=$2; }
| ON UPDATE_SYM NOW_SYM opt_time_precision
| ON UPDATE_SYM NOW_SYM optional_braces
{
Item *item= new (YYTHD->mem_root) Item_func_now_local($4);
Item *item= new (YYTHD->mem_root) Item_func_now_local(6);
if (item == NULL)
MYSQL_YYABORT;
Lex->on_update_value= item;
......@@ -5525,9 +5525,9 @@ attribute:
;
now_or_signed_literal:
NOW_SYM opt_time_precision
NOW_SYM optional_braces
{
$$= new (YYTHD->mem_root) Item_func_now_local($2);
$$= new (YYTHD->mem_root) Item_func_now_local(6);
if ($$ == NULL)
MYSQL_YYABORT;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment