summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-02-18 09:58:25 +0200
committerunknown <bell@sanja.is.com.ua>2003-02-18 09:58:25 +0200
commit65c3935eb6298ef191b14f10ad0a8cfcac859f35 (patch)
tree2156efeba8148010cccde9154f2cf5ff9751d6af
parentad7cb289a49c97c4f45b860d04198ae042db013f (diff)
parent4fb4ef23d7be6315fd35ac34d6b7cc0190f288ce (diff)
downloadmariadb-git-65c3935eb6298ef191b14f10ad0a8cfcac859f35.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/mysql-3.23
into sanja.is.com.ua:/home/bell/mysql/work-3.23
-rw-r--r--sql/item_cmpfunc.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 5105eb9279d..c33042e11ab 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -449,17 +449,19 @@ public:
void update_used_tables()
{
if (!args[0]->maybe_null)
- used_tables_cache=0; /* is always false */
- else
{
- args[0]->update_used_tables();
- used_tables_cache=args[0]->used_tables();
+ used_tables_cache= 0; /* is always false */
+ cached_value= (longlong) 0;
}
- if (!used_tables_cache)
+ else
{
- /* Remember if the value is always NULL or never NULL */
- args[0]->val();
- cached_value= args[0]->null_value ? (longlong) 1 : (longlong) 0;
+ args[0]->update_used_tables();
+ if (!(used_tables_cache=args[0]->used_tables()))
+ {
+ /* Remember if the value is always NULL or never NULL */
+ args[0]->val();
+ cached_value= args[0]->null_value ? (longlong) 1 : (longlong) 0;
+ }
}
}
optimize_type select_optimize() const { return OPTIMIZE_NULL; }