diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-07-13 07:21:21 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-07-13 07:21:21 +0400 |
commit | 29acdcd5427e13bc3aefbbeee17b42bfe23dea84 (patch) | |
tree | f8f5365594c3b43e01891b7017f47fa6b934c646 /sql/sp.cc | |
parent | e33bda183e80ff63a984ed2a938467950b23a3fd (diff) | |
parent | daec0004502a1f8c2ff7d46de92a61b5c4da1d6c (diff) | |
download | mariadb-git-MDEV-9804.tar.gz |
Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3MDEV-9804
Conflicts:
VERSION
debian/mariadb-backup-10.2.files
debian/mariadb-backup-10.2.install
debian/mariadb-backup-10.3.files
mysql-test/unstable-tests
Diffstat (limited to 'sql/sp.cc')
-rw-r--r-- | sql/sp.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sp.cc b/sql/sp.cc index a01861b3d61..c80078ebe19 100644 --- a/sql/sp.cc +++ b/sql/sp.cc @@ -470,7 +470,8 @@ static TABLE *open_proc_table_for_update(THD *thd) */ static int -db_find_routine_aux(THD *thd, stored_procedure_type type, const sp_name *name, +db_find_routine_aux(THD *thd, stored_procedure_type type, + const Database_qualified_name *name, TABLE *table) { uchar key[MAX_KEY_LENGTH]; // db, name, optional key length type @@ -969,7 +970,7 @@ sp_returns_type(THD *thd, String &result, sp_head *sp) */ static int sp_drop_routine_internal(THD *thd, stored_procedure_type type, - const sp_name *name, TABLE *table) + const Database_qualified_name *name, TABLE *table) { DBUG_ENTER("sp_drop_routine_internal"); @@ -1079,11 +1080,11 @@ sp_create_routine(THD *thd, stored_procedure_type type, sp_head *sp) else { /* Checking if the routine already exists */ - if (db_find_routine_aux(thd, type, lex->spname, table) == SP_OK) + if (db_find_routine_aux(thd, type, sp, table) == SP_OK) { if (lex->create_info.or_replace()) { - if ((ret= sp_drop_routine_internal(thd, type, lex->spname, table))) + if ((ret= sp_drop_routine_internal(thd, type, sp, table))) goto done; } else if (lex->create_info.if_not_exists()) @@ -1092,7 +1093,7 @@ sp_create_routine(THD *thd, stored_procedure_type type, sp_head *sp) ER_SP_ALREADY_EXISTS, ER_THD(thd, ER_SP_ALREADY_EXISTS), SP_TYPE_STRING(type), - lex->spname->m_name.str); + sp->m_name.str); ret= FALSE; |