summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorunknown <malff/marcsql@weblab.(none)>2007-09-04 12:25:54 -0600
committerunknown <malff/marcsql@weblab.(none)>2007-09-04 12:25:54 -0600
commitc458f7f6a3b6cf6754c9843d6801c9b0f86ffe48 (patch)
treee709d9cce3d8a2b77acda70637623f1faf7eb64f /include
parent943ed8fe354734fa52417bf36920462ab23756d3 (diff)
parent6bfae914a2a0e7661c75c030b0bf88c8490323ed (diff)
downloadmariadb-git-c458f7f6a3b6cf6754c9843d6801c9b0f86ffe48.tar.gz
Merge weblab.(none):/home/marcsql/TREE/mysql-5.1-base
into weblab.(none):/home/marcsql/TREE/mysql-5.1-rt50-merge mysql-test/r/sp.result: Auto merged mysql-test/t/mysql.test: Auto merged mysql-test/t/query_cache.test: Auto merged mysql-test/t/sp.test: Auto merged sql/item_cmpfunc.h: Auto merged sql/rpl_utility.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_lex.cc: Auto merged sql/sql_lex.h: Auto merged
Diffstat (limited to 'include')
-rw-r--r--include/my_global.h12
-rw-r--r--include/mysql/plugin.h23
2 files changed, 29 insertions, 6 deletions
diff --git a/include/my_global.h b/include/my_global.h
index 8b6cdef8daa..12129523939 100644
--- a/include/my_global.h
+++ b/include/my_global.h
@@ -562,12 +562,6 @@ int __void__;
#define PURIFY_OR_LINT_INIT(var)
#endif
-/* Define some useful general macros */
-#if !defined(max)
-#define max(a, b) ((a) > (b) ? (a) : (b))
-#define min(a, b) ((a) < (b) ? (a) : (b))
-#endif
-
#if !defined(HAVE_UINT)
#undef HAVE_UINT
#define HAVE_UINT
@@ -1508,4 +1502,10 @@ inline void operator delete[](void*, void*) { /* Do nothing */ }
/* Length of decimal number represented by INT64. */
#define MY_INT64_NUM_DECIMAL_DIGITS 21
+/* Define some useful general macros (should be done after all headers). */
+#if !defined(max)
+#define max(a, b) ((a) > (b) ? (a) : (b))
+#define min(a, b) ((a) < (b) ? (a) : (b))
+#endif
+
#endif /* my_global_h */
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index 61ed7be738f..50ec051d111 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -785,5 +785,28 @@ void mysql_query_cache_invalidate4(MYSQL_THD thd,
}
#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);
+}
+
+/**
+ Provide a handler data setter to simplify coding
+*/
+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;
+}
+#endif
+
#endif