List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:October 18 2010 1:13pm
Subject:bzr commit into mysql-5.5-bugteam branch (tor.didriksen:3247) Bug#57203
View as plain text  
#At file:///export/home/didrik/repo/5.5-bugteam-bug57203/ based on revid:li-bing.song@stripped

 3247 Tor Didriksen	2010-10-18
      Bug #57203 Assertion `field_length <= 255' failed.
      
      After the fix for
      Bug #55077 Assertion failed: width > 0 && to != ((void *)0), file .\dtoa.c
      we no longer try to allocate a string of length 'field_length'
      so the asserts can be removed.
     @ mysql-test/r/select.result
        Add test case for Bug#57203
     @ mysql-test/t/select.test
        Add test case for Bug#57203
     @ sql/field.cc
        Remove the DBUG_ASSERTS on field_length.

    modified:
      mysql-test/r/select.result
      mysql-test/t/select.test
      sql/field.cc
=== modified file 'mysql-test/r/select.result'
--- a/mysql-test/r/select.result	2010-09-28 15:15:58 +0000
+++ b/mysql-test/r/select.result	2010-10-18 13:13:09 +0000
@@ -4887,3 +4887,17 @@ col_int_key
 DROP VIEW view_t1;
 DROP TABLE t1;
 # End of test BUG#54515
+#
+# Bug #57203 Assertion `field_length <= 255' failed.
+#
+SELECT avg(distinct(-31872)) as foo;
+foo
+-31872.0000
+CREATE table t1(a text) engine=myisam;
+INSERT INTO t1 VALUES (''), ('');
+SELECT avg(distinct(t1.a)) FROM t1, t1 t2
+GROUP BY t2.a ORDER BY t1.a;
+avg(distinct(t1.a))
+0
+DROP TABLE t1;
+# End of test BUG#57203

=== modified file 'mysql-test/t/select.test'
--- a/mysql-test/t/select.test	2010-09-09 15:00:33 +0000
+++ b/mysql-test/t/select.test	2010-10-18 13:13:09 +0000
@@ -4147,3 +4147,18 @@ DROP VIEW view_t1;
 DROP TABLE t1;
 
 --echo # End of test BUG#54515
+
+--echo #
+--echo # Bug #57203 Assertion `field_length <= 255' failed.
+--echo #
+
+SELECT avg(distinct(-31872)) as foo;
+
+CREATE table t1(a text) engine=myisam;
+INSERT INTO t1 VALUES (''), ('');
+SELECT avg(distinct(t1.a)) FROM t1, t1 t2
+GROUP BY t2.a ORDER BY t1.a;
+
+DROP TABLE t1;
+
+--echo # End of test BUG#57203

=== modified file 'sql/field.cc'
--- a/sql/field.cc	2010-09-29 14:26:32 +0000
+++ b/sql/field.cc	2010-10-18 13:13:09 +0000
@@ -4189,7 +4189,6 @@ String *Field_float::val_str(String *val
 			     String *val_ptr __attribute__((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
-  DBUG_ASSERT(field_length <= MAX_FIELD_CHARLENGTH);
   float nr;
 #ifdef WORDS_BIGENDIAN
   if (table->s->db_low_byte_first)
@@ -4512,7 +4511,6 @@ String *Field_double::val_str(String *va
 			      String *val_ptr __attribute__((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
-  DBUG_ASSERT(field_length <= MAX_FIELD_CHARLENGTH);
   double nr;
 #ifdef WORDS_BIGENDIAN
   if (table->s->db_low_byte_first)


Attachment: [text/bzr-bundle] bzr/tor.didriksen@oracle.com-20101018131309-yc1xzzl3rcku6qlv.bundle
Thread
bzr commit into mysql-5.5-bugteam branch (tor.didriksen:3247) Bug#57203Tor Didriksen18 Oct
  • Re: bzr commit into mysql-5.5-bugteam branch (tor.didriksen:3247)Bug#57203Alexey Kopytov18 Oct
    • Re: bzr commit into mysql-5.5-bugteam branch (tor.didriksen:3247)Bug#57203Tor Didriksen18 Oct
      • Re: bzr commit into mysql-5.5-bugteam branch (tor.didriksen:3247)Bug#57203Alexey Kopytov18 Oct
        • Re: bzr commit into mysql-5.5-bugteam branch (tor.didriksen:3247)Bug#57203Tor Didriksen18 Oct