diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-09-06 22:31:30 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-09-06 22:31:30 +0200 |
commit | b838d081ad346e52787753b1799c627922c4a6c7 (patch) | |
tree | dc8f1e21e6b40d5b72668571c570c9a3214fbf32 /include | |
parent | 824db55ce53963a64fcf648b54500df22c57e9b2 (diff) | |
parent | 72c36f4415815d55ddb82b23682f3c549906c00e (diff) | |
download | mariadb-git-b838d081ad346e52787753b1799c627922c4a6c7.tar.gz |
mysql-5.5.33 merge
Diffstat (limited to 'include')
-rw-r--r-- | include/my_getopt.h | 3 | ||||
-rw-r--r-- | include/my_global.h | 5 | ||||
-rw-r--r-- | include/mysql/plugin.h | 11 |
3 files changed, 16 insertions, 3 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h index a56be90f455..0f5898a0aa3 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -120,6 +120,9 @@ double getopt_double_limit_value(double num, const struct my_option *optp, my_bool *fix); my_bool getopt_compare_strings(const char *s, const char *t, uint length); +ulonglong getopt_double2ulonglong(double); +double getopt_ulonglong2double(ulonglong); + C_MODE_END #endif /* _my_getopt_h */ diff --git a/include/my_global.h b/include/my_global.h index 2f097847c89..583eb43af8f 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1,5 +1,5 @@ /* - Copyright (c) 2001, 2012, Oracle and/or its affiliates. + Copyright (c) 2001, 2013, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -390,8 +390,7 @@ C_MODE_END #define compile_time_assert(X) \ do \ { \ - typedef char compile_time_assert[(X) ? 1 : -1] \ - __attribute__((unused)); \ + typedef char compile_time_assert[(X) ? 1 : -1] __attribute__((unused)); \ } while(0) #endif diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index d28b762ce37..74b37c5f229 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -206,6 +206,7 @@ typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, char *) #define PLUGIN_VAR_STR 0x0005 #define PLUGIN_VAR_ENUM 0x0006 #define PLUGIN_VAR_SET 0x0007 +#define PLUGIN_VAR_DOUBLE 0x0008 #define PLUGIN_VAR_UNSIGNED 0x0080 #define PLUGIN_VAR_THDLOCAL 0x0100 /* Variable is per-connection */ #define PLUGIN_VAR_READONLY 0x0200 /* Server variable is read only */ @@ -388,6 +389,11 @@ DECLARE_MYSQL_SYSVAR_TYPELIB(name, unsigned long long) = { \ PLUGIN_VAR_SET | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, &varname, def, typelib } +#define MYSQL_SYSVAR_DOUBLE(name, varname, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_SYSVAR_SIMPLE(name, double) = { \ + PLUGIN_VAR_DOUBLE | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, &varname, def, min, max, blk } + #define MYSQL_THDVAR_BOOL(name, opt, comment, check, update, def) \ DECLARE_MYSQL_THDVAR_BASIC(name, char) = { \ PLUGIN_VAR_BOOL | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ @@ -438,6 +444,11 @@ DECLARE_MYSQL_THDVAR_TYPELIB(name, unsigned long long) = { \ PLUGIN_VAR_SET | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ #name, comment, check, update, -1, def, NULL, typelib } +#define MYSQL_THDVAR_DOUBLE(name, opt, comment, check, update, def, min, max, blk) \ +DECLARE_MYSQL_THDVAR_SIMPLE(name, double) = { \ + PLUGIN_VAR_DOUBLE | PLUGIN_VAR_THDLOCAL | ((opt) & PLUGIN_VAR_MASK), \ + #name, comment, check, update, -1, def, min, max, blk, NULL } + /* accessor macros */ #define SYSVAR(name) \ |