diff options
author | unknown <aivanov@mysql.com> | 2005-12-06 22:02:40 +0300 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2005-12-06 22:02:40 +0300 |
commit | b83c29766c916c67194c56d12f0b4542402e1e85 (patch) | |
tree | 12215ce7c080a1a2ab6d1de62d6cb0dd7957a223 /sql/ha_innodb.cc | |
parent | c9bf8e28a86c6eec53bb20d657e667c5fe1dbe88 (diff) | |
download | mariadb-git-b83c29766c916c67194c56d12f0b4542402e1e85.tar.gz |
Fix BUG#14747: "Race condition can cause btr_search_drop_page_hash_index()
to crash".
Changes from snapshot innodb-5.0-ss52.
Note that buf_block_t::index should be protected by btr_search_latch
or an s-latch or x-latch on the index page.
btr_search_drop_page_hash_index(): Read block->index while holding
btr_search_latch and use the cached value in the loop. Remove some
redundant assertions.
Also fix 13778. When FOREIGN_KEY_CHECKS=0 we still need to check that
datatypes between foreign key references are compatible.
Also added test cases to 9802.
innobase/btr/btr0sea.c:
Changes from innodb-5.0-ss52
innobase/dict/dict0dict.c:
Changes from innodb-5.0-ss52
innobase/dict/dict0load.c:
Changes from innodb-5.0-ss52
innobase/include/buf0buf.h:
Changes from innodb-5.0-ss52
innobase/include/dict0dict.h:
Changes from innodb-5.0-ss52
innobase/include/dict0load.h:
Changes from innodb-5.0-ss52
innobase/include/rem0cmp.h:
Changes from innodb-5.0-ss52
innobase/rem/rem0cmp.c:
Changes from innodb-5.0-ss52
innobase/row/row0mysql.c:
Changes from innodb-5.0-ss52
mysql-test/r/innodb.result:
Changes from innodb-5.0-ss52
mysql-test/t/innodb.test:
Changes from innodb-5.0-ss52
sql/ha_innodb.cc:
Changes from innodb-5.0-ss52
sql/ha_innodb.h:
Changes from innodb-5.0-ss52
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index 56e5fd8923f..6c8dc9f81f6 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -2519,6 +2519,12 @@ ha_innobase::open( DBUG_RETURN(0); } +uint +ha_innobase::max_supported_key_part_length() const +{ + return(DICT_MAX_INDEX_COL_LEN - 1); +} + /********************************************************************** Closes a handle to an InnoDB table. */ @@ -4675,6 +4681,9 @@ create_index( 0, prefix_len); } + /* Even though we've defined max_supported_key_part_length, we + still do our own checking using field_lengths to be absolutely + sure we don't create too long indexes. */ error = row_create_index_for_mysql(index, trx, field_lengths); error = convert_error_code_to_mysql(error, NULL); |