summaryrefslogtreecommitdiff
path: root/storage/perfschema
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@oracle.com>2010-09-09 14:28:47 -0600
committerMarc Alff <marc.alff@oracle.com>2010-09-09 14:28:47 -0600
commitc9ab025dcd7f74ff9d6db09a584980383c840853 (patch)
tree3718b7a7a2696d7956ed38321bdc34fa2c25f284 /storage/perfschema
parent712a8a2eb904165daee43746ae5c63b90b0bae6f (diff)
downloadmariadb-git-c9ab025dcd7f74ff9d6db09a584980383c840853.tar.gz
Bug#56521 Assertion failed: (m_state == 2), function allocated_to_free, pfs_lock.h (138)
Before this fix, it was possible to build the server: - with the performance schema - with a dummy implementation of my_atomic (MY_ATOMIC_MODE_DUMMY). In this case, the resulting binary will just crash, as this configuration is not supported. This fix enforces that the build will fail with a compilation error in this configuration, instead of resulting in a broken binary.
Diffstat (limited to 'storage/perfschema')
-rw-r--r--storage/perfschema/ha_perfschema.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/storage/perfschema/ha_perfschema.cc b/storage/perfschema/ha_perfschema.cc
index 0fac734f7a0..b7b6b03f8c5 100644
--- a/storage/perfschema/ha_perfschema.cc
+++ b/storage/perfschema/ha_perfschema.cc
@@ -19,6 +19,7 @@
*/
#include "my_global.h"
+#include "my_atomic.h"
#include "my_pthread.h"
#include "sql_plugin.h"
#include "mysql/plugin.h"
@@ -28,6 +29,17 @@
#include "pfs_instr_class.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;
static handler* pfs_create_handler(handlerton *hton,