diff --git a/mysql-test/r/lowercase_table3.result b/mysql-test/r/lowercase_table3.result
index 8182d07c26be3f7c4fd47d941cf00bf5e3a5df23..995a2c0d08a9eaa5550d0e3e30cc860f1d178f67 100644
--- a/mysql-test/r/lowercase_table3.result
+++ b/mysql-test/r/lowercase_table3.result
@@ -6,5 +6,5 @@ drop table t1;
 flush tables;
 CREATE TABLE t1 (a int) ENGINE=INNODB;
 SELECT * from T1;
-ERROR HY000: Can't open file: 'T1.ibd' (errno: 1)
+ERROR 42S02: Table 'test.T1' doesn't exist
 drop table t1;
diff --git a/mysql-test/t/lowercase_table3.test b/mysql-test/t/lowercase_table3.test
index a394cde7237a5d05d5fc4e21bc1e5329167e50d5..9841059a26b420073e2822b582d576e36301f554 100644
--- a/mysql-test/t/lowercase_table3.test
+++ b/mysql-test/t/lowercase_table3.test
@@ -32,6 +32,6 @@ flush tables;
 #
 
 CREATE TABLE t1 (a int) ENGINE=INNODB;
---error 1016
+--error 1146
 SELECT * from T1;
 drop table t1;
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 69e509f16568f721357a7eec8ff7cfaf13b9cb38..f40551159187f4ea614dd2b6c63adb1432c7f0cd 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -1861,7 +1861,7 @@ ha_innobase::open(
     		my_free((char*) upd_buff, MYF(0));
     		my_errno = ENOENT;
 
-    		DBUG_RETURN(1);
+    		DBUG_RETURN(HA_ERR_NO_SUCH_TABLE);
   	}
 
  	if (ib_table->ibd_file_missing && !thd->tablespace_op) {
@@ -1878,7 +1878,7 @@ ha_innobase::open(
     		my_free((char*) upd_buff, MYF(0));
     		my_errno = ENOENT;
 
-    		DBUG_RETURN(1);
+    		DBUG_RETURN(HA_ERR_NO_SUCH_TABLE);
   	}
 
 	innobase_prebuilt = row_create_prebuilt(ib_table);