mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
memcpy_overlap() removed, as
1. it's wrong to use memcpy() for overlapped areas; 2. we use it only once. During merge to 4.1 will remove a memcpy_overlap() call from strings/ctype-tis620.c as well in order to fix bug #10836: ctype_tis620 test failure with ICC-compiled binaries on IA64. myisam/mi_search.c: use memmove() instead, as memcpy_overlap() is removed.
This commit is contained in:
@ -119,16 +119,6 @@ extern void bmove_allign(gptr dst,const gptr src,uint len);
|
|||||||
#define bmove512(A,B,C) memcpy(A,B,C)
|
#define bmove512(A,B,C) memcpy(A,B,C)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_purify
|
|
||||||
#include <assert.h>
|
|
||||||
#define memcpy_overlap(A,B,C) \
|
|
||||||
DBUG_ASSERT((A) <= (B) || ((B)+(C)) <= (A)); \
|
|
||||||
bmove((byte*) key,(byte*) from,(size_t) length);
|
|
||||||
#else
|
|
||||||
#define memcpy_overlap(A,B,C) memcpy((A), (B), (C))
|
|
||||||
#endif /* HAVE_purify */
|
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for string functions */
|
/* Prototypes for string functions */
|
||||||
|
|
||||||
#if !defined(bfill) && !defined(HAVE_BFILL)
|
#if !defined(bfill) && !defined(HAVE_BFILL)
|
||||||
|
@ -1306,7 +1306,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag,
|
|||||||
}
|
}
|
||||||
DBUG_PRINT("info",("key: %p from: %p length: %u",
|
DBUG_PRINT("info",("key: %p from: %p length: %u",
|
||||||
key, from, length));
|
key, from, length));
|
||||||
memcpy_overlap((byte*) key, (byte*) from, (size_t) length);
|
memmove((byte*) key, (byte*) from, (size_t) length);
|
||||||
key+=length;
|
key+=length;
|
||||||
from+=length;
|
from+=length;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user