diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-06-06 17:51:28 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-06-06 17:51:28 +0200 |
commit | 4749d40c635634e25e07d28ce1a04e9263bcc375 (patch) | |
tree | c5bb3287675cd8676d76c8ee42ef2d79cc599e25 /storage/myisam/mi_write.c | |
parent | 1ff1cb10fc236010b5969058cab934c2b306c931 (diff) | |
parent | 33ef993773449cb3917665b188f6b6575d399bd0 (diff) | |
download | mariadb-git-4749d40c635634e25e07d28ce1a04e9263bcc375.tar.gz |
5.5 merge
Diffstat (limited to 'storage/myisam/mi_write.c')
-rw-r--r-- | storage/myisam/mi_write.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c index 60ea7757827..011df5e8eb9 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; } |