summaryrefslogtreecommitdiff
path: root/sql/sql_yacc.yy
diff options
context:
space:
mode:
authorunknown <antony@ltantony.mysql.com>2005-05-07 13:51:29 +0100
committerunknown <antony@ltantony.mysql.com>2005-05-07 13:51:29 +0100
commit76f63c975dde623e4d5e88ced4720d3d76fc2da8 (patch)
treebf8293b440ea7fbd0b6fe9a43da126245a6924f0 /sql/sql_yacc.yy
parentcae0d72898effe5e2e9d620562f01335fe1959ea (diff)
downloadmariadb-git-76f63c975dde623e4d5e88ced4720d3d76fc2da8.tar.gz
Bug#9666 - Can't use 'DEFAULT FALSE' for column of type bool
Fix bug by moving TRUE/FALSE in with other literals. mysql-test/r/create.result: Test for Bug#9666 mysql-test/t/create.test: Test for Bug#9666 sql/sql_yacc.yy: Move TRUE/FALSE in with other literals. BitKeeper/etc/logging_ok: Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r--sql/sql_yacc.yy6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 594077dd4f3..73845f7d645 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -2959,8 +2959,6 @@ simple_expr:
{ $$= new Item_func_export_set($3, $5, $7, $9); }
| EXPORT_SET '(' expr ',' expr ',' expr ',' expr ',' expr ')'
{ $$= new Item_func_export_set($3, $5, $7, $9, $11); }
- | FALSE_SYM
- { $$= new Item_int((char*) "FALSE",0,1); }
| FORMAT_SYM '(' expr ',' NUM ')'
{ $$= new Item_func_format($3,atoi($5.str)); }
| FROM_UNIXTIME '(' expr ')'
@@ -3108,8 +3106,6 @@ simple_expr:
{ $$= new Item_func_trim($5,$3); }
| TRUNCATE_SYM '(' expr ',' expr ')'
{ $$= new Item_func_round($3,$5,1); }
- | TRUE_SYM
- { $$= new Item_int((char*) "TRUE",1,1); }
| UDA_CHAR_SUM '(' udf_expr_list ')'
{
if ($3 != NULL)
@@ -4892,6 +4888,8 @@ literal:
| NUM_literal { $$ = $1; }
| NULL_SYM { $$ = new Item_null();
Lex->next_state=MY_LEX_OPERATOR_OR_IDENT;}
+ | FALSE_SYM { $$= new Item_int((char*) "FALSE",0,1); }
+ | TRUE_SYM { $$= new Item_int((char*) "TRUE",1,1); }
| HEX_NUM { $$ = new Item_varbinary($1.str,$1.length);}
| UNDERSCORE_CHARSET HEX_NUM
{