1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

beautifying the error messages

This commit is contained in:
Sinisa@sinisa.nasamreza.org
2002-12-17 21:04:37 +02:00
parent a83ed34f83
commit 52a9fd52e6
2 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ const char *Item_ident::full_name() const
char *tmp;
if (!table_name)
return field_name ? field_name : name ? name : "tmp_field";
if (db_name)
if (db_name && db_name[0])
{
tmp=(char*) sql_alloc((uint) strlen(db_name)+(uint) strlen(table_name)+
(uint) strlen(field_name)+3);

View File

@ -1707,7 +1707,7 @@ find_field_in_tables(THD *thd, Item_ident *item, TABLE_LIST *tables,
if (!found_table && report_error)
{
char buff[NAME_LEN*2+1];
if (db)
if (db && db[0])
{
strxnmov(buff,sizeof(buff)-1,db,".",table_name,NullS);
table_name=buff;