Details
-
Task
-
Status: Stalled (View Workflow)
-
Critical
-
Resolution: Unresolved
Description
InnoDB is adding both persistent and temporary tables to a dict_sys->table_hash, which maps table names to dict_table_t.
We should only add persistent tables to the hash table, and we should not store any dict_table_t::name for temporary tables. It would be nice to store the user-specified table name instead of some #sql name, but RENAME TABLE is not being propagated to temporary tables.
The reason why we currently need the table name lookup is that handler::delete_table() can be invoked on temporary tables without prior handler::open(), so the only information that is available is the table name.
If THD::rm_temporary_table() were invoked with TABLE_SHARE, we could store the dict_table_t* or dict_table_t::id there by invoking handler::set_ha_share_ptr() and handler::get_ha_share_ptr().
For persistent tables, we will need both name and ID based lookups for the time being. (InnoDB rollback and purge will look up tables by ID, and the SQL layer will have to look up persistent tables by name.)
As part of this task, please ensure that the table name printed in errors will be the real table name, not the temporary table name:
InnoDB: Cannot add field `NEW` in table `tmp`.`#sql-temptable-10e7-7aa21-13bb` because after adding it, the row size is 8204 which is greater than maximum allowed size (8126 bytes) for a record
|
Attachments
Issue Links
- is blocked by
-
MDEV-17794 Do not assign persistent ID for temporary tables
-
- Closed
-
-
MDEV-25064 rpl.rpl_parallel_temptable failed in bb, ASAN heap-use-after-free in std::__atomic_base<long>::store
-
- Closed
-
- relates to
-
MDEV-26152 Assertion: prebuilt->template_type == ROW_MYSQL_WHOLE_ROW fails in row0mysql.cc line 1752
-
- Confirmed
-
-
MDEV-26433 assertion: table->get_ref_count() == 0 in dict0dict.cc line 1915
-
- Closed
-
-
MDEV-34049 InnoDB: Failing assertion: table->get_ref_count() == 0 in dict_sys_t::remove on DROP
-
- Closed
-
-
MDEV-35154 dict_sys_t::load_table() is holding exclusive dict_sys.latch for unnecessarily long time
-
- Confirmed
-
-
MDEV-12459 The information_schema tables for getting temporary tables info is missing, at least for innodb there is no INNODB_TEMP_TABLE_INFO
-
- Closed
-
-
MDEV-34051 SIGSEGV in dict_table_t::is_active_ddl during XA ... INSERT IGNORE
-
- Confirmed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue is blocked by |
Status | Open [ 1 ] | Confirmed [ 10101 ] |
Attachment | MDEV-17805-wip.patch [ 46734 ] |
Status | Confirmed [ 10101 ] | In Progress [ 3 ] |
Assignee | Marko Mäkelä [ marko ] | Sergey Vojtovich [ svoj ] |
Assignee | Sergey Vojtovich [ svoj ] | Sergei Golubchik [ serg ] |
Status | In Progress [ 3 ] | In Review [ 10002 ] |
Assignee | Sergei Golubchik [ serg ] | Sergey Vojtovich [ svoj ] |
Status | In Review [ 10002 ] | Stalled [ 10000 ] |
Fix Version/s | 10.5 [ 23123 ] | |
Fix Version/s | 10.4 [ 22408 ] |
Fix Version/s | 10.6 [ 24028 ] | |
Fix Version/s | 10.5 [ 23123 ] |
Assignee | Sergey Vojtovich [ svoj ] | Marko Mäkelä [ marko ] |
Link |
This issue is blocked by |
Link |
This issue is blocked by |
Assignee | Marko Mäkelä [ marko ] | Sergei Golubchik [ serg ] |
Fix Version/s | 10.6 [ 24028 ] |
Fix Version/s | 10.6 [ 24028 ] |
Affects Version/s | 10.2.2 [ 22013 ] | |
Affects Version/s | 10.3.0 [ 22127 ] | |
Affects Version/s | 10.4.0 [ 23115 ] | |
Issue Type | Bug [ 1 ] | Task [ 3 ] |
Fix Version/s | 10.6 [ 24028 ] |
Link | This issue relates to MDEV-26152 [ MDEV-26152 ] |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 90830 ] | MariaDB v4 [ 131707 ] |
Link |
This issue relates to |
Fix Version/s | 11.4 [ 29301 ] |
Priority | Major [ 3 ] | Critical [ 2 ] |
Link |
This issue is blocked by |
Priority | Critical [ 2 ] | Major [ 3 ] |
Description |
InnoDB is adding both persistent and temporary tables to a {{dict_sys->table_hash}}, which maps table names to {{dict_table_t}}.
We should only add persistent tables to the hash table, and we should not store any {{dict_table_t::name}} for temporary tables. It would be nice to store the user-specified table name instead of some {{#sql}} name, but {{RENAME TABLE}} is not being propagated to temporary tables. The reason why we currently need the table name lookup is that {{handler::delete_table()}} can be invoked on temporary tables without prior {{handler::open()}}, so the only information that is available is the table name. If {{THD::rm_temporary_table()}} were invoked with {{TABLE_SHARE}}, we could store the {{dict_table_t*}} or {{dict_table_t::id}} there by invoking {{handler::set_ha_share_ptr()}} and {{handler::get_ha_share_ptr()}}. For persistent tables, we will need both name and ID based lookups for the time being. (InnoDB rollback and purge will look up tables by ID, and the SQL layer will have to look up persistent tables by name.) |
InnoDB is adding both persistent and temporary tables to a {{dict_sys->table_hash}}, which maps table names to {{dict_table_t}}.
We should only add persistent tables to the hash table, and we should not store any {{dict_table_t::name}} for temporary tables. It would be nice to store the user-specified table name instead of some {{#sql}} name, but {{RENAME TABLE}} is not being propagated to temporary tables. The reason why we currently need the table name lookup is that {{handler::delete_table()}} can be invoked on temporary tables without prior {{handler::open()}}, so the only information that is available is the table name. If {{THD::rm_temporary_table()}} were invoked with {{TABLE_SHARE}}, we could store the {{dict_table_t*}} or {{dict_table_t::id}} there by invoking {{handler::set_ha_share_ptr()}} and {{handler::get_ha_share_ptr()}}. For persistent tables, we will need both name and ID based lookups for the time being. (InnoDB rollback and purge will look up tables by ID, and the SQL layer will have to look up persistent tables by name.) As part of this task, please ensure that the table name printed in errors will be the real table name, not the temporary table name: InnoDB: Cannot add field `NEW` in table `tmp`.`#sql-temptable-10e7-7aa21-13bb` because after adding it, the row size is 8204 which is greater than maximum allowed size (8126 bytes) for a record |
Labels | performance temporary | CS0443108 performance temporary |
Labels | CS0443108 performance temporary | performance temporary |
Status | Stalled [ 10000 ] | Needs Feedback [ 10501 ] |
Status | Needs Feedback [ 10501 ] | Open [ 1 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Assignee | Sergei Golubchik [ serg ] | Julien Fritsch [ julien.fritsch ] |
Status | In Progress [ 3 ] | Stalled [ 10000 ] |
Assignee | Julien Fritsch [ julien.fritsch ] | Sergei Golubchik [ serg ] |
Fix Version/s | 11.5 [ 29506 ] | |
Fix Version/s | 11.4 [ 29301 ] |
Fix Version/s | 11.6 [ 29515 ] | |
Fix Version/s | 11.5 [ 29506 ] |
Link | This issue relates to MDEV-34051 [ MDEV-34051 ] |
Description |
InnoDB is adding both persistent and temporary tables to a {{dict_sys->table_hash}}, which maps table names to {{dict_table_t}}.
We should only add persistent tables to the hash table, and we should not store any {{dict_table_t::name}} for temporary tables. It would be nice to store the user-specified table name instead of some {{#sql}} name, but {{RENAME TABLE}} is not being propagated to temporary tables. The reason why we currently need the table name lookup is that {{handler::delete_table()}} can be invoked on temporary tables without prior {{handler::open()}}, so the only information that is available is the table name. If {{THD::rm_temporary_table()}} were invoked with {{TABLE_SHARE}}, we could store the {{dict_table_t*}} or {{dict_table_t::id}} there by invoking {{handler::set_ha_share_ptr()}} and {{handler::get_ha_share_ptr()}}. For persistent tables, we will need both name and ID based lookups for the time being. (InnoDB rollback and purge will look up tables by ID, and the SQL layer will have to look up persistent tables by name.) As part of this task, please ensure that the table name printed in errors will be the real table name, not the temporary table name: InnoDB: Cannot add field `NEW` in table `tmp`.`#sql-temptable-10e7-7aa21-13bb` because after adding it, the row size is 8204 which is greater than maximum allowed size (8126 bytes) for a record |
InnoDB is adding both persistent and temporary tables to a {{dict_sys->table_hash}}, which maps table names to {{dict_table_t}}.
We should only add persistent tables to the hash table, and we should not store any {{dict_table_t::name}} for temporary tables. It would be nice to store the user-specified table name instead of some {{#sql}} name, but {{RENAME TABLE}} is not being propagated to temporary tables. The reason why we currently need the table name lookup is that {{handler::delete_table()}} can be invoked on temporary tables without prior {{handler::open()}}, so the only information that is available is the table name. If {{THD::rm_temporary_table()}} were invoked with {{TABLE_SHARE}}, we could store the {{dict_table_t*}} or {{dict_table_t::id}} there by invoking {{handler::set_ha_share_ptr()}} and {{handler::get_ha_share_ptr()}}. For persistent tables, we will need both name and ID based lookups for the time being. (InnoDB rollback and purge will look up tables by ID, and the SQL layer will have to look up persistent tables by name.) As part of this task, please ensure that the table name printed in errors will be the real table name, not the temporary table name: {noformat} InnoDB: Cannot add field `NEW` in table `tmp`.`#sql-temptable-10e7-7aa21-13bb` because after adding it, the row size is 8204 which is greater than maximum allowed size (8126 bytes) for a record {noformat} |
Fix Version/s | 11.7 [ 29815 ] | |
Fix Version/s | 11.6 [ 29515 ] |
Zendesk Related Tickets | 202463 |
Fix Version/s | 11.8 [ 29921 ] | |
Fix Version/s | 11.7 [ 29815 ] |
Link | This issue relates to MDEV-35154 [ MDEV-35154 ] |
Link |
This issue relates to |
Fix Version/s | 11.9 [ 29945 ] | |
Fix Version/s | 11.8 [ 29921 ] |
Priority | Major [ 3 ] | Minor [ 4 ] |
Assignee | Sergei Golubchik [ serg ] | Marko Mäkelä [ marko ] |
Priority | Minor [ 4 ] | Critical [ 2 ] |
Assignee | Marko Mäkelä [ marko ] | Sergei Golubchik [ serg ] |
Fix Version/s | 12.1 [ 29992 ] | |
Fix Version/s | 12.0 [ 29945 ] |
svoj provided an untested MDEV-17805-wip.patch
, which should provide TABLE_SHARE when dropping temporary tables. The InnoDB part remains to be written.