summaryrefslogtreecommitdiff
path: root/storage/spider
diff options
context:
space:
mode:
authorKentoku SHIBA <kentokushiba@gmail.com>2014-03-25 04:43:43 +0900
committerKentoku SHIBA <kentokushiba@gmail.com>2014-03-25 04:43:43 +0900
commit7d9342be70afecb98bc690b77f4055adb1e474dd (patch)
treea84cda50c627331b33845b1d72f3dc2fbdf94a85 /storage/spider
parent987f0a91cbe01b4f23f9f011640bac497ad9b8a3 (diff)
downloadmariadb-git-7d9342be70afecb98bc690b77f4055adb1e474dd.tar.gz
add version variables
Diffstat (limited to 'storage/spider')
-rw-r--r--storage/spider/spd_include.h3
-rw-r--r--storage/spider/spd_param.cc14
2 files changed, 16 insertions, 1 deletions
diff --git a/storage/spider/spd_include.h b/storage/spider/spd_include.h
index e8adaf85a68..f5938c705c7 100644
--- a/storage/spider/spd_include.h
+++ b/storage/spider/spd_include.h
@@ -13,6 +13,9 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#define SPIDER_DETAIL_VERSION "3.1.7"
+#define SPIDER_HEX_VERSION 0x0301
+
#if MYSQL_VERSION_ID < 50500
#else
#define my_free(A,B) my_free(A)
diff --git a/storage/spider/spd_param.cc b/storage/spider/spd_param.cc
index 134a68746a0..24670fb1447 100644
--- a/storage/spider/spd_param.cc
+++ b/storage/spider/spd_param.cc
@@ -2827,6 +2827,17 @@ uint spider_param_log_result_errors()
DBUG_RETURN(spider_log_result_errors);
}
+static char *spider_version = (char *) SPIDER_DETAIL_VERSION;
+static MYSQL_SYSVAR_STR(
+ version,
+ spider_version,
+ PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY,
+ "The version of Spider",
+ NULL,
+ NULL,
+ SPIDER_DETAIL_VERSION
+);
+
static struct st_mysql_storage_engine spider_storage_engine =
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
@@ -2954,6 +2965,7 @@ static struct st_mysql_sys_var* spider_system_variables[] = {
#endif
MYSQL_SYSVAR(general_log),
MYSQL_SYSVAR(log_result_errors),
+ MYSQL_SYSVAR(version),
NULL
};
@@ -2967,7 +2979,7 @@ mysql_declare_plugin(spider)
PLUGIN_LICENSE_GPL,
spider_db_init,
spider_db_done,
- 0x0301,
+ SPIDER_HEX_VERSION,
spider_status_variables,
spider_system_variables,
NULL,