Commit f4e2db5b 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 d453374f
......@@ -3441,7 +3441,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.str, table->field[2]->field_name.str ) )
strcasecmp ( table_arg->key_info[0].key_part[0].field->field_name.str, table_arg->field[2]->field_name.str ) )
{
my_snprintf ( sError, sizeof(sError), "%s: there must be an index on '%s' column",
name, table_arg->field[2]->field_name.str );
......
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