summaryrefslogtreecommitdiff
path: root/sql/item_timefunc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_timefunc.cc')
-rw-r--r--sql/item_timefunc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc
index 22ca8a925db..39f869106b6 100644
--- a/sql/item_timefunc.cc
+++ b/sql/item_timefunc.cc
@@ -439,7 +439,7 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
strict_week_number= (*ptr=='V' || *ptr=='v');
tmp= (char*) val + min(val_len, 2);
if ((week_number= (int) my_strtoll10(val, &tmp, &error)) < 0 ||
- strict_week_number && !week_number ||
+ (strict_week_number && !week_number) ||
week_number > 53)
goto err;
val= tmp;
@@ -535,10 +535,10 @@ static bool extract_date_time(DATE_TIME_FORMAT *format,
%V,%v require %X,%x resprectively,
%U,%u should be used with %Y and not %X or %x
*/
- if (strict_week_number &&
+ if ((strict_week_number &&
(strict_week_number_year < 0 ||
- strict_week_number_year_type != sunday_first_n_first_week_non_iso) ||
- !strict_week_number && strict_week_number_year >= 0)
+ strict_week_number_year_type != sunday_first_n_first_week_non_iso)) ||
+ (!strict_week_number && strict_week_number_year >= 0))
goto err;
/* Number of days since year 0 till 1st Jan of this year */