Commit 50c42620 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-16544 - crash in ha_sphinx::create()

Use table_arg that was passed to the function, instead of dereferencing
this->table, which is a NULL pointer.
parent 1e37fa70
......@@ -3440,7 +3440,7 @@ int ha_sphinx::create ( const char * name, TABLE * table_arg, HA_CREATE_INFO * )
if (
table_arg->s->keys!=1 ||
table_arg->key_info[0].user_defined_key_parts!=1 ||
strcasecmp ( table_arg->key_info[0].key_part[0].field->field_name, table->field[2]->field_name ) )
strcasecmp ( table_arg->key_info[0].key_part[0].field->field_name, table_arg->field[2]->field_name ) )
{
my_snprintf ( sError, sizeof(sError), "%s: there must be an index on '%s' column",
name, table_arg->field[2]->field_name );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment