summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2012-08-29 18:36:57 +0200
committerSergei Golubchik <sergii@pisem.net>2012-08-29 18:36:57 +0200
commit2de4f09a75ad878753bb090a4c04291113d7a0c0 (patch)
treec410e472f2f8d7a7d3b2bdb1f6b8c08ec2a43f52
parent3444e8e9254070f836488dae12b5c825cc9c563f (diff)
downloadmariadb-git-2de4f09a75ad878753bb090a4c04291113d7a0c0.tar.gz
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.
-rw-r--r--sql/sql_yacc.yy8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 0f013bfb566..b1772536639 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -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;
}