Commit 762419a5 authored by Marko Mäkelä's avatar Marko Mäkelä

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.
parent f2c1c959
/* Copyright (c) 2000, 2013, Oracle and/or its affiliates. /* 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 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 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) ...@@ -4728,7 +4728,7 @@ Item_cond::eval_not_null_tables(uchar *opt_arg)
if (item->const_item() && !item->with_param && if (item->const_item() && !item->with_param &&
!item->is_expensive() && !cond_has_datetime_is_null(item)) !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 ..." a. This is "... AND true_cond AND ..."
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment