mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 07:05:33 +02:00
MDEV-5894 MySQL BUG#34750: Print database name in Unknown Table error message
This commit is contained in:
parent
9418bd9c21
commit
47f438675b
9 changed files with 102 additions and 22 deletions
|
|
@ -8322,9 +8322,16 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
|
|||
meaningful message than ER_BAD_TABLE_ERROR.
|
||||
*/
|
||||
if (!table_name)
|
||||
my_message(ER_NO_TABLES_USED, ER(ER_NO_TABLES_USED), MYF(0));
|
||||
my_error(ER_NO_TABLES_USED, MYF(0));
|
||||
else if (!db_name && !thd->db)
|
||||
my_error(ER_NO_DB_ERROR, MYF(0));
|
||||
else
|
||||
my_error(ER_BAD_TABLE_ERROR, MYF(0), table_name);
|
||||
{
|
||||
char name[FN_REFLEN];
|
||||
my_snprintf(name, sizeof(name), "%s.%s",
|
||||
db_name ? db_name : thd->db, table_name);
|
||||
my_error(ER_BAD_TABLE_ERROR, MYF(0), name);
|
||||
}
|
||||
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue