summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-02-17 01:07:29 +0200
committerunknown <monty@mashka.mysql.fi>2003-02-17 01:07:29 +0200
commit8b4e28f8eb75dfa87196fefcf39854e89378e00e (patch)
treeaf065a3ed5ab7336f4d82b13b0bf6d9d6c964254
parent73cc50e45d5ad498514ce6dd103f0a0e82162a5b (diff)
parent1f66df4d47bb3bcdbb10709ac1911362727547e8 (diff)
downloadmariadb-git-8b4e28f8eb75dfa87196fefcf39854e89378e00e.tar.gz
Merge mashka.mysql.fi:/home/my/mysql-3.23
into mashka.mysql.fi:/home/my/mysql-4.0 sql/item_cmpfunc.h: Auto merged
-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 aaa15f415e7..5efda9ce88c 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -465,17 +465,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; }