Skip to content

Commit 62e0447

Browse files
Problem:
An error message shows a variable that is not available to change. Analysis: Several error messages have an explicit reference to @@SESSION.GTID_NEXT_LIST. The issue is that SESSION.GTID_NEXT_LIST is not available to be changed and nor it should be, since it is a future feature to be integrated in NDB, thus not being available in the server mainline. The error messages are misleading to a user. Fix: Change the error messages in order to state the only possible source of error. Also corrected the binlog tests that were expecting that specific message.
1 parent e6d927d commit 62e0447

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

mysql-test/suite/binlog/r/binlog_gtid_errors.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ AUTOMATIC
179179
# can't set inside transaction
180180
BEGIN;
181181
SET @@SESSION.GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:12';
182-
ERROR HY000: When @@SESSION.GTID_NEXT_LIST == NULL, the system variable @@SESSION.GTID_NEXT cannot change inside a transaction.
182+
ERROR HY000: The system variable @@SESSION.GTID_NEXT cannot change inside a transaction.
183183
INSERT INTO t1 VALUES (4);
184184
ROLLBACK;
185185
# can't set while owning a GTID
@@ -197,14 +197,14 @@ SET @@SESSION.GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:14';
197197
# can't do implicit commit while gtid_next=SID:GNO
198198
BEGIN;
199199
CREATE TABLE t2 (a INT);
200-
ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC or @@SESSION.GTID_NEXT_LIST != NULL.
200+
ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC.
201201
ROLLBACK;
202202
SET GTID_NEXT = 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa:15';
203203
# can't do implicit commit while gtid_next=SID:GNO
204204
SET AUTOCOMMIT = 0;
205205
INSERT INTO t1 VALUES (1);
206206
CREATE TABLE t2 (a INT);
207-
ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC or @@SESSION.GTID_NEXT_LIST != NULL.
207+
ERROR HY000: Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC.
208208
ROLLBACK;
209209
SELECT @@SESSION.GTID_NEXT;
210210
@@SESSION.GTID_NEXT

sql/share/errmsg-utf8.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6724,7 +6724,7 @@ ER_GTID_NEXT_IS_NOT_IN_GTID_NEXT_LIST
67246724
eng "The system variable @@SESSION.GTID_NEXT has the value %.200s, which is not listed in @@SESSION.GTID_NEXT_LIST."
67256725

67266726
ER_CANT_CHANGE_GTID_NEXT_IN_TRANSACTION_WHEN_GTID_NEXT_LIST_IS_NULL
6727-
eng "When @@SESSION.GTID_NEXT_LIST == NULL, the system variable @@SESSION.GTID_NEXT cannot change inside a transaction."
6727+
eng "The system variable @@SESSION.GTID_NEXT cannot change inside a transaction."
67286728

67296729
ER_SET_STATEMENT_CANNOT_INVOKE_FUNCTION
67306730
eng "The statement 'SET %.200s' cannot invoke a stored function."
@@ -6754,7 +6754,7 @@ ER_AUTO_POSITION_REQUIRES_GTID_MODE_ON
67546754
eng "CHANGE MASTER TO MASTER_AUTO_POSITION = 1 can only be executed when @@GLOBAL.GTID_MODE = ON."
67556755

67566756
ER_CANT_DO_IMPLICIT_COMMIT_IN_TRX_WHEN_GTID_NEXT_IS_SET
6757-
eng "Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC or @@SESSION.GTID_NEXT_LIST != NULL."
6757+
eng "Cannot execute statements with implicit commit inside a transaction when @@SESSION.GTID_NEXT != AUTOMATIC."
67586758

67596759
ER_GTID_MODE_2_OR_3_REQUIRES_ENFORCE_GTID_CONSISTENCY_ON
67606760
eng "@@GLOBAL.GTID_MODE = ON or UPGRADE_STEP_2 requires @@GLOBAL.ENFORCE_GTID_CONSISTENCY = 1."

0 commit comments

Comments
 (0)