From 52a9fd52e67b405937b5831b0e24129c93d9bae3 Mon Sep 17 00:00:00 2001 From: "Sinisa@sinisa.nasamreza.org" <> Date: Tue, 17 Dec 2002 21:04:37 +0200 Subject: [PATCH] beautifying the error messages --- sql/item.cc | 2 +- sql/sql_base.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sql/item.cc b/sql/item.cc index d05578c800a..c6b50cc8f89 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -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); diff --git a/sql/sql_base.cc b/sql/sql_base.cc index ce6133392c6..e74adf5ccd3 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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;