diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-05-07 13:05:09 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-05-07 13:05:09 +0200 |
commit | b381cf843c841151f96541b19bd753cd3bbae326 (patch) | |
tree | dfc377a1dfbd4d2044a0b799ff5ed6411c7e864f /storage/myisam | |
parent | d4be9e7bc0cfd5ddd444ecc64daa4166597ca2eb (diff) | |
parent | e5055e22f1f311fa48457cfcc97b72e93a37329f (diff) | |
download | mariadb-git-b381cf843c841151f96541b19bd753cd3bbae326.tar.gz |
mysql-5.5.31 merge
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/mi_write.c | 7 | ||||
-rw-r--r-- | storage/myisam/myisampack.c | 3 |
2 files changed, 6 insertions, 4 deletions
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c index 70cc96d0cba..7bb063f2c10 100644 --- a/storage/myisam/mi_write.c +++ b/storage/myisam/mi_write.c @@ -85,9 +85,10 @@ int mi_write(MI_INFO *info, uchar *record) /* Calculate and check all unique constraints */ for (i=0 ; i < share->state.header.uniques ; i++) { - if (mi_check_unique(info,share->uniqueinfo+i,record, - mi_unique_hash(share->uniqueinfo+i,record), - HA_OFFSET_ERROR)) + MI_UNIQUEDEF *def= share->uniqueinfo + i; + if (mi_is_key_active(share->state.key_map, def->key) && + mi_check_unique(info, def, record, mi_unique_hash(def, record), + HA_OFFSET_ERROR)) goto err2; } diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c index 5d6b03ff4b8..3b115bcba09 100644 --- a/storage/myisam/myisampack.c +++ b/storage/myisam/myisampack.c @@ -2143,7 +2143,8 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees) */ if (!(packed_tree=(uint*) my_alloca(sizeof(uint)*length*2))) { - my_error(EE_OUTOFMEMORY,MYF(ME_BELL),sizeof(uint)*length*2); + my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATALERROR), + sizeof(uint)*length*2); return 0; } |