List:Commits« Previous MessageNext Message »
From:Tor Didriksen Date:October 19 2010 11:50am
Subject:bzr commit into mysql-trunk-merge branch (tor.didriksen:3278)
View as plain text  
#At file:///export/home/didrik/repo/trunk-merge/ based on revid:magne.mahre@stripped

 3278 Tor Didriksen	2010-10-19 [merge]
      automerge from 5.5-bugteam

    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:29:26 +0000
+++ b/mysql-test/r/select.result	2010-10-19 11:50:12 +0000
@@ -4887,3 +4887,22 @@ col_int_key
 DROP VIEW view_t1;
 DROP TABLE t1;
 # End of test BUG#54515
+#
+# Bug #57203 Assertion `field_length <= 255' failed.
+#
+SELECT coalesce((avg(distinct (geomfromtext("point(25379 -22010)"))))) 
+UNION ALL 
+SELECT coalesce((avg(distinct (geomfromtext("point(25379 -22010)")))))
+AS foo
+;
+coalesce((avg(distinct (geomfromtext("point(25379 -22010)")))))
+0.0000
+0.0000
+CREATE table t1(a text);
+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-19 06:45:18 +0000
@@ -4147,3 +4147,22 @@ DROP VIEW view_t1;
 DROP TABLE t1;
 
 --echo # End of test BUG#54515
+
+--echo #
+--echo # Bug #57203 Assertion `field_length <= 255' failed.
+--echo #
+
+SELECT coalesce((avg(distinct (geomfromtext("point(25379 -22010)"))))) 
+UNION ALL 
+SELECT coalesce((avg(distinct (geomfromtext("point(25379 -22010)")))))
+AS foo
+;
+
+CREATE table t1(a text);
+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:41:24 +0000
+++ b/sql/field.cc	2010-10-19 11:50:12 +0000
@@ -4203,7 +4203,7 @@ String *Field_float::val_str(String *val
 			     String *val_ptr __attribute__((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
-  DBUG_ASSERT(field_length <= MAX_FIELD_CHARLENGTH);
+  DBUG_ASSERT(!zerofill || field_length <= MAX_FIELD_CHARLENGTH);
   float nr;
 #ifdef WORDS_BIGENDIAN
   if (table->s->db_low_byte_first)
@@ -4526,7 +4526,7 @@ String *Field_double::val_str(String *va
 			      String *val_ptr __attribute__((unused)))
 {
   ASSERT_COLUMN_MARKED_FOR_READ;
-  DBUG_ASSERT(field_length <= MAX_FIELD_CHARLENGTH);
+  DBUG_ASSERT(!zerofill || 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-20101019115012-po81n9dzf59iyb26.bundle
Thread
bzr commit into mysql-trunk-merge branch (tor.didriksen:3278) Tor Didriksen19 Oct