summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sql/handler.cc2
-rw-r--r--sql/sp.cc2
-rw-r--r--sql/sp_head.cc4
-rw-r--r--sql/sql_error.cc2
-rw-r--r--sql/sql_trigger.cc2
5 files changed, 6 insertions, 6 deletions
diff --git a/sql/handler.cc b/sql/handler.cc
index 37b81b58cfe..f8aec72ec90 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -1343,7 +1343,7 @@ int ha_delete_table(THD *thd, enum db_type table_type, const char *path,
strmake(buff, thd->net.last_error, sizeof(buff)-1);
thd->query_error= 0;
- thd->spcont= 0;
+ thd->spcont= NULL;
thd->lex->current_select= 0;
thd->net.last_error[0]= 0;
diff --git a/sql/sp.cc b/sql/sp.cc
index de786a77275..d28e9138fa8 100644
--- a/sql/sp.cc
+++ b/sql/sp.cc
@@ -438,10 +438,10 @@ db_load_routine(THD *thd, int type, sp_name *name, sp_head **sphp,
Lex_input_stream lip(thd, defstr.c_ptr(), defstr.length());
thd->m_lip= &lip;
lex_start(thd);
+ thd->spcont= NULL;
ret= MYSQLparse(thd);
}
- thd->spcont= 0;
if (ret || thd->is_fatal_error || newlex.sphead == NULL)
{
sp_head *sp= newlex.sphead;
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index a98fe5027c9..d939fd20b9b 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2581,7 +2581,7 @@ sp_instr_set::exec_core(THD *thd, uint *nextp)
sp_rcontext *spcont= thd->spcont;
- thd->spcont= 0; /* Avoid handlers */
+ thd->spcont= NULL; /* Avoid handlers */
my_error(ER_OUT_OF_RESOURCES, MYF(0));
spcont->clear_handler();
thd->spcont= spcont;
@@ -3316,7 +3316,7 @@ sp_instr_set_case_expr::exec_core(THD *thd, uint *nextp)
sp_rcontext *spcont= thd->spcont;
- thd->spcont= 0; /* Avoid handlers */
+ thd->spcont= NULL; /* Avoid handlers */
my_error(ER_OUT_OF_RESOURCES, MYF(0));
spcont->clear_handler();
thd->spcont= spcont;
diff --git a/sql/sql_error.cc b/sql/sql_error.cc
index a25c82c7721..344a0c00db8 100644
--- a/sql/sql_error.cc
+++ b/sql/sql_error.cc
@@ -126,7 +126,7 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
sp_rcontext *spcont= thd->spcont;
thd->no_warnings_for_error= 1;
- thd->spcont= 0;
+ thd->spcont= NULL;
thd->killed= THD::KILL_BAD_DATA;
my_message(code, msg, MYF(0));
diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc
index cf6db22fbcb..5762614e47f 100644
--- a/sql/sql_trigger.cc
+++ b/sql/sql_trigger.cc
@@ -982,7 +982,7 @@ bool Table_triggers_list::check_n_load(THD *thd, const char *db,
Lex_input_stream lip(thd, trg_create_str->str, trg_create_str->length);
thd->m_lip= &lip;
lex_start(thd);
- thd->spcont= 0;
+ thd->spcont= NULL;
int err= MYSQLparse((void *)thd);
if (err || thd->is_fatal_error)