MDEV-7775 Wrong error message (Unknown error) when idle sessions are killed after wait_timeout
restore the error message that was removed by mistake in ec38c1bbd709
This commit is contained in:
parent
a98ecc2aaf
commit
2220480731
3
mysql-test/r/wait_timeout_not_windows.result
Normal file
3
mysql-test/r/wait_timeout_not_windows.result
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
set global log_warnings=2;
|
||||||
|
set @@wait_timeout=1;
|
||||||
|
set global log_warnings=@@log_warnings;
|
15
mysql-test/t/wait_timeout_not_windows.test
Normal file
15
mysql-test/t/wait_timeout_not_windows.test
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
source include/not_windows.inc;
|
||||||
|
|
||||||
|
#
|
||||||
|
# MDEV-7775 Wrong error message (Unknown error) when idle sessions are killed after wait_timeout
|
||||||
|
#
|
||||||
|
set global log_warnings=2;
|
||||||
|
connect (foo,localhost,root);
|
||||||
|
set @@wait_timeout=1;
|
||||||
|
sleep 2;
|
||||||
|
connection default;
|
||||||
|
let SEARCH_FILE=$MYSQLTEST_VARDIR/log/mysqld.1.err;
|
||||||
|
let SEARCH_RANGE= -50;
|
||||||
|
let SEARCH_PATTERN= Aborted.*Got timeout reading communication packets;
|
||||||
|
source include/search_pattern_in_file.inc;
|
||||||
|
set global log_warnings=@@log_warnings;
|
@ -1092,7 +1092,8 @@ void end_connection(THD *thd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!thd->killed && (net->error && net->vio != 0))
|
if (!thd->killed && (net->error && net->vio != 0))
|
||||||
thd->print_aborted_warning(1, ER(ER_UNKNOWN_ERROR));
|
thd->print_aborted_warning(1,
|
||||||
|
thd->stmt_da->is_error() ? thd->stmt_da->message() : ER(ER_UNKNOWN_ERROR));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user