From 762419a5732fceb5c7ed5728cd7d22b4d82ff74c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 26 Mar 2019 17:19:05 +0200 Subject: [PATCH] Fixup for MDEV-18968 Item_cond::eval_not_null_tables(): Use Item::eval_const_cond(), just like Item_cond::fix_fields(). This inconsistency was found while merging to 10.3, where the Microsoft compiler is configured to report an error for comparing longlong to bool. --- sql/item_cmpfunc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 28e94275c85..4e572b95ea3 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -1,5 +1,5 @@ /* Copyright (c) 2000, 2013, Oracle and/or its affiliates. - Copyright (c) 2009, 2016, MariaDB + Copyright (c) 2009, 2019, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -4728,7 +4728,7 @@ Item_cond::eval_not_null_tables(uchar *opt_arg) if (item->const_item() && !item->with_param && !item->is_expensive() && !cond_has_datetime_is_null(item)) { - if (item->val_int() == is_and_cond && top_level()) + if (item->eval_const_cond() == is_and_cond && top_level()) { /* a. This is "... AND true_cond AND ..."