mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
Fixed problem with ISNULL on fields that could not be null
This commit is contained in:
parent
cad553de49
commit
1f66df4d47
1 changed files with 10 additions and 8 deletions
|
@ -449,17 +449,19 @@ public:
|
|||
void update_used_tables()
|
||||
{
|
||||
if (!args[0]->maybe_null)
|
||||
used_tables_cache=0; /* is always false */
|
||||
{
|
||||
used_tables_cache= 0; /* is always false */
|
||||
cached_value= (longlong) 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
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;
|
||||
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; }
|
||||
|
|
Loading…
Reference in a new issue