Skip to content
Permalink
Browse files
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.
  • Loading branch information
vaintroub committed Aug 4, 2018
1 parent d453374 commit f4e2db5
Showing 1 changed file with 1 addition and 1 deletion.
@@ -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 );

0 comments on commit f4e2db5

Please sign in to comment.