a real table can be created even read_only = 1
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
MySQL Server |
Unknown
|
Unknown
|
||||
Percona Server moved to https://jira.percona.com/projects/PS | Status tracked in 5.7 | |||||
5.1 |
Won't Fix
|
Low
|
Unassigned | |||
5.5 |
Triaged
|
Low
|
Unassigned | |||
5.6 |
Triaged
|
Low
|
Unassigned | |||
5.7 |
Fix Released
|
Low
|
Unassigned |
Bug Description
this bug has been reported here: http://
I've written my analyses there (user: zhai weixiang) based on percona5.5.18, here just copy it
test case:
xx@test 09:59:54>show variables like 'read_only%';
+------
| Variable_name | Value |
+------
| read_only | ON |
+------
1 row in set (0.00 sec)
xx@test 09:59:58>select @@version;
+------------+
| @@version |
+------------+
| 5.5.22-log |
+------------+
1 row in set (0.00 sec)
xx@test 10:00:22>create table t(foo varchar(12), bar varchar(24));
ERROR 1290 (HY000): The MySQL server is running with the --read-only option so it cannot execute this statement
xx@test 10:02:38>create temporary table t(id bigint unsigned not null primary key);
Query OK, 0 rows affected (0.04 sec)
xx@test 10:02:43>create table t(foo varchar(12), bar varchar(24));
Query OK, 0 rows affected (0.00 sec)
-------
deny_updates_
i guess there must be some problem with the following code in deny_updates_
const my_bool update_real_tables=
some_
!(create_
Generally some_non_
but actully the return value of some_non_
function some_non_
static bool some_non_
{
for (TABLE_LIST *table= tables; table; table= table->next_global)
{
DBUG_
if (table->updating && !find_temporary
return 1;
}
return 0;
}
so i think the value of update_real_tables should be calculated like this :
const my_bool update_real_tables=
(lex-
!(create_
I don't know my guess is correct , but this small change really works
Changed in percona-server: | |
status: | New → Confirmed |
Changed in percona-server: | |
importance: | Undecided → Low |
status: | Confirmed → Triaged |
tags: | added: upstream |
from the comment of http:// bugs.mysql. com/bug. php?id= 64992, this bug was fixed in 5.7.0.
But I can't find any information about 5.7.0 and I don't know how they fix this bug.