MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:kent Date:February 25 2006 7:17pm
Subject:bk commit into 5.1 tree (kent:1.2165) BUG#17530
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of kent. When kent 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.2165 06/02/25 20:17:07 kent@stripped +4 -0
  drop-on-restart.inc:
    Drop 'mysqlslap'
    Added database name 'ndbsynctest'
  sql_table.cc, create.test, create.result:
    Patch for bug#17530 done by evgen, extracted from 5.0

  mysql-test/include/drop-on-restart.inc
    1.3 06/02/25 12:20:51 kent@stripped +1 -0
    Drop 'mysqlslap'

  mysql-test/include/drop-on-restart.inc
    1.2 06/02/25 00:34:01 kent@stripped +1 -0
    Added database name 'ndbsynctest'

  sql/sql_table.cc
    1.309 06/02/24 21:29:48 kent@stripped +3 -1
    Patch for bug#17530 done by evgen, extracted from 5.0

  mysql-test/t/create.test
    1.77 06/02/24 21:29:47 kent@stripped +8 -0
    Patch for bug#17530 done by evgen, extracted from 5.0

  mysql-test/r/create.result
    1.116 06/02/24 21:29:46 kent@stripped +6 -0
    Patch for bug#17530 done by evgen, extracted from 5.0

# 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:	kent
# Host:	c-5e4072d5.010-2112-6f72651.cust.bredbandsbolaget.se
# Root:	/Users/kent/mysql/bk/mysql-5.1-release

--- 1.308/sql/sql_table.cc	2006-02-17 19:55:38 +01:00
+++ 1.309/sql/sql_table.cc	2006-02-24 21:29:48 +01:00
@@ -1742,7 +1742,9 @@
       }
       if (length > file->max_key_part_length() && key->type != Key::FULLTEXT)
       {
-	length=file->max_key_part_length();
+        length= file->max_key_part_length();
+        /* Align key length to multibyte char boundary */
+        length-= length % sql_field->charset->mbmaxlen;
 	if (key->type == Key::MULTIPLE)
 	{
 	  /* not a critical problem */

--- 1.1/mysql-test/include/drop-on-restart.inc	2006-02-20 00:24:37 +01:00
+++ 1.3/mysql-test/include/drop-on-restart.inc	2006-02-25 12:20:51 +01:00
@@ -23,6 +23,7 @@
 drop database if exists db2;
 drop database if exists federated;
 drop database if exists mysqldump_test_db;
+drop database if exists mysqlslap;
 drop database if exists mysqltest1;
 drop database if exists mysqltest2;
 drop database if exists mysqltest3;
@@ -34,6 +35,7 @@
 drop database if exists mysqltest_db1;
 drop database if exists mysqltest_prometheus;
 drop database if exists mysqltest_sisyfos;
+drop database if exists ndbsynctest;
 drop database if exists ndbtest1;
 drop database if exists rewrite;
 drop database if exists test2;

--- 1.115/mysql-test/r/create.result	2006-02-17 20:06:00 +01:00
+++ 1.116/mysql-test/r/create.result	2006-02-24 21:29:46 +01:00
@@ -770,3 +770,9 @@
   `i` int(11) default NULL
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 MAX_ROWS=4294967295
 drop table t1;
+create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb 
+character set utf8 collate utf8_general_ci;
+Warnings:
+Warning	1071	Specified key was too long; max key length is 765 bytes
+insert into t1 values('aaa');
+drop table t1;

--- 1.76/mysql-test/t/create.test	2006-02-02 09:59:18 +01:00
+++ 1.77/mysql-test/t/create.test	2006-02-24 21:29:47 +01:00
@@ -661,4 +661,12 @@
 show create table t1;
 drop table t1;
 
+#
+# Bug#17530: Incorrect key truncation on table creation caused server crash.
+#
+create table t1(f1 varchar(800) binary not null, key(f1)) engine = innodb 
+  character set utf8 collate utf8_general_ci;
+insert into t1 values('aaa');
+drop table t1;
+
 # End of 5.0 tests
Thread
bk commit into 5.1 tree (kent:1.2165) BUG#17530kent25 Feb