List:Internals« Previous MessageNext Message »
From:gluh Date:May 9 2005 4:22pm
Subject:bk commit into 5.0 tree (gluh:1.1938) BUG#9404
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh 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.1938 05/05/09 16:22:49 gluh@stripped +3 -0
  Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries

  mysql-test/t/information_schema.test
    1.35 05/05/09 16:22:44 gluh@stripped +7 -1
    Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries

  mysql-test/r/information_schema.result
    1.49 05/05/09 16:22:44 gluh@stripped +4 -0
    Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries

  heap/hp_hash.c
    1.40 05/05/09 16:22:44 gluh@stripped +6 -7
    Fix for bug #9404: information_schema: Weird error messages with SELECT SUM() ... GROUP BY queries 
        use length in symbols instead of length in bytes
        to calculate record length and key length

# 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:	gluh
# Host:	mobby.(none)
# Root:	/home/gluh/MySQL/Bugs/5.0.9404

--- 1.39/heap/hp_hash.c	2005-04-21 16:06:02 +00:00
+++ 1.40/heap/hp_hash.c	2005-05-09 16:22:44 +00:00
@@ -635,13 +635,12 @@
       key+= 2;                                  /* skip key pack length */
       if (cs->mbmaxlen > 1)
       {
-        uint char_length= seg->length / cs->mbmaxlen;
-        char_length_key= my_charpos(cs, key, key + char_length_key,
-                                    char_length);
-        set_if_smaller(char_length_key, seg->length);
-        char_length_rec= my_charpos(cs, pos, pos + char_length_rec,
-                                    char_length);
-        set_if_smaller(char_length_rec, seg->length);
+        uint char_length1, char_length2;
+        char_length1= char_length2= seg->length / cs->mbmaxlen; 
+        char_length1= my_charpos(cs, key, key + char_length_key, char_length1);
+        set_if_smaller(char_length_key, char_length1);
+        char_length2= my_charpos(cs, pos, pos + char_length_rec, char_length2);
+        set_if_smaller(char_length_rec, char_length2);
       }
 
       if (cs->coll->strnncollsp(seg->charset,

--- 1.48/mysql-test/r/information_schema.result	2005-05-07 13:55:41 +00:00
+++ 1.49/mysql-test/r/information_schema.result	2005-05-09 16:22:44 +00:00
@@ -734,3 +734,7 @@
 x_float	NULL	NULL
 x_double_precision	NULL	NULL
 drop table t1;
+SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
+table_schema	count(*)
+information_schema	15
+mysql	17

--- 1.34/mysql-test/t/information_schema.test	2005-05-07 13:55:41 +00:00
+++ 1.35/mysql-test/t/information_schema.test	2005-05-09 16:22:44 +00:00
@@ -1,4 +1,4 @@
-# This test uses grants, which can't get tested for embedded server
+# This test  uses grants, which can't get tested for embedded server
 -- source include/not_embedded.inc
 
 # Test for information_schema.schemata &
@@ -473,3 +473,9 @@
 FROM INFORMATION_SCHEMA.COLUMNS
 WHERE TABLE_NAME= 't1';
 drop table t1;
+
+#
+# Bug #9404  information_schema: Weird error messages 
+# with SELECT SUM() ... GROUP BY queries
+#
+SELECT table_schema, count(*) FROM information_schema.TABLES GROUP BY TABLE_SCHEMA;
Thread
bk commit into 5.0 tree (gluh:1.1938) BUG#9404gluh9 May