summaryrefslogtreecommitdiff
path: root/sql/sql_load.cc
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-02-27 00:06:09 +0200
committermonty@narttu.mysql.fi <>2003-02-27 00:06:09 +0200
commit61213dbc7a5c9b77985ff1dbf6f48e6a3293260f (patch)
treec332ae5a050c69f3e1249cd3dc71d36b76dfe646 /sql/sql_load.cc
parent39635eb2123bafd38bc4882f6f7ae9ccfebde08c (diff)
downloadmariadb-git-61213dbc7a5c9b77985ff1dbf6f48e6a3293260f.tar.gz
Code cleanup
Diffstat (limited to 'sql/sql_load.cc')
-rw-r--r--sql/sql_load.cc11
1 files changed, 3 insertions, 8 deletions
diff --git a/sql/sql_load.cc b/sql/sql_load.cc
index c4ea41cbb69..62ed0fc5bed 100644
--- a/sql/sql_load.cc
+++ b/sql/sql_load.cc
@@ -89,14 +89,9 @@ int mysql_load(THD *thd,sql_exchange *ex,TABLE_LIST *table_list,
*enclosed=ex->enclosed;
bool is_fifo=0;
LOAD_FILE_INFO lf_info;
- char * db = table_list->db ? table_list->db : thd->db;
- char * tdb= thd->db ? thd->db : db;
-/*
- 'tdb' can be NULL only if both table_list->db and thd->db are NULL
- 'db' itself can be NULL. but in that case it will generate
- an error earlier open_ltable()).
-*/
-
+ char *db = table_list->db; // This is never null
+ /* If no current database, use database where table is located */
+ char *tdb= thd->db ? thd->db : db;
bool transactional_table, log_delayed;
DBUG_ENTER("mysql_load");