summaryrefslogtreecommitdiff
path: root/sql/set_var.h
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2018-04-10 17:43:18 +0300
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2018-04-10 17:43:18 +0300
commit45e6d0aebf023acb50671f82b87e6de5d1e78f5e (patch)
treec6079a18e158706a0a877d1b522ceb851d6055b5 /sql/set_var.h
parentf5cb66fb97101bc0f17ff879025fd7146c032cbc (diff)
parent2e91eb7547dfc7c9a999568bd8245832bbcfefaa (diff)
downloadmariadb-git-45e6d0aebf023acb50671f82b87e6de5d1e78f5e.tar.gz
Merge branch '10.1' into 10.2
Diffstat (limited to 'sql/set_var.h')
-rw-r--r--sql/set_var.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h
index 97dc3b5ba51..7a48e319466 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -399,6 +399,16 @@ int sql_set_variables(THD *thd, List<set_var_base> *var_list, bool free);
set_sys_var_value_origin(&VAR, sys_var::AUTO); \
} while(0)
+#define SYSVAR_AUTOSIZE_IF_CHANGED(VAR,VAL,TYPE) \
+ do { \
+ TYPE tmp= (VAL); \
+ if (VAR != tmp) \
+ { \
+ VAR= (VAL); \
+ set_sys_var_value_origin(&VAR, sys_var::AUTO); \
+ } \
+ } while(0)
+
void set_sys_var_value_origin(void *ptr, enum sys_var::where here);
enum sys_var::where get_sys_var_value_origin(void *ptr);