Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.2(EOL)
-
None
Description
Take a look dict_hdr_get_new_id() in 10.2:
void |
dict_hdr_get_new_id(
|
...
|
)
|
{
|
...
|
mtr_start(&mtr);
|
if (table) { |
if (table->is_temporary()) { |
mtr.set_log_mode(MTR_LOG_NO_REDO);
|
}
|
}
|
...
|
dict_hdr = dict_hdr_get(&mtr);
|
if (table_id) { |
id = mach_read_from_8(dict_hdr + DICT_HDR_TABLE_ID);
|
id++;
|
mlog_write_ull(dict_hdr + DICT_HDR_TABLE_ID, id, &mtr);
|
*table_id = id;
|
}
|
...
|
mtr_commit(&mtr);
|
}
|
If a table is temporary, log mode is set to MTR_LOG_NO_REDO. But then table id is increased and written back to space 0. But it's not logged due to log mode.
The proper fix is:
MDEV-17794 Do not assign persistent ID for temporary tables
The workaround is to remove
if (table->is_temporary()) { |
mtr.set_log_mode(MTR_LOG_NO_REDO);
|
}
|
from dict_hdr_get_new_id().
Attachments
Issue Links
- relates to
-
MDEV-17794 Do not assign persistent ID for temporary tables
- Closed