summaryrefslogtreecommitdiff
path: root/storage/myisam/mi_unique.c
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2006-03-10 17:52:28 +0100
committerunknown <ingo@mysql.com>2006-03-10 17:52:28 +0100
commitb63e25d55d0c949efed4f451492357fe4b1d3386 (patch)
treece85c7c3ed6125d7d5bbe1cdf0c9d301fcb539f6 /storage/myisam/mi_unique.c
parent54715b8bb69a0b212557a3542ae12b38a1fca120 (diff)
parentcefb1dc2743ee50c83f075897a9e0b3c4f303b68 (diff)
downloadmariadb-git-b63e25d55d0c949efed4f451492357fe4b1d3386.tar.gz
Merge mysql.com:/home/mydev/mysql-5.0-bug14980
into mysql.com:/home/mydev/mysql-5.1-bug14980 include/my_base.h: Auto merged mysql-test/r/myisam.result: Auto merged storage/myisam/mi_delete.c: Auto merged storage/myisam/mi_key.c: Auto merged storage/myisam/mi_rnext_same.c: Auto merged storage/myisam/mi_unique.c: Auto merged storage/myisam/mi_update.c: Auto merged storage/myisam/mi_write.c: Auto merged
Diffstat (limited to 'storage/myisam/mi_unique.c')
-rw-r--r--storage/myisam/mi_unique.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/storage/myisam/mi_unique.c b/storage/myisam/mi_unique.c
index 34f5f595f30..b698968127b 100644
--- a/storage/myisam/mi_unique.c
+++ b/storage/myisam/mi_unique.c
@@ -30,6 +30,9 @@ my_bool mi_check_unique(MI_INFO *info, MI_UNIQUEDEF *def, byte *record,
mi_unique_store(record+key->seg->start, unique_hash);
_mi_make_key(info,def->key,key_buff,record,0);
+ /* The above changed info->lastkey2. Inform mi_rnext_same(). */
+ info->update&= ~HA_STATE_RNEXT_SAME;
+
if (_mi_search(info,info->s->keyinfo+def->key,key_buff,MI_UNIQUE_HASH_LENGTH,
SEARCH_FIND,info->s->state.key_root[def->key]))
{