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 | 3e7becb9c37313df742316e2ea37f547aafa1670 (patch) | |
tree | 12215ce7c080a1a2ab6d1de62d6cb0dd7957a223 /innobase/rem | |
parent | bf244baa92cff0a9dbe48814d85fc984ca394307 (diff) | |
download | mariadb-git-3e7becb9c37313df742316e2ea37f547aafa1670.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 'innobase/rem')
-rw-r--r-- | innobase/rem/rem0cmp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/innobase/rem/rem0cmp.c b/innobase/rem/rem0cmp.c index 7c33476fb9e..6a463b7d4cf 100644 --- a/innobase/rem/rem0cmp.c +++ b/innobase/rem/rem0cmp.c @@ -99,7 +99,8 @@ cmp_types_are_equal( /* out: TRUE if the types are considered equal in comparisons */ dtype_t* type1, /* in: type 1 */ - dtype_t* type2) /* in: type 2 */ + dtype_t* type2, /* in: type 2 */ + ibool check_charsets) /* in: whether to check charsets */ { if (dtype_is_non_binary_string_type(type1->mtype, type1->prtype) && dtype_is_non_binary_string_type(type2->mtype, type2->prtype)) { @@ -107,12 +108,12 @@ cmp_types_are_equal( /* Both are non-binary string types: they can be compared if and only if the charset-collation is the same */ - if (dtype_get_charset_coll(type1->prtype) - == dtype_get_charset_coll(type2->prtype)) { + if (check_charsets) { + return(dtype_get_charset_coll(type1->prtype) + == dtype_get_charset_coll(type2->prtype)); + } else { return(TRUE); } - - return(FALSE); } if (dtype_is_binary_string_type(type1->mtype, type1->prtype) |