Below is the list of changes that have just been committed into a local
4.1 repository of acurtis. When acurtis does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2196 05/04/21 16:27:38 acurtis@stripped +3 -0
Bug#9666 - Can't use 'DEFAULT FALSE' for column of type bool
Fix bug by moving TRUE/FALSE in with other literals.
sql/sql_yacc.yy
1.383 05/04/21 16:27:28 acurtis@stripped +2 -4
Bug#9666 - Can't use 'DEFAULT FALSE' for column of type bool
Fix bug by moving TRUE/FALSE in with other literals.
mysql-test/t/create.test
1.49 05/04/21 16:27:28 acurtis@stripped +11 -0
Bug#9666
Test for bug
mysql-test/r/create.result
1.76 05/04/21 16:27:27 acurtis@stripped +11 -0
Bug#9666
Test for bug
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: acurtis
# Host: ltantony.xiphis.org
# Root: /.amd_mnt/bk.anubis/host/work-acurtis/bug9666
--- 1.382/sql/sql_yacc.yy 2005-04-15 23:10:29 +01:00
+++ 1.383/sql/sql_yacc.yy 2005-04-21 16:27:28 +01:00
@@ -2959,8 +2959,6 @@
{ $$= 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 @@
{ $$= 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 @@
| 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
{
--- 1.75/mysql-test/r/create.result 2004-08-31 12:34:59 +01:00
+++ 1.76/mysql-test/r/create.result 2005-04-21 16:27:27 +01:00
@@ -552,3 +552,14 @@
Test 0
NULL 1
drop table t1, t2, t3;
+create table t1 (b bool not null default false);
+create table t2 (b bool not null default true);
+insert into t1 values ();
+insert into t2 values ();
+select * from t1;
+b
+0
+select * from t2;
+b
+1
+drop table t1,t2;
--- 1.48/mysql-test/t/create.test 2004-10-26 17:29:53 +01:00
+++ 1.49/mysql-test/t/create.test 2005-04-21 16:27:28 +01:00
@@ -449,3 +449,14 @@
CREATE TABLE t3 SELECT t1.dsc,COUNT(DISTINCT t2.id) AS countOfRuns FROM t1 LEFT JOIN t2
ON (t1.id=t2.id) GROUP BY t1.id;
SELECT * FROM t3;
drop table t1, t2, t3;
+
+#
+# Bug#9666: Can't use 'DEFAULT FALSE' for column of type bool
+#
+create table t1 (b bool not null default false);
+create table t2 (b bool not null default true);
+insert into t1 values ();
+insert into t2 values ();
+select * from t1;
+select * from t2;
+drop table t1,t2;
| Thread |
|---|
| • bk commit into 4.1 tree (acurtis:1.2196) BUG#9666 | antony | 21 Apr |