1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Manual merge.

This commit is contained in:
Alexey Kopytov
2009-10-15 14:42:51 +04:00
3 changed files with 31 additions and 0 deletions

View File

@ -5891,6 +5891,17 @@ get_mm_leaf(RANGE_OPT_PARAM *param, COND *conf_func, Field *field,
goto end;
}
field->table->in_use->variables.sql_mode= orig_sql_mode;
/*
Any sargable predicate except "<=>" involving NULL as a constant is always
FALSE
*/
if (type != Item_func::EQUAL_FUNC && field->is_real_null())
{
tree= &null_element;
goto end;
}
str= (uchar*) alloc_root(alloc, key_part->store_length+1);
if (!str)
goto end;