Commit 2b511502 authored by unknown's avatar unknown

Do not use MY_WME in the stat call which errors we process on high level.

(BUG#41127: Maria: assertion when SHOW ENGINE MARIA LOGS and missing logs)

mysql-test/suite/maria/r/maria_showlog_error.result:
  test suite for the BUG#41127
mysql-test/suite/maria/t/maria_showlog_error.test:
  test suite for the BUG#41127
storage/maria/ha_maria.cc:
  Do not use MY_WME in the stat call which errors we process on high level.
parent f1906c62
* shut down mysqld, removed logs, restarted it
show engine maria logs;
Type Name Status
MARIA Size unknown ; maria_log.00000001 can't stat
* shut down mysqld, removed logs, restarted it
-- source include/have_maria.inc
# remove_file can't remove opened file under windows. So we can't reproduce
# the problem there
--source include/not_windows.inc
#
# BUG#41127 test suite
#
connect (admin, localhost, root,,test,,);
--enable_reconnect
connection default;
--enable_reconnect
# cleunup before this test
-- source include/maria_empty_logs.inc
connection default;
remove_file $MYSQLTEST_VARDIR/master-data/$MARIA_LOG/maria_log.00000001;
--replace_regex /Size unknown ; .*maria_log.00000001/Size unknown ; maria_log.00000001/
show engine maria logs;
# cleunup after this test
-- source include/maria_empty_logs.inc
disconnect admin;
connection default;
......@@ -2956,7 +2956,7 @@ bool maria_show_status(handlerton *hton,
const char error[]= "can't stat";
char object[SHOW_MSG_LEN];
file= translog_filename_by_fileno(i, path);
if (!(stat= my_stat(file, &stat_buff, MYF(MY_WME))))
if (!(stat= my_stat(file, &stat_buff, MYF(0))))
{
status= error;
status_len= sizeof(error) - 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment