summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2019-03-26 11:37:18 +0400
committerAlexander Barkov <bar@mariadb.com>2019-03-26 11:37:18 +0400
commit6fbbb0853e7e58621f73f0afc600cd95995413ed (patch)
tree5206eecee6f4a398db8a24f7273c08f7d1e7afaa /sql/item.h
parented643f4bb31d8e5a9c0bc161583b8c9b2a08c26b (diff)
downloadmariadb-git-6fbbb0853e7e58621f73f0afc600cd95995413ed.tar.gz
MDEV-18968 Both (WHERE 0.1) and (WHERE NOT 0.1) return empty set
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 79cde008946..75ebcdb624c 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1000,6 +1000,13 @@ public:
virtual bool val_bool();
virtual String *val_nodeset(String*) { return 0; }
+ bool eval_const_cond()
+ {
+ DBUG_ASSERT(const_item());
+ DBUG_ASSERT(!is_expensive());
+ return val_bool();
+ }
+
/*
save_val() is method of val_* family which stores value in the given
field.