Skip to content

Commit be9d923

Browse files
author
Alexey Botchkov
committed
MDEV-11917 enum/set command-line options aren't respecting max-* settings.
my_option strucures for command-line variables should be set properly.
1 parent 621caad commit be9d923

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sql/sys_vars.ic

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -341,6 +341,8 @@ public:
341341
substitute)
342342
{
343343
option.var_type|= GET_ENUM;
344+
option.min_value= 0;
345+
option.max_value= ULONG_MAX;
344346
global_var(ulong)= def_val;
345347
if ((option.u_max_value= (uchar**)max_var_ptr()))
346348
{
@@ -1349,6 +1351,8 @@ public:
13491351
substitute)
13501352
{
13511353
option.var_type|= GET_SET;
1354+
option.min_value= 0;
1355+
option.max_value= ~0ULL;
13521356
global_var(ulonglong)= def_val;
13531357
if ((option.u_max_value= (uchar**)max_var_ptr()))
13541358
{

0 commit comments

Comments
 (0)