[MDEV-25592] CREATE TEMPORARY TABLE ... SELECT syntax fails on read-only replica Created: 2021-05-04 Updated: 2023-03-19 Resolved: 2023-03-19 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Replication |
| Affects Version/s: | 10.5.8 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Major |
| Reporter: | Ross Motley | Assignee: | Unassigned |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
We have recently undergone a migration of our app from MySQL 5.6 to MariaDB 10.5.8, and encountered the following change in behaviour between the two. On MariaDB 10.5.8, the following fails: Create a table on primary:
On read-only replica, the following fails:
The error message is "The MariaDB server is running with the --read-only option so it cannot execute this statement". It does still seem to create the temporary table, but doesn't insert any data. However, those statements will run if they are split up:
|
| Comments |
| Comment by Alice Sherepa [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
I could not repeat it, please add your .cnf file(s) and describe how to reproduce the problem again, how replication was setted up, etc
| ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ross Motley [ 2021-05-04 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Alice, I have tried again with specifying the Engine. It fails with InnoDb, and works with Aria and MyISAM. Failing:
The servers have been created at AWS RDS, I can try and dig out what parameters we have altered from the default ones if that's useful - if the above isn't reproducible for you. Thanks, Ross | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Alice Sherepa [ 2021-05-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Hi Ross,
from slave+master. And SHOW GRANTS. | ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ross Motley [ 2021-05-05 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
Hi, It doesn't seem possible to access the `information_schema.system_variables` table on RDS. Here are the RDS user params we have set, and the RDS system params: User params:
System params:
The output of `SHOW GRANTS` is the same on both primary/replica:
| ||||||||||||||||||||||||||||||||||||||||||||||
| Comment by Elena Stepanova [ 2023-03-19 ] | ||||||||||||||||||||||||||||||||||||||||||||||
|
This is likely to be a duplicate of MDEV-20692. |