Skip to content

Commit 66bd23f

Browse files
Tor Didriksendahlerlend
authored andcommitted
BUG#32288105: MYSQL CRASHES IMMEDIATELY AFTER SELECTING FROM
INFORMATION_SCHEMA Post-push fix for ASAN failure: ==117066==ERROR: AddressSanitizer: stack-use-after-scope on address .. Move tmp_name out to a scope where it is still alive when used later. Change-Id: Ic87b9808d0e2d0dec3a7437109516b67940150b2
1 parent 821bddc commit 66bd23f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

storage/innobase/dict/dict0dd.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ int dd_table_open_on_dd_obj(THD *thd, dd::cache::Dictionary_client *client,
443443
}
444444

445445
const char *table_name = tbl_name;
446+
char tmp_name[FN_REFLEN + 1];
446447
if (!tbl_name) {
447448
dd::Schema *schema;
448449
error = client->acquire_uncached<dd::Schema>(dd_table.schema_id(), &schema);
@@ -451,7 +452,6 @@ int dd_table_open_on_dd_obj(THD *thd, dd::cache::Dictionary_client *client,
451452
}
452453

453454
bool truncated;
454-
char tmp_name[FN_REFLEN + 1];
455455
build_table_filename(tmp_name, sizeof(tmp_name) - 1, schema->name().c_str(),
456456
dd_table.name().c_str(), nullptr, 0, &truncated);
457457

0 commit comments

Comments
 (0)