summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorunknown <gluh@eagle.intranet.mysql.r18.ru>2005-12-01 11:00:33 +0400
committerunknown <gluh@eagle.intranet.mysql.r18.ru>2005-12-01 11:00:33 +0400
commit65f8e2abe4a7853a46e7bd3ccb6d7006684ab099 (patch)
treeb69492a416900537bd3c57d59ee4ae9395ce0c61 /sql/sql_show.cc
parent48d3869aa4f2cfb0bffbebb405ade1795ed30611 (diff)
downloadmariadb-git-65f8e2abe4a7853a46e7bd3ccb6d7006684ab099.tar.gz
Fix for bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value
store TABLES.TABLE_TYPE in case of error during table opening mysql-test/r/information_schema.result: Fix for bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value test case mysql-test/t/information_schema.test: Fix for bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value test case
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index cb537a43053..82870d46e6c 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -2315,6 +2315,12 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables,
there was errors during opening tables
*/
const char *error= thd->net.last_error;
+ if (tables->view)
+ table->field[3]->store(STRING_WITH_LEN("VIEW"), cs);
+ else if (tables->schema_table)
+ table->field[3]->store(STRING_WITH_LEN("SYSTEM VIEW"), cs);
+ else
+ table->field[3]->store(STRING_WITH_LEN("BASE TABLE"), cs);
table->field[20]->store(error, strlen(error), cs);
thd->clear_error();
}