summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authordlenev@brandersnatch.localdomain <>2005-01-11 14:26:40 +0300
committerdlenev@brandersnatch.localdomain <>2005-01-11 14:26:40 +0300
commit2f321150924de852439a26d2b26e544f4a5949b7 (patch)
tree69b409bd5ca1149ad22e13b6a497d45ca7bad03a /sql/sql_yacc.yy
parent28f5a019c1b85267988d4542a924f451506a1540 (diff)
downloadmariadb-git-2f321150924de852439a26d2b26e544f4a5949b7.tar.gz
Fix for bug #7418 "TIMESTAMP not always converted to DATETIME in MAXDB
mode". Changed grammar rule for "type" token. Now we have one branch with optional length specification for TIMESTAMP type instead of two separate branches.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy9
1 files changed, 1 insertions, 8 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index a09694ee1e6..66f7882c4e7 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1415,7 +1415,7 @@ type:
| YEAR_SYM opt_len field_options { $$=FIELD_TYPE_YEAR; }
| DATE_SYM { $$=FIELD_TYPE_DATE; }
| TIME_SYM { $$=FIELD_TYPE_TIME; }
- | TIMESTAMP
+ | TIMESTAMP opt_len
{
if (YYTHD->variables.sql_mode & MODE_MAXDB)
$$=FIELD_TYPE_DATETIME;
@@ -1428,13 +1428,6 @@ type:
$$=FIELD_TYPE_TIMESTAMP;
}
}
- | TIMESTAMP '(' NUM ')'
- {
- LEX *lex= Lex;
- lex->length= $3.str;
- lex->type|= NOT_NULL_FLAG;
- $$= FIELD_TYPE_TIMESTAMP;
- }
| DATETIME { $$=FIELD_TYPE_DATETIME; }
| TINYBLOB { Lex->charset=&my_charset_bin;
$$=FIELD_TYPE_TINY_BLOB; }