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

Don't use ranges on HEAP tables with LIKE

Don't reconnect client on close
This commit is contained in:
monty@donna.mysql.fi
2001-04-17 03:55:25 +03:00
parent 561c18c116
commit 1e80c3f3e1
6 changed files with 13 additions and 10 deletions

View File

@ -919,6 +919,9 @@ get_mm_leaf(Field *field,KEY_PART *key_part,
if (type == Item_func::LIKE_FUNC)
{
if (!field->optimize_range())
DBUG_RETURN(0); // Can't optimize this
bool like_error;
char buff1[MAX_FIELD_WIDTH],*min_str,*max_str;
String tmp(buff1,sizeof(buff1)),*res;
@ -971,7 +974,8 @@ get_mm_leaf(Field *field,KEY_PART *key_part,
max_str+maybe_null,&min_length,&max_length);
else
#endif
like_error=like_range(res->ptr(),res->length(),wild_prefix,field_length,
like_error=like_range(res->ptr(),res->length(),wild_prefix,
field_length,
min_str+offset,max_str+offset,
max_sort_char,&min_length,&max_length);
}