summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <vicentiu@mariadb.org>2017-03-14 00:24:06 +0200
committerVicențiu Ciorbaru <vicentiu@mariadb.org>2017-03-14 00:25:26 +0200
commit06f1f1aa6e3dbc1efcd623378fe415b27c32b944 (patch)
tree3b6a26be2d56039f193e48b31806d55e5faddf04
parent032678ad18498bab01d41779313e48df1990f780 (diff)
downloadmariadb-git-06f1f1aa6e3dbc1efcd623378fe415b27c32b944.tar.gz
Make ELOOP be considered a File Not Found error when it comes from handlerton
Fix symlink-aria && symlink-myisam to account for this possibility.
-rw-r--r--mysql-test/r/symlink-aria-11902.result4
-rw-r--r--mysql-test/r/symlink-myisam-11902.result4
-rw-r--r--mysql-test/t/symlink-myisam-11902.test4
-rw-r--r--sql/handler.cc1
4 files changed, 7 insertions, 6 deletions
diff --git a/mysql-test/r/symlink-aria-11902.result b/mysql-test/r/symlink-aria-11902.result
index 66405b1c25f..e563780b3ec 100644
--- a/mysql-test/r/symlink-aria-11902.result
+++ b/mysql-test/r/symlink-aria-11902.result
@@ -14,7 +14,7 @@ set debug_sync='mi_open_datafile SIGNAL ok WAIT_FOR go';
select * from t1;
set debug_sync='now WAIT_FOR ok';
set debug_sync='now SIGNAL go';
-ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MAD' not found (Errcode: 20 "Not a directory")
+ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MAD' not found (Errcode: 20 <errmsg>)
flush tables;
drop table if exists t1;
create table t1 (a int, b char(16), index (a))
@@ -32,7 +32,7 @@ set debug_sync='mi_open_kfile SIGNAL waiting WAIT_FOR run';
select a from t1;
set debug_sync='now WAIT_FOR waiting';
set debug_sync='now SIGNAL run';
-ERROR HY000: Can't find file: './test/t1.MAI' (errno: 20 "Not a directory")
+ERROR HY000: Can't find file: './test/t1.MAI' (errno: 20 <errmsg>)
flush tables;
drop table if exists t1;
drop table mysql.t1;
diff --git a/mysql-test/r/symlink-myisam-11902.result b/mysql-test/r/symlink-myisam-11902.result
index 4b07aa3f4a7..33357a80700 100644
--- a/mysql-test/r/symlink-myisam-11902.result
+++ b/mysql-test/r/symlink-myisam-11902.result
@@ -13,7 +13,7 @@ set debug_sync='mi_open_datafile SIGNAL ok WAIT_FOR go';
select * from t1;
set debug_sync='now WAIT_FOR ok';
set debug_sync='now SIGNAL go';
-ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MYD' not found (Errcode: 20 "Not a directory")
+ERROR HY000: File 'MYSQLTEST_VARDIR/tmp/foo/t1.MYD' not found (Errcode: 20 <errmsg>)
flush tables;
drop table if exists t1;
create table t1 (a int, b char(16), index (a))
@@ -31,7 +31,7 @@ set debug_sync='mi_open_kfile SIGNAL waiting WAIT_FOR run';
select a from t1;
set debug_sync='now WAIT_FOR waiting';
set debug_sync='now SIGNAL run';
-ERROR HY000: Can't find file: './test/t1.MYI' (errno: 20 "Not a directory")
+ERROR HY000: Can't find file: './test/t1.MYI' (errno: 20 <errmsg>)
flush tables;
drop table if exists t1;
drop table mysql.t1;
diff --git a/mysql-test/t/symlink-myisam-11902.test b/mysql-test/t/symlink-myisam-11902.test
index 426f8e61edc..8fd4961d1fb 100644
--- a/mysql-test/t/symlink-myisam-11902.test
+++ b/mysql-test/t/symlink-myisam-11902.test
@@ -25,7 +25,7 @@ exec rm -r $MYSQLTEST_VARDIR/tmp/foo;
exec ln -s $datadir/mysql $MYSQLTEST_VARDIR/tmp/foo;
set debug_sync='now SIGNAL go';
connection default;
-replace_regex / '.*\/tmp\// 'MYSQLTEST_VARDIR\/tmp\// /31/20/;
+replace_regex / '.*\/tmp\// 'MYSQLTEST_VARDIR\/tmp\// /31/20/ /40/20/ /20.*/20 <errmsg>)/;
error 29;
reap;
flush tables;
@@ -49,7 +49,7 @@ exec rm -r $MYSQLTEST_VARDIR/tmp/foo;
exec ln -s $datadir/mysql $MYSQLTEST_VARDIR/tmp/foo;
set debug_sync='now SIGNAL run';
connection default;
-replace_regex / '.*\/test\// '.\/test\// /31/20/;
+replace_regex / '.*\/test\// '.\/test\// /31/20/ /40/20/ /20.*/20 <errmsg>)/;
error ER_FILE_NOT_FOUND;
reap;
flush tables;
diff --git a/sql/handler.cc b/sql/handler.cc
index 8b0f885bb63..7fa8afdb253 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3372,6 +3372,7 @@ void handler::print_error(int error, myf errflag)
break;
case ENOENT:
case ENOTDIR:
+ case ELOOP:
textno=ER_FILE_NOT_FOUND;
break;
case ENOSPC: