Commit 9141bb58 authored by Joerg Bruehe's avatar Joerg Bruehe

Merge 5.5.6-rc to the main tree.

parents f6bddff8 be348787
...@@ -111,9 +111,9 @@ ...@@ -111,9 +111,9 @@
On some platforms (e.g. Mac OS X and Solaris) the ebx register On some platforms (e.g. Mac OS X and Solaris) the ebx register
is held as a pointer to the global offset table. Thus we're not is held as a pointer to the global offset table. Thus we're not
allowed to use the b-register on those platforms when compiling allowed to use the b-register on those platforms when compiling
PIC code, to avoid this we push ebx and pop ebx and add a movl PIC code, to avoid this we push ebx and pop ebx. The new value
instruction to avoid having ebx in the interface of the assembler is copied directly from memory to avoid problems with a implicit
instruction. manipulation of the stack pointer by the push.
cmpxchg8b works on both 32-bit platforms and 64-bit platforms but cmpxchg8b works on both 32-bit platforms and 64-bit platforms but
the code here is only used on 32-bit platforms, on 64-bit the code here is only used on 32-bit platforms, on 64-bit
...@@ -121,11 +121,13 @@ ...@@ -121,11 +121,13 @@
fine. fine.
*/ */
#define make_atomic_cas_body64 \ #define make_atomic_cas_body64 \
int32 ebx=(set & 0xFFFFFFFF), ecx=(set >> 32); \ asm volatile ("push %%ebx;" \
asm volatile ("push %%ebx; movl %3, %%ebx;" \ "movl (%%ecx), %%ebx;" \
LOCK_prefix "; cmpxchg8b %0; setz %2; pop %%ebx" \ "movl 4(%%ecx), %%ecx;" \
LOCK_prefix "; cmpxchg8b %0;" \
"setz %2; pop %%ebx" \
: "=m" (*a), "+A" (*cmp), "=c" (ret) \ : "=m" (*a), "+A" (*cmp), "=c" (ret) \
: "m" (ebx), "c" (ecx), "m" (*a) \ : "c" (&set), "m" (*a) \
: "memory", "esp") : "memory", "esp")
#endif #endif
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include "my_global.h" #include "my_global.h"
#include "my_pthread.h" #include "my_pthread.h"
#include "my_atomic.h"
#include "sql_plugin.h" #include "sql_plugin.h"
#include "mysql/plugin.h" #include "mysql/plugin.h"
#include "ha_perfschema.h" #include "ha_perfschema.h"
...@@ -28,6 +29,17 @@ ...@@ -28,6 +29,17 @@
#include "pfs_instr_class.h" #include "pfs_instr_class.h"
#include "pfs_instr.h" #include "pfs_instr.h"
#ifdef MY_ATOMIC_MODE_DUMMY
/*
The performance schema can can not function with MY_ATOMIC_MODE_DUMMY,
a fully functional implementation of MY_ATOMIC should be used instead.
If the build fails with this error message:
- either use a different ./configure --with-atomic-ops option
- or do not build with the performance schema.
*/
#error "The performance schema needs a functional MY_ATOMIC implementation."
#endif
handlerton *pfs_hton= NULL; handlerton *pfs_hton= NULL;
static handler* pfs_create_handler(handlerton *hton, static handler* pfs_create_handler(handlerton *hton,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment