| Bug #107603 | new dd::Table has no se_private_data in ha::inlpace_alter | ||
|---|---|---|---|
| Submitted: | 20 Jun 2022 7:30 | Modified: | 20 Jun 2022 12:11 |
| Reporter: | Siyuan Ren | Email Updates: | |
| Status: | Not a Bug | Impact on me: | |
| Category: | MySQL Server: DDL | Severity: | S3 (Non-critical) |
| Version: | 8.0.27 | OS: | Any |
| Assigned to: | CPU Architecture: | Any | |
| Tags: | DDL | ||
[20 Jun 2022 12:11]
MySQL Verification Team
Hi Mr. Ren, Thank you for your bug report. However , it is not a bug. The code is arranged as is, because COPY is a default behaviour, while INPLACE has to satisfy a number of the conditions in order to be allowed. This is all described in our Reference Manual.

Description: NOT a bug, just throw a question. mysql_alter_table() { create_table_impl(no_ha_table=true, &non_dd_table_def); dd::Table *table_def = non_dd_table_def.get(); mysql_inplace_alter_table(altered_table_def=table_def) ha_commit_inplace_alter_table(new_table_def=altered_table_def); /* ALTER TABLE using copy algorithm. */ ha_create_table(); } In __INPLACE__ path, we have ha::*inplace_alter_table(dd::Table *new_table_def) which allows SE (with atomic DDL support) to adjust its own specific metadata in se_private_*. However, in the code path above, new_table_def has empty se_private_data, since there is the only invocation of ha::create() in __COPY__ path, rather than in __INPLACE__ path. So basically, is it designed intentionally, and based on what consideration? How to repeat: read the code.