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