summaryrefslogtreecommitdiff
path: root/include/mysql
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-05-26 21:55:40 +0300
committerMichael Widenius <monty@askmonty.org>2010-05-26 21:55:40 +0300
commit4aa9d903c11554cc4887eeffe7f0592c52e8bc99 (patch)
treeaf3f0dfb833c3c4aabaa69ce50cfb64202ecd479 /include/mysql
parent9febcb4776e563a93eb8fff247174b0e2eb2ae0b (diff)
parentaf6d89a6aa9feb3545de068f461cf91bfb281dd2 (diff)
downloadmariadb-git-4aa9d903c11554cc4887eeffe7f0592c52e8bc99.tar.gz
Merge with MySQL 5.1.47
Fixed some bugs introduced in 5.1.47 Disabled some tests until we have merged with latest Xtradb configure.in: Added testing if valgrind/memcheck.h exists storage/pbxt/src/ha_pbxt.cc: LOCK_plugin is not anymore locked in init
Diffstat (limited to 'include/mysql')
-rw-r--r--include/mysql/plugin.h39
-rw-r--r--include/mysql/plugin.h.pp3
2 files changed, 26 insertions, 16 deletions
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index b110f6dd62f..e1852f2929e 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -807,30 +807,37 @@ void mysql_query_cache_invalidate4(MYSQL_THD thd,
const char *key, unsigned int key_length,
int using_trx);
-#ifdef __cplusplus
-}
-#endif
-#ifdef __cplusplus
/**
Provide a handler data getter to simplify coding
*/
-inline
-void *
-thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton)
-{
- return *thd_ha_data(thd, hton);
-}
+void *thd_get_ha_data(const MYSQL_THD thd, const struct handlerton *hton);
+
/**
Provide a handler data setter to simplify coding
+
+ @details
+ Set ha_data pointer (storage engine per-connection information).
+
+ To avoid unclean deactivation (uninstall) of storage engine plugin
+ in the middle of transaction, additional storage engine plugin
+ lock is acquired.
+
+ If ha_data is not null and storage engine plugin was not locked
+ by thd_set_ha_data() in this connection before, storage engine
+ plugin gets locked.
+
+ If ha_data is null and storage engine plugin was locked by
+ thd_set_ha_data() in this connection before, storage engine
+ plugin lock gets released.
+
+ If handlerton::close_connection() didn't reset ha_data, server does
+ it immediately after calling handlerton::close_connection().
*/
-inline
-void
-thd_set_ha_data(const MYSQL_THD thd, const struct handlerton *hton,
- const void *ha_data)
-{
- *thd_ha_data(thd, hton)= (void*) ha_data;
+void thd_set_ha_data(MYSQL_THD thd, const struct handlerton *hton,
+ const void *ha_data);
+#ifdef __cplusplus
}
#endif
diff --git a/include/mysql/plugin.h.pp b/include/mysql/plugin.h.pp
index 2f44870b479..ac86f687723 100644
--- a/include/mysql/plugin.h.pp
+++ b/include/mysql/plugin.h.pp
@@ -139,3 +139,6 @@ void thd_get_xid(const void* thd, MYSQL_XID *xid);
void mysql_query_cache_invalidate4(void* thd,
const char *key, unsigned int key_length,
int using_trx);
+void *thd_get_ha_data(const void* thd, const struct handlerton *hton);
+void thd_set_ha_data(void* thd, const struct handlerton *hton,
+ const void *ha_data);