Commit be9d923a authored by Alexey Botchkov's avatar Alexey Botchkov

MDEV-11917 enum/set command-line options aren't respecting max-* settings.

my_option strucures for command-line variables should be set properly.
parent 621caad3
...@@ -341,6 +341,8 @@ public: ...@@ -341,6 +341,8 @@ public:
substitute) substitute)
{ {
option.var_type|= GET_ENUM; option.var_type|= GET_ENUM;
option.min_value= 0;
option.max_value= ULONG_MAX;
global_var(ulong)= def_val; global_var(ulong)= def_val;
if ((option.u_max_value= (uchar**)max_var_ptr())) if ((option.u_max_value= (uchar**)max_var_ptr()))
{ {
...@@ -1349,6 +1351,8 @@ public: ...@@ -1349,6 +1351,8 @@ public:
substitute) substitute)
{ {
option.var_type|= GET_SET; option.var_type|= GET_SET;
option.min_value= 0;
option.max_value= ~0ULL;
global_var(ulonglong)= def_val; global_var(ulonglong)= def_val;
if ((option.u_max_value= (uchar**)max_var_ptr())) if ((option.u_max_value= (uchar**)max_var_ptr()))
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment