Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
10.5.8
-
None
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:
CREATE TABLE test (
|
id int(10),
|
stock_level int(10),
|
PRIMARY KEY (id)
|
);
|
|
INSERT INTO test (id, stock_level) VALUES (1, 2);
|
On read-only replica, the following fails:
CREATE TEMPORARY TABLE temp_test_fails (
|
id int(10),
|
stock_level int(10),
|
PRIMARY KEY (id)
|
)
|
SELECT
|
id,
|
stock_level
|
FROM
|
test
|
;
|
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:
CREATE TEMPORARY TABLE temp_test_ok (
|
id int(10),
|
stock_level int(10),
|
PRIMARY KEY (id)
|
);
|
|
INSERT INTO temp_test_ok SELECT id, stock_level FROM test;
|
Attachments
Issue Links
- is duplicated by
-
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.
- Confirmed