diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 4ae59093a0e60c63c8d5eee7e04d3b6589e79997..0100390afa0c932dc72b69921d2ce9d83f8a8517 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -520,6 +520,7 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
       // Send error to Comment field
       protocol->store(thd->net.last_error, system_charset_info);
       thd->net.last_error[0]=0;
+      thd->net.last_errno= 0;
     }
     else
     {