summaryrefslogtreecommitdiff
path: root/sql/sql_parse.cc
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2011-10-11 12:55:42 +0200
committerSergei Golubchik <sergii@pisem.net>2011-10-11 12:55:42 +0200
commitae6330080102f31edd6cd3b49028f0f3e39be769 (patch)
treeb277d27fcc4f0471c86fd0b756f120718b8d759a /sql/sql_parse.cc
parent8feff690b6d1f09acb6a68315669e75924da5f80 (diff)
parent3e8731dee04ec5f47557e0a0f55aa5f6f8d1f698 (diff)
downloadmariadb-git-ae6330080102f31edd6cd3b49028f0f3e39be769.tar.gz
merge
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r--sql/sql_parse.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc
index acdd6b76df4..6202b9d888a 100644
--- a/sql/sql_parse.cc
+++ b/sql/sql_parse.cc
@@ -4515,9 +4515,10 @@ create_sp_error:
*/
/* Conditionally writes to binlog */
- int type= lex->sql_command == SQLCOM_ALTER_PROCEDURE ?
- TYPE_ENUM_PROCEDURE :
- TYPE_ENUM_FUNCTION;
+ stored_procedure_type type;
+ type= (lex->sql_command == SQLCOM_ALTER_PROCEDURE ?
+ TYPE_ENUM_PROCEDURE :
+ TYPE_ENUM_FUNCTION);
sp_result= sp_update_routine(thd,
type,
@@ -4545,8 +4546,8 @@ create_sp_error:
case SQLCOM_DROP_FUNCTION:
{
int sp_result;
- int type= (lex->sql_command == SQLCOM_DROP_PROCEDURE ?
- TYPE_ENUM_PROCEDURE : TYPE_ENUM_FUNCTION);
+ stored_procedure_type type= (lex->sql_command == SQLCOM_DROP_PROCEDURE ?
+ TYPE_ENUM_PROCEDURE : TYPE_ENUM_FUNCTION);
sp_result= sp_routine_exists_in_table(thd, type, lex->spname);
mysql_reset_errors(thd, 0);
@@ -4573,9 +4574,10 @@ create_sp_error:
#endif
/* Conditionally writes to binlog */
- int type= lex->sql_command == SQLCOM_DROP_PROCEDURE ?
- TYPE_ENUM_PROCEDURE :
- TYPE_ENUM_FUNCTION;
+ stored_procedure_type type;
+ type= (lex->sql_command == SQLCOM_DROP_PROCEDURE ?
+ TYPE_ENUM_PROCEDURE :
+ TYPE_ENUM_FUNCTION);
sp_result= sp_drop_routine(thd, type, lex->spname);
}