[MDEV-20692] When a slave server is running in read_only mode, and when connected as a user that does not have the SUPER privilege, it is not possible to create temporary tables using data from innodb real tables. Created: 2019-09-27 Updated: 2023-12-11 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Data Definition - Temporary |
| Affects Version/s: | 10.1, 10.3.18, 10.3, 10.4 |
| Fix Version/s: | 10.4, 10.5, 10.6, 10.11, 11.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Breno Brand Fernandes | Assignee: | Oleksandr Byelkin |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Environment: |
CentOS Linux release 7.6.1810 (Core) |
||
| Issue Links: |
|
||||||||
| Description |
|
When a slave server is running in read_only mode, and when connected as a user that does not have the SUPER privilege, it is not possible to create temporary tables using data from InnoDB real tables. However, when the data is from MyISAM real tables, it works.
As you can see, MariaDB returned an error when it was tried to create a temporary table using data from a InnoDB real table. |
| Comments |
| Comment by Alice Sherepa [ 2019-10-02 ] | |||||||||||||||||||
|
Thank you for the report! Reproducible on current 10.1-10.4:
| |||||||||||||||||||
| Comment by Marko Mäkelä [ 2023-12-11 ] | |||||||||||||||||||
|
The bug is outside the InnoDB storage engine. For CREATE TEMPORARY TABLE bar1, the transaction is being marked read-write here:
The reason is that ha_info->is_started() holds in handler::mark_trx_read_write_internal(). For the MyISAM table bar, we would have ht->slot=0 pointing to the following:
I am not familiar with the logic of "not started" transactions, so I can’t dig deeper to the root cause. |