From 82eb2c6de05787cda48745bcf4225be7b5a9870e Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 2 Oct 2012 12:53:20 +0300 Subject: fixed MDEV-568: Wrong result for a hash index look-up if the index is unique and the key is NULL Check ability of index to be NULL as it made in MyISAM. UNIQUE with NULL could have several NULL entries so we have to continue even if ve have found a row. --- storage/heap/hp_rkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'storage/heap') diff --git a/storage/heap/hp_rkey.c b/storage/heap/hp_rkey.c index 27d1114770e..3069b955844 100644 --- a/storage/heap/hp_rkey.c +++ b/storage/heap/hp_rkey.c @@ -63,7 +63,7 @@ int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key, info->update= 0; DBUG_RETURN(my_errno); } - if (!(keyinfo->flag & HA_NOSAME)) + if ((keyinfo->flag & (HA_NOSAME | HA_NULL_PART_KEY)) != HA_NOSAME) memcpy(info->lastkey, key, (size_t) keyinfo->length); } memcpy(record, pos, (size_t) share->reclength); -- cgit v1.2.1 From bc5232a65d395f60fdc46703f30d051a70470382 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 30 Oct 2012 23:05:55 +0100 Subject: MDEV-672 : storage/maria and storage/perfschema do not appear to honor WITH_UNIT_TESTS Disable compiling unit tests if WITH_UNIT_TEST is FALSE. Also, fix CMake code to allow compilation WITHOUT_ARIA_STORAGE_ENGINE --- storage/heap/CMakeLists.txt | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'storage/heap') diff --git a/storage/heap/CMakeLists.txt b/storage/heap/CMakeLists.txt index 0b9372bf224..3a0c2e7271c 100644 --- a/storage/heap/CMakeLists.txt +++ b/storage/heap/CMakeLists.txt @@ -21,8 +21,10 @@ SET(HEAP_SOURCES _check.c _rectest.c hp_block.c hp_clear.c hp_close.c hp_create MYSQL_ADD_PLUGIN(heap ${HEAP_SOURCES} STORAGE_ENGINE MANDATORY RECOMPILE_FOR_EMBEDDED) -ADD_EXECUTABLE(hp_test1 hp_test1.c) -TARGET_LINK_LIBRARIES(hp_test1 heap mysys dbug strings) +IF(WITH_UNIT_TESTS) + ADD_EXECUTABLE(hp_test1 hp_test1.c) + TARGET_LINK_LIBRARIES(hp_test1 heap mysys dbug strings) -ADD_EXECUTABLE(hp_test2 hp_test2.c) -TARGET_LINK_LIBRARIES(hp_test2 heap mysys dbug strings) + ADD_EXECUTABLE(hp_test2 hp_test2.c) + TARGET_LINK_LIBRARIES(hp_test2 heap mysys dbug strings) +ENDIF() \ No newline at end of file -- cgit v1.2.1