1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

privent crash on temporary table during indexes lookup (BUG#4677)

This commit is contained in:
bell@sanja.is.com.ua
2004-07-22 14:05:00 +03:00
parent ed32dbbaf4
commit 76c0154e11
3 changed files with 19 additions and 2 deletions

View File

@ -2555,8 +2555,9 @@ bool get_key_map_from_key_list(key_map *map, TABLE *table,
map->clear_all();
while ((name=it++))
{
if ((pos= find_type(&table->keynames, name->ptr(), name->length(), 1)) <=
0)
if (table->keynames.type_names == 0 ||
(pos= find_type(&table->keynames, name->ptr(), name->length(), 1)) <=
0)
{
my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), name->c_ptr(),
table->real_name);