From be9d923af2b1b9bfe4ce3e2cf06ead957cf6129c Mon Sep 17 00:00:00 2001 From: Alexey Botchkov Date: Wed, 20 Jun 2018 22:45:10 +0400 Subject: [PATCH] MDEV-11917 enum/set command-line options aren't respecting max-* settings. my_option strucures for command-line variables should be set properly. --- sql/sys_vars.ic | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sql/sys_vars.ic b/sql/sys_vars.ic index b92867f98e1..ffd08608e19 100644 --- a/sql/sys_vars.ic +++ b/sql/sys_vars.ic @@ -341,6 +341,8 @@ public: substitute) { option.var_type|= GET_ENUM; + option.min_value= 0; + option.max_value= ULONG_MAX; global_var(ulong)= def_val; if ((option.u_max_value= (uchar**)max_var_ptr())) { @@ -1349,6 +1351,8 @@ public: substitute) { option.var_type|= GET_SET; + option.min_value= 0; + option.max_value= ~0ULL; global_var(ulonglong)= def_val; if ((option.u_max_value= (uchar**)max_var_ptr())) {