Skip to content

Commit

Permalink
MDEV-17402 slave_transaction_retry_errors="12701" won't be enabled (#…
Browse files Browse the repository at this point in the history
…1346)

error code 12701 is already included in default value, but other plugin specific error codes are ignored because of checking with ER_ERROR_LAST. ER_ERROR_LAST does not include plugin specific error codes. So I just removed it for fixing this issue.
  • Loading branch information
Kentoku committed Jun 28, 2019
1 parent b7b0bc8 commit 1635ea9
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 1 deletion.
2 changes: 1 addition & 1 deletion sql/slave.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ bool init_slave_transaction_retry_errors(const char* arg)
{
if (!(p= str2int(p, 10, 0, LONG_MAX, &err_code)))
break;
if (err_code > 0 && err_code < ER_ERROR_LAST)
if (err_code > 0)
slave_transaction_retry_errors[i++]= (uint) err_code;
while (!my_isdigit(system_charset_info,*p) && *p)
p++;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--connection slave1_1
--disable_warnings
--disable_query_log
--disable_result_log
--source ../include/deinit_spider.inc
--source ../t/slave_test_deinit.inc
--source ../t/test_deinit.inc
--enable_result_log
--enable_query_log
--enable_warnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--disable_warnings
--disable_query_log
--disable_result_log
--source ../t/test_init.inc
--source ../t/slave_test_init.inc
--connection slave1_1
--source ../include/init_spider.inc
--enable_result_log
--enable_query_log
--enable_warnings
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
for master_1
for child2
child2_1
child2_2
child2_3
for child3
for slave1_1

connection slave1_1;
SHOW VARIABLES LIKE 'slave_transaction_retry_errors';
Variable_name Value
slave_transaction_retry_errors 1158,1159,1160,1161,1205,1213,1429,2013,12701,10000,20000,30000
connection slave1_1;
for slave1_1
for master_1
for child2
child2_1
child2_2
child2_3
for child3

end of test
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
!include include/default_mysqld.cnf
!include ../my_1_1.cnf
!include ../my_2_1.cnf
!include ../my_4_1.cnf
[mysqld.4.1]
slave_transaction_retry_errors="10000,20000,30000"
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
--source ../include/slave_transaction_retry_errors_5digit_init.inc
--echo

--connection slave1_1
SHOW VARIABLES LIKE 'slave_transaction_retry_errors';

--source ../include/slave_transaction_retry_errors_5digit_deinit.inc
--echo
--echo end of test

0 comments on commit 1635ea9

Please sign in to comment.