Skip to content

Commit 687bfa7

Browse files
committed
bugfix: properly reset db_plugin when hlindex discovery fails
otherwise it'll be free'd twice
1 parent 613542d commit 687bfa7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sql/handler.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6430,7 +6430,10 @@ int ha_create_table(THD *thd, const char *path, const char *db,
64306430
LEX_CSTRING sql= mhnsw_hlindex_table_def(thd, ref_length);
64316431
if ((error= index_share.init_from_sql_statement_string(thd, false,
64326432
sql.str, sql.length)))
6433+
{
6434+
index_share.db_plugin= NULL;
64336435
break;
6436+
}
64346437

64356438
uint unused;
64366439
if ((error= ha_create_table_from_share(thd, &index_share, &index_cinfo,

0 commit comments

Comments
 (0)