List:Commits« Previous MessageNext Message »
From:Alexander Barkov Date:August 26 2010 1:23pm
Subject:bzr push into mysql-next-mr-bugfixing branch (bar:3248 to 3249)
View as plain text  
 3249 Alexander Barkov	2010-08-26 [merge]
      Merging from mysql-trunk-bugfixing

    modified:
      mysql-test/r/ctype_utf32.result
      mysql-test/suite/sys_vars/t/secure_file_priv.test
      mysql-test/t/ctype_utf32.test
      storage/myisam/mi_key.c
 3248 Jorgen Loland	2010-08-26
      Bug#30597: Change EXPLAIN output to include extrema of 
                 UNION components
            
      Previously, EXPLAIN of a large union would truncate the 
      UNION RESULT row at the end of the list like this if the 
      string got too large:
            
      <union1,2,3,4,...>
            
      With this patch, truncation happens in the middle of the string
      like this:
            
      <union1,2,3,...,9>
            
      This makes it easier to understand the boundaries of the UNION.
     @ mysql-test/r/explain.result
        Added test for BUG#30597
     @ mysql-test/t/explain.test
        Added test for BUG#30597
     @ sql/sql_lex.h
        Add inline function st_select_lex::last_select()
     @ sql/sql_select.cc
        Truncate UNION RESULT row of large UNIONs in the middle of the
        string instead of in the end

    modified:
      mysql-test/r/explain.result
      mysql-test/t/explain.test
      sql/sql_lex.h
      sql/sql_select.cc
=== modified file 'mysql-test/r/ctype_utf32.result'
--- a/mysql-test/r/ctype_utf32.result	2010-08-20 11:52:40 +0000
+++ b/mysql-test/r/ctype_utf32.result	2010-08-26 13:21:49 +0000
@@ -1128,6 +1128,19 @@ format(123,2,'no_NO')
 123,00
 DROP TABLE t1;
 #
+# Bug#42511 mysqld: ctype-ucs2.c:2044: my_strnncollsp_utf32: Assertion (tlen % 4) == 0' faied
+#
+CREATE TABLE t1 (
+b char(250) CHARACTER SET utf32,
+key (b)
+) ENGINE=MYISAM;
+INSERT INTO t1 VALUES ('d'),('f');
+SELECT * FROM t1 WHERE b BETWEEN 'a' AND 'z';
+b
+d
+f
+DROP TABLE t1;
+#
 # End of 5.5 tests
 #
 #

=== modified file 'mysql-test/suite/sys_vars/t/secure_file_priv.test'
--- a/mysql-test/suite/sys_vars/t/secure_file_priv.test	2010-04-16 14:10:47 +0000
+++ b/mysql-test/suite/sys_vars/t/secure_file_priv.test	2010-08-11 07:18:06 +0000
@@ -6,10 +6,8 @@ INSERT INTO t1 VALUES ("one"),("two"),("
 SHOW VARIABLES LIKE 'secure_file_priv';
 --disable_query_log
 # Atempt to create a file where we normally aren't allowed to create one.
-# Doing this in a portable manner is difficult but we should be able to
-# count on the depth of the directory hierarchy used. Three steps up from
-# the datadir is the 'mysql_test' directory.
---let $PROTECTED_FILE=`SELECT concat(@@datadir,'/../../../bug50373.txt')`;
+# Use the mysql-test dir
+--let $PROTECTED_FILE=$MYSQL_TEST_DIR/bug50373.txt
 --eval SELECT * FROM t1 INTO OUTFILE '$PROTECTED_FILE';
 DELETE FROM t1;
 --eval LOAD DATA INFILE '$PROTECTED_FILE' INTO TABLE t1;

=== modified file 'mysql-test/t/ctype_utf32.test'
--- a/mysql-test/t/ctype_utf32.test	2010-08-20 11:52:40 +0000
+++ b/mysql-test/t/ctype_utf32.test	2010-08-26 13:21:49 +0000
@@ -830,6 +830,17 @@ SELECT * FROM t1;
 DROP TABLE t1;
 
 --echo #
+--echo # Bug#42511 mysqld: ctype-ucs2.c:2044: my_strnncollsp_utf32: Assertion (tlen % 4) == 0' faied
+--echo #
+CREATE TABLE t1 (
+ b char(250) CHARACTER SET utf32,
+ key (b)
+) ENGINE=MYISAM;
+INSERT INTO t1 VALUES ('d'),('f');
+SELECT * FROM t1 WHERE b BETWEEN 'a' AND 'z';
+DROP TABLE t1;
+
+--echo #
 --echo # End of 5.5 tests
 --echo #
 

=== modified file 'storage/myisam/mi_key.c'
--- a/storage/myisam/mi_key.c	2010-07-26 11:34:07 +0000
+++ b/storage/myisam/mi_key.c	2010-08-26 13:21:49 +0000
@@ -254,18 +254,17 @@ uint _mi_pack_key(register MI_INFO *info
     pos=old;
     if (keyseg->flag & HA_SPACE_PACK)
     {
-      uchar *end=pos+length;
       if (type == HA_KEYTYPE_NUM)
       {
-	while (pos < end && pos[0] == ' ')
-	  pos++;
+        uchar *end= pos + length;
+        while (pos < end && pos[0] == ' ')
+          pos++;
+        length= (uint) (end - pos);
       }
       else if (type != HA_KEYTYPE_BINARY)
       {
-	while (end > pos && end[-1] == ' ')
-	  end--;
+        length= cs->cset->lengthsp(cs, (char*) pos, length);
       }
-      length=(uint) (end-pos);
       FIX_LENGTH(cs, pos, length, char_length);
       store_key_length_inc(key,char_length);
       memcpy((uchar*) key,pos,(size_t) char_length);


Attachment: [text/bzr-bundle] bzr/bar@mysql.com-20100826132149-076acars50vcb29b.bundle
Thread
bzr push into mysql-next-mr-bugfixing branch (bar:3248 to 3249) Alexander Barkov26 Aug