List:Commits« Previous MessageNext Message »
From:Sergey Glukhov Date:December 24 2010 11:32am
Subject:bzr push into mysql-5.5-bugteam branch (sergey.glukhov:3225 to 3226)
View as plain text  
 3226 Sergey Glukhov	2010-12-24 [merge]
      5.1-bugteam->5.5-bugteam merge
     @ mysql-test/r/func_math.result
        5.1-bugteam->5.5-bugteam merge
     @ mysql-test/t/func_math.test
        5.1-bugteam->5.5-bugteam merge
     @ sql/item_func.cc
        5.1-bugteam->5.5-bugteam merge

    modified:
      mysql-test/r/func_math.result
      mysql-test/t/func_math.test
      sql/item_func.cc
 3225 Anitha Gopi	2010-12-21
      BUG #59055: RQG was broken after the checkin that removed rpl and rpl_ndb suites. RQG uses MTR V1 and that still has these in the default suite. Removing these from V1. Also removing references to ndb tests in some more disabled.def files

    modified:
      mysql-test/lib/v1/mysql-test-run.pl
      mysql-test/suite/funcs_1/t/disabled.def
      mysql-test/suite/funcs_2/t/disabled.def
      mysql-test/suite/parts/t/disabled.def
=== modified file 'mysql-test/r/func_math.result'
--- a/mysql-test/r/func_math.result	2010-12-17 11:11:34 +0000
+++ b/mysql-test/r/func_math.result	2010-12-24 11:21:44 +0000
@@ -501,6 +501,19 @@ SHOW WARNINGS;
 Level	Code	Message
 Warning	1292	Truncated incorrect DECIMAL value: ''
 Error	1690	BIGINT value is out of range in '('123456789012345678901234567890.123456789012345678901234567890' DIV 1)'
+#
+# Bug#57810 case/when/then : Assertion failed: length || !scale
+#
+SELECT CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END;
+CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END
+NULL
+CREATE TABLE t1 SELECT CAST((CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END) AS CHAR) as C;
+SHOW CREATE TABLE t1;
+Table	Create Table
+t1	CREATE TABLE `t1` (
+  `C` varchar(23) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t1;
 End of 5.1 tests
 #
 # Bug #8433: Overflow must be an error

=== modified file 'mysql-test/t/func_math.test'
--- a/mysql-test/t/func_math.test	2010-12-17 11:11:34 +0000
+++ b/mysql-test/t/func_math.test	2010-12-24 11:21:44 +0000
@@ -336,6 +336,15 @@ select 123456789012345678901234567890.12
 select "123456789012345678901234567890.123456789012345678901234567890" div 1 as x; 
 SHOW WARNINGS;
 
+--echo #
+--echo # Bug#57810 case/when/then : Assertion failed: length || !scale
+--echo #
+
+SELECT CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END;
+CREATE TABLE t1 SELECT CAST((CASE(('')) WHEN (CONVERT(1, CHAR(1))) THEN (('' / 1)) END) AS CHAR) as C;
+SHOW CREATE TABLE t1;
+DROP TABLE t1;
+
 --echo End of 5.1 tests
 
 --echo #

=== modified file 'sql/item_func.cc'
--- a/sql/item_func.cc	2010-12-17 11:11:34 +0000
+++ b/sql/item_func.cc	2010-12-24 11:21:44 +0000
@@ -1543,9 +1543,14 @@ void Item_func_div::fix_length_and_dec()
   {
     decimals=max(args[0]->decimals,args[1]->decimals)+prec_increment;
     set_if_smaller(decimals, NOT_FIXED_DEC);
-    max_length=args[0]->max_length - args[0]->decimals + decimals;
     uint tmp=float_length(decimals);
-    set_if_smaller(max_length,tmp);
+    if (decimals == NOT_FIXED_DEC)
+      max_length= tmp;
+    else
+    {
+      max_length=args[0]->max_length - args[0]->decimals + decimals;
+      set_if_smaller(max_length,tmp);
+    }
     break;
   }
   case INT_RESULT:

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5-bugteam branch (sergey.glukhov:3225 to 3226) Sergey Glukhov24 Dec