mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fix for bug#14476 information_schema
.TABLES
.TABLE_TYPE
with empty value
store TABLES.TABLE_TYPE in case of error during table opening
This commit is contained in:
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user