From 5867396a8d1574090ea90af24bcb97a5cb841457 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Mon, 16 Mar 2009 16:11:45 +0100 Subject: Bug#36446: Attempt to set @@join_buffer_size to its minimum value produces spurious warning If a sys-var has a base and a block-size>1, and then a user-supplied value >= minimum ended up below minimum thanks to block-size alignment, we threw a warning. This meant for instance that when getting, then setting the minimum, we'd see a warning. This was needlessly confusing. (updated patch) --- mysys/my_getopt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'mysys/my_getopt.c') diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index 48174a40c21..54410fc3d1e 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -846,7 +846,8 @@ longlong getopt_ll_limit_value(longlong num, const struct my_option *optp, if (num < optp->min_value) { num= optp->min_value; - adjusted= TRUE; + if (old < optp->min_value) + adjusted= TRUE; } if (fix) @@ -917,7 +918,8 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp, if (num < (ulonglong) optp->min_value) { num= (ulonglong) optp->min_value; - adjusted= TRUE; + if (old < optp->min_value) + adjusted= TRUE; } if (fix) -- cgit v1.2.1