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

Temporary fix for handling wild_one at end of string (key compression).

Full fix shall be in MySQL 4.1. (This is a hard one (!))
This commit is contained in:
jani@prima.mysql.fi
2000-12-08 00:34:16 +02:00
parent 3e4697c8b2
commit c475a9885d
2 changed files with 6 additions and 0 deletions

View File

@ -1116,6 +1116,11 @@ static bool like_range(const char *ptr,uint ptr_length,char escape,
*min_str++= *max_str++ = *ptr;
}
*min_length= *max_length = (uint) (min_str - min_org);
/* Temporary fix for handling wild_one at end of string (key compression) */
for (char *tmp= min_str ; tmp > min_org && tmp[-1] == '\0';)
*--tmp=' ';
while (min_str != min_end)
*min_str++ = *max_str++ = ' '; // Because if key compression
return 0;