Skip to content

Commit 3e50e46

Browse files
committed
Lift restriction on setting read_only_error_msg_extra
Summary: Per request, we allow setting read_only_error_msg_extra without being in read_only state. The custom message can be set/reset at any time. Squash with https://reviews.facebook.net/D61713 Squash with https://reviews.facebook.net/D61677 (for main.range* test results) Test Plan: mtr Reviewers: santoshb Reviewed By: santoshb Subscribers: webscalesql-eng Differential Revision: https://reviews.facebook.net/D64125
1 parent 19277b0 commit 3e50e46

11 files changed

+264
-279
lines changed

mysql-test/r/range_all.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",
862862
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC");
863863
c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16
864864
Warnings:
865-
Warning 1927 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
865+
Warning 1926 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
866866
drop table t1;
867867
End of 4.1 tests
868868
CREATE TABLE t1 (

mysql-test/r/range_icp.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",
862862
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC");
863863
c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16
864864
Warnings:
865-
Warning 1927 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
865+
Warning 1926 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
866866
drop table t1;
867867
End of 4.1 tests
868868
CREATE TABLE t1 (

mysql-test/r/range_icp_mrr.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",
862862
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC");
863863
c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16
864864
Warnings:
865-
Warning 1927 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
865+
Warning 1926 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
866866
drop table t1;
867867
End of 4.1 tests
868868
CREATE TABLE t1 (

mysql-test/r/range_mrr.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",
862862
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC");
863863
c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16
864864
Warnings:
865-
Warning 1927 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
865+
Warning 1926 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
866866
drop table t1;
867867
End of 4.1 tests
868868
CREATE TABLE t1 (

mysql-test/r/range_mrr_cost.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",
862862
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC");
863863
c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16
864864
Warnings:
865-
Warning 1927 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
865+
Warning 1926 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
866866
drop table t1;
867867
End of 4.1 tests
868868
CREATE TABLE t1 (

mysql-test/r/range_none.result

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -861,7 +861,7 @@ and c10 in ("abcdefgh", "123456789", "qwertyuio", "asddfgh",
861861
"abcdefgC", "12345678C", "qwertyuiC", "asddfgC");
862862
c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 c16
863863
Warnings:
864-
Warning 1927 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
864+
Warning 1926 Memory capacity of 1536000 bytes for 'range_optimizer_max_mem_size' exceeded. Range optimization was not done for this query.
865865
drop table t1;
866866
End of 4.1 tests
867867
CREATE TABLE t1 (

mysql-test/r/range_with_memory_limit.result

Lines changed: 251 additions & 251 deletions
Large diffs are not rendered by default.

mysql-test/suite/sys_vars/r/read_only_error_msg_extra_basic.result

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
set @@global.read_only_error_msg_extra='Not in read_only';
2-
ERROR HY000: The system variable read_only_error_msg_extra can only be set in read-only (super) status.
1+
set @@global.read_only_error_msg_extra='Custom message before read_only';
2+
select @@global.read_only_error_msg_extra;
3+
@@global.read_only_error_msg_extra
4+
Custom message before read_only
35
set global read_only = true;
46
set @@global.read_only_error_msg_extra = default;
57
select @@global.read_only_error_msg_extra;

mysql-test/suite/sys_vars/t/read_only_error_msg_extra_basic.test

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
--source include/not_embedded.inc
22

3-
# Cannot set the value if server is not in read_only
4-
--error ER_VARIABLE_NOT_SETTABLE_WITHOUT_READ_ONLY
5-
set @@global.read_only_error_msg_extra='Not in read_only';
3+
set @@global.read_only_error_msg_extra='Custom message before read_only';
4+
select @@global.read_only_error_msg_extra;
65

76
set global read_only = true;
87
set @@global.read_only_error_msg_extra = default;

sql/share/errmsg-utf8.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7230,9 +7230,6 @@ ER_CONNECTION_TIMEOUT
72307230
ER_OPTION_PREVENTS_STATEMENT_EXTRA_INFO
72317231
eng "The MySQL server is running with the %s option so it cannot execute this statement. %s"
72327232

7233-
ER_VARIABLE_NOT_SETTABLE_WITHOUT_READ_ONLY
7234-
eng "The system variable %.200s can only be set in read-only (super) status."
7235-
72367233
ER_CAPACITY_EXCEEDED
72377234
eng "Memory capacity of %llu bytes for '%s' exceeded. %s"
72387235

0 commit comments

Comments
 (0)