diff options
author | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-10-26 15:37:38 +0500 |
---|---|---|
committer | unknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru> | 2007-10-26 15:37:38 +0500 |
commit | 51a49b1783bf880d9bd9ddd105c57d42cbdd9a87 (patch) | |
tree | bee3dd52db241dee91e3a66776658a52e07176bd /mysql-test/t/innodb_mysql.test | |
parent | 6c9993f7203f13f5d8be04c5df63697bce19e7d4 (diff) | |
download | mariadb-git-51a49b1783bf880d9bd9ddd105c57d42cbdd9a87.tar.gz |
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
Problem: if a partial unique key followed by a non-partial one we declare
the second one as a primary key.
Fix: sort non-partial unique keys before partial ones.
include/my_base.h:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- sort unique keys that don't contain partial segments before other keys:
set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
use it in the sort_keys();
mysql-test/r/innodb_mysql.result:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- test result.
mysql-test/r/key.result:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- test result.
mysql-test/t/innodb_mysql.test:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- test case.
mysql-test/t/key.test:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- test case.
sql/sql_table.cc:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- sort unique keys that don't contain partial segments before other keys:
set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
use it in the sort_keys();
sql/structs.h:
Fix for bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0,
file .\ha_innodb.
- sort unique keys that don't contain partial segments before other keys:
set HA_KEY_HAS_PART_KEY_SEG flag for such keys in the mysql_prepare_table(),
use it in the sort_keys();
Diffstat (limited to 'mysql-test/t/innodb_mysql.test')
-rw-r--r-- | mysql-test/t/innodb_mysql.test | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mysql-test/t/innodb_mysql.test b/mysql-test/t/innodb_mysql.test index f64efd600c5..13aa6afd701 100644 --- a/mysql-test/t/innodb_mysql.test +++ b/mysql-test/t/innodb_mysql.test @@ -960,4 +960,13 @@ SELECT * FROM t1 ORDER BY b DESC, a ASC; DROP TABLE t1; +# +# Bug #31137: Assertion failed: primary_key_no == -1 || primary_key_no == 0 +# +create table t1(a char(10) not null, unique key aa(a(1)), + b char(4) not null, unique key bb(b(4))) engine=innodb; +desc t1; +show create table t1; +drop table t1; + --echo End of 5.0 tests |