From: Dmitry Lenev Date: February 2 2011 2:11pm Subject: bzr push into mysql-5.5 branch (Dmitry.Lenev:3297) Bug#58650 List-Archive: http://lists.mysql.com/commits/130232 X-Bug: 58650 Message-Id: <20110202141134.2F6A974047A@bandersnatch> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3297 Dmitry Lenev 2011-02-02 [merge] Merged fix for bug #58650 "Failing assertion: primary_key_no == -1 || primary_key_no == 0" with recent changes from mysql-5.5 tree. added: mysql-test/r/filesort_debug.result mysql-test/t/filesort_debug.test modified: include/my_sys.h mysql-test/include/mtr_warnings.sql mysql-test/r/order_by.result mysql-test/t/order_by.test sql/filesort.cc sql/protocol.cc sql/share/errmsg-utf8.txt sql/unireg.h === modified file 'mysql-test/include/gis_keys.inc' --- a/mysql-test/include/gis_keys.inc 2007-11-01 14:03:09 +0000 +++ b/mysql-test/include/gis_keys.inc 2011-02-02 13:17:48 +0000 @@ -44,3 +44,19 @@ SELECT COUNT(*) FROM t2 IGNORE INDEX(p) DROP TABLE t1, t2; --echo End of 5.0 tests + + +--echo # +--echo # Test for bug #58650 "Failing assertion: primary_key_no == -1 || +--echo # primary_key_no == 0". +--echo # +--disable_warnings +drop table if exists t1; +--enable_warnings +--echo # The minimal test case. +create table t1 (a int not null, b linestring not null, unique key b (b(12)), unique key a (a)); +drop table t1; +--echo # The original test case. +create table t1 (a int not null, b linestring not null, unique key b (b(12))); +create unique index a on t1(a); +drop table t1; === modified file 'mysql-test/r/gis.result' --- a/mysql-test/r/gis.result 2011-01-12 13:11:31 +0000 +++ b/mysql-test/r/gis.result 2011-02-02 13:53:56 +0000 @@ -960,6 +960,18 @@ COUNT(*) 2 DROP TABLE t1, t2; End of 5.0 tests +# +# Test for bug #58650 "Failing assertion: primary_key_no == -1 || +# primary_key_no == 0". +# +drop table if exists t1; +# The minimal test case. +create table t1 (a int not null, b linestring not null, unique key b (b(12)), unique key a (a)); +drop table t1; +# The original test case. +create table t1 (a int not null, b linestring not null, unique key b (b(12))); +create unique index a on t1(a); +drop table t1; create table `t1` (`col002` point)engine=myisam; insert into t1 values (),(),(); select min(`col002`) from t1 union select `col002` from t1; === modified file 'mysql-test/suite/innodb/r/innodb_gis.result' --- a/mysql-test/suite/innodb/r/innodb_gis.result 2010-08-17 06:24:33 +0000 +++ b/mysql-test/suite/innodb/r/innodb_gis.result 2011-02-02 13:53:56 +0000 @@ -585,5 +585,17 @@ COUNT(*) 2 DROP TABLE t1, t2; End of 5.0 tests +# +# Test for bug #58650 "Failing assertion: primary_key_no == -1 || +# primary_key_no == 0". +# +drop table if exists t1; +# The minimal test case. +create table t1 (a int not null, b linestring not null, unique key b (b(12)), unique key a (a)); +drop table t1; +# The original test case. +create table t1 (a int not null, b linestring not null, unique key b (b(12))); +create unique index a on t1(a); +drop table t1; create table t1 (g geometry not null, spatial gk(g)) engine=innodb; ERROR HY000: The used table type doesn't support SPATIAL indexes === modified file 'sql/field.cc' --- a/sql/field.cc 2010-12-29 00:26:31 +0000 +++ b/sql/field.cc 2011-02-02 13:53:56 +0000 @@ -9073,6 +9073,7 @@ void Create_field::create_length_to_inte case MYSQL_TYPE_MEDIUM_BLOB: case MYSQL_TYPE_LONG_BLOB: case MYSQL_TYPE_BLOB: + case MYSQL_TYPE_GEOMETRY: case MYSQL_TYPE_VAR_STRING: case MYSQL_TYPE_STRING: case MYSQL_TYPE_VARCHAR: No bundle (reason: useless for push emails).