mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
merge with 3.23.51
This commit is contained in:
@ -430,6 +430,7 @@ class Item_func_in :public Item_int_func
|
||||
|
||||
class Item_func_isnull :public Item_bool_func
|
||||
{
|
||||
longlong cached_value;
|
||||
public:
|
||||
Item_func_isnull(Item *a) :Item_bool_func(a) {}
|
||||
longlong val_int();
|
||||
@ -450,6 +451,12 @@ public:
|
||||
args[0]->update_used_tables();
|
||||
used_tables_cache=args[0]->used_tables();
|
||||
}
|
||||
if (!used_tables_cache)
|
||||
{
|
||||
/* 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; }
|
||||
};
|
||||
|
Reference in New Issue
Block a user