summaryrefslogtreecommitdiff
path: root/sql/sp.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sp.cc')
-rw-r--r--sql/sp.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/sql/sp.cc b/sql/sp.cc
index d2aaa5646a8..fe249141fea 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -1073,9 +1073,7 @@ sp_routine_exists_in_table(THD *thd, int type, sp_name *name)
ret= SP_OPEN_TABLE_FAILED;
else
{
- if ((ret= db_find_routine_aux(thd, type, name, table)) == SP_OK)
- ret= SP_OK;
- else
+ if ((ret= db_find_routine_aux(thd, type, name, table)) != SP_OK)
ret= SP_KEY_NOT_FOUND;
close_proc_table(thd, &open_tables_state_backup);
}