1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Portability fixes

Fixed bug in end space handle for WHERE text_column="constant"
This commit is contained in:
monty@mysql.com
2004-08-26 18:26:38 +03:00
parent 4ca548bcc6
commit ea687ba5da
28 changed files with 254 additions and 164 deletions

View File

@@ -551,21 +551,19 @@ static ulong get_sort(uint count,...)
uint chars= 0;
uint wild_pos= 0; /* first wildcard position */
if (start= str)
if ((start= str))
{
for (; *str ; str++)
{
if (*str == wild_many || *str == wild_one || *str == wild_prefix)
{
wild_pos= str - start + 1;
wild_pos= (uint) (str - start) + 1;
break;
}
else
chars++;
chars= 128; // Marker that chars existed
}
}
sort= (sort << 8) + (wild_pos ? (wild_pos > 127 ? 127 : wild_pos) :
(chars ? 128 : 0));
sort= (sort << 8) + (wild_pos ? min(wild_pos, 127) : chars);
}
va_end(args);
return sort;