summaryrefslogtreecommitdiffstats
path: root/storage/spider/ha_spider.h
diff options
context:
space:
mode:
Diffstat (limited to 'storage/spider/ha_spider.h')
-rw-r--r--storage/spider/ha_spider.h27
1 files changed, 25 insertions, 2 deletions
diff --git a/storage/spider/ha_spider.h b/storage/spider/ha_spider.h
index 4dffdf78..4c178a33 100644
--- a/storage/spider/ha_spider.h
+++ b/storage/spider/ha_spider.h
@@ -483,10 +483,10 @@ public:
bool auto_repair() const;
#endif
int disable_indexes(
- uint mode
+ key_map map, bool persist
);
int enable_indexes(
- uint mode
+ key_map map, bool persist
);
int check(
THD* thd,
@@ -792,3 +792,26 @@ public:
int lock_tables();
int dml_init();
};
+
+
+/* This is a hack for ASAN
+ * Libraries such as libxml2 and libodbc do not like being unloaded before
+ * exit and will show as a leak in ASAN with no stack trace (as the plugin
+ * has been unloaded from memory).
+ *
+ * The below is designed to trick the compiler into adding a "UNIQUE" symbol
+ * which can be seen using:
+ * readelf -s storage/spider/ha_spider.so | grep UNIQUE
+ *
+ * Having this symbol means that the plugin remains in memory after dlclose()
+ * has been called. Thereby letting the libraries clean up properly.
+ */
+#if defined(__SANITIZE_ADDRESS__)
+__attribute__((__used__))
+inline int dummy(void)
+{
+ static int d;
+ d++;
+ return d;
+}
+#endif