diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-26 17:19:05 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-03-26 17:21:34 +0200 |
commit | 762419a5732fceb5c7ed5728cd7d22b4d82ff74c (patch) | |
tree | e62047ebeb57c46fe80008613c17247d679ec0a4 | |
parent | f2c1c9590c7d5bdff0d7c95985cb1a5154a96786 (diff) | |
download | mariadb-git-762419a5732fceb5c7ed5728cd7d22b4d82ff74c.tar.gz |
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.
-rw-r--r-- | sql/item_cmpfunc.cc | 4 |
1 files 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 ..." |