diff options
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 51a1bb2e550..609882b84c6 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -153,7 +153,8 @@ sp_cursor::pre_open(THD *thd) { if (m_isopen) { - send_error(thd, ER_SP_CURSOR_ALREADY_OPEN); + my_message(ER_SP_CURSOR_ALREADY_OPEN, ER(ER_SP_CURSOR_ALREADY_OPEN), + MYF(0)); return NULL; } @@ -187,7 +188,7 @@ sp_cursor::close(THD *thd) { if (! m_isopen) { - send_error(thd, ER_SP_CURSOR_NOT_OPEN); + my_message(ER_SP_CURSOR_NOT_OPEN, ER(ER_SP_CURSOR_NOT_OPEN), MYF(0)); return -1; } destroy(); @@ -217,12 +218,12 @@ sp_cursor::fetch(THD *thd, List<struct sp_pvar> *vars) if (! m_isopen) { - send_error(thd, ER_SP_CURSOR_NOT_OPEN); + my_message(ER_SP_CURSOR_NOT_OPEN, ER(ER_SP_CURSOR_NOT_OPEN), MYF(0)); return -1; } if (m_current_row == NULL) { - send_error(thd, ER_SP_FETCH_NO_DATA); + my_message(ER_SP_FETCH_NO_DATA, ER(ER_SP_FETCH_NO_DATA), MYF(0)); return -1; } @@ -234,7 +235,8 @@ sp_cursor::fetch(THD *thd, List<struct sp_pvar> *vars) if (fldcount >= m_prot->get_field_count()) { - send_error(thd, ER_SP_WRONG_NO_OF_FETCH_ARGS); + my_message(ER_SP_WRONG_NO_OF_FETCH_ARGS, + ER(ER_SP_WRONG_NO_OF_FETCH_ARGS), MYF(0)); return -1; } s= row[fldcount]; @@ -260,7 +262,8 @@ sp_cursor::fetch(THD *thd, List<struct sp_pvar> *vars) } if (fldcount < m_prot->get_field_count()) { - send_error(thd, ER_SP_WRONG_NO_OF_FETCH_ARGS); + my_message(ER_SP_WRONG_NO_OF_FETCH_ARGS, + ER(ER_SP_WRONG_NO_OF_FETCH_ARGS), MYF(0)); return -1; } m_current_row= m_current_row->next; |