2925 Mikael Ronstrom 2009-11-20
WL#5105, review fix
modified:
mysys/ptr_cmp.c
2924 Mikael Ronstrom 2009-11-20 [merge]
WL#5105, Optimize ptr_cmp on Solaris by using memcmp instead of native ptr_cmp
modified:
mysys/ptr_cmp.c
=== modified file 'mysys/ptr_cmp.c'
--- a/mysys/ptr_cmp.c 2009-09-23 13:15:35 +0000
+++ b/mysys/ptr_cmp.c 2009-11-20 19:01:43 +0000
@@ -22,7 +22,7 @@
#include "mysys_priv.h"
#include <myisampack.h>
-#ifdef UNIV_SOLARIS
+#ifdef TARGET_OS_SOLARIS
/*
* On Solaris, memcmp() is normally faster than the unrolled ptr_compare_N
* functions, as memcmp() is usually a platform-specific implementation
@@ -39,20 +39,20 @@ static int native_compare(size_t *length
return memcmp(*a, *b, *length);
}
-#else /* UNIV_SOLARIS */
+#else /* TARGET_OS_SOLARIS */
static int ptr_compare(size_t *compare_length, uchar **a, uchar **b);
static int ptr_compare_0(size_t *compare_length, uchar **a, uchar **b);
static int ptr_compare_1(size_t *compare_length, uchar **a, uchar **b);
static int ptr_compare_2(size_t *compare_length, uchar **a, uchar **b);
static int ptr_compare_3(size_t *compare_length, uchar **a, uchar **b);
-#endif /* UNIV_SOLARIS */
+#endif /* TARGET_OS_SOLARIS */
/* Get a pointer to a optimal byte-compare function for a given size */
qsort2_cmp get_ptr_compare (size_t size)
{
-#ifdef UNIV_SOLARIS
+#ifdef TARGET_OS_SOLARIS
return (qsort2_cmp) native_compare;
#else
if (size < 4)
@@ -64,7 +64,7 @@ qsort2_cmp get_ptr_compare (size_t size)
case 3: return (qsort2_cmp) ptr_compare_3;
}
return 0; /* Impossible */
-#endif /* UNIV_SOLARIS */
+#endif /* TARGET_OS_SOLARIS */
}
Attachment: [text/bzr-bundle] bzr/mikael@mysql.com-20091120190143-j58hacjfvmi1w381.bundle
| Thread |
|---|
| • bzr push into mysql-5.6-next-mr branch (mikael:2924 to 2925) WL#5105 | Mikael Ronstrom | 20 Nov |