summaryrefslogtreecommitdiff
path: root/sql/item_create.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/item_create.cc')
-rw-r--r--sql/item_create.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc
index d73a5327d25..19a8f2b138e 100644
--- a/sql/item_create.cc
+++ b/sql/item_create.cc
@@ -3253,7 +3253,7 @@ Create_qfunc::create_func(THD *thd, LEX_CSTRING *name, List<Item> *item_list)
{
LEX_CSTRING db;
- if (! thd->db && ! thd->lex->sphead)
+ if (! thd->db.str && ! thd->lex->sphead)
{
/*
The proper error message should be in the lines of:
@@ -3271,7 +3271,7 @@ Create_qfunc::create_func(THD *thd, LEX_CSTRING *name, List<Item> *item_list)
return NULL;
}
- if (thd->lex->copy_db_to(&db.str, &db.length))
+ if (thd->lex->copy_db_to(&db))
return NULL;
return create_with_db(thd, &db, name, false, item_list);