[MDEV-17983] CREATE TEMPORARY TABLE is inconsistent when refusing InnoDB table options Created: 2018-12-12 Updated: 2023-04-27 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Storage Engine - InnoDB |
| Affects Version/s: | 10.2.2, 10.3.0, 10.4.0 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Marko Mäkelä | Assignee: | Vladislav Lesin |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | create_table, temporary | ||
| Issue Links: |
|
||||||||
| Description |
|
Starting with MariaDB Server 10.2.2, CREATE TEMPORARY TABLE in InnoDB actually creates temporary tables instead of persistent, redo-logged tables like it used to do. These tables are always created in a shared temporary tablespace. However, CREATE TEMPORARY TABLE is not consistent when checking whether the table attributes are valid. The setting innodb_file_per_table should have no effect on the creation of temporary tables, but unfortunately it does have an effect:
The first CREATE TEMPORARY TABLE succeeds, but the second one will fail:
serg suggested that we should issue errors if IGNORE_BAD_TABLE_OPTIONS sql_mode is not set, and warnings otherwise. To check for that option, it looks like thd_is_strict_mode() should be replaced with something that returns the sql_mode flags, or a new accessor function should be added. When fixing this, please consider also the TRUNCATE code path, which was last fixed in |