From 606a4a48475c95480751755e811e0b6c76ce1c3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Fri, 3 Mar 2017 20:12:48 +0200 Subject: Post MDEV-11902 Fix test failures in maria and myisam storage engines my_readline can fail due to missing file. Make my_readline report this condition separately so that we can catch it and report an appropriate error message to the user. --- storage/myisam/mi_open.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'storage/myisam/mi_open.c') diff --git a/storage/myisam/mi_open.c b/storage/myisam/mi_open.c index 31612b0e902..bdb2fdf8447 100644 --- a/storage/myisam/mi_open.c +++ b/storage/myisam/mi_open.c @@ -104,6 +104,11 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) realpath_err= my_realpath(name_buff, fn_format(org_name,name,"",MI_NAME_IEXT,4),MYF(0)); + if (realpath_err > 0) /* File not found, no point in looking further. */ + { + DBUG_RETURN(NULL); + } + if (my_is_symlink(org_name) && (realpath_err || mysys_test_invalid_symlink(name_buff))) { -- cgit v1.2.1