Commit 754e9788 authored by anozdrin/alik@ibm's avatar anozdrin/alik@ibm

Part of patch for BUG#11986: make sp_head::m_body_begin pointer

private and provide a setter for it. The setter will be used to
construct UTF-query in the following patches.
parent 62e3e462
...@@ -2053,6 +2053,13 @@ sp_head::set_info(longlong created, longlong modified, ...@@ -2053,6 +2053,13 @@ sp_head::set_info(longlong created, longlong modified,
} }
void
sp_head::set_body_begin_ptr(Lex_input_stream *lip, const char *begin_ptr)
{
m_body_begin= begin_ptr;
}
void void
sp_head::set_definer(const char *definer, uint definerlen) sp_head::set_definer(const char *definer, uint definerlen)
{ {
......
...@@ -178,8 +178,11 @@ public: ...@@ -178,8 +178,11 @@ public:
// Pointers set during parsing // Pointers set during parsing
const char *m_param_begin; const char *m_param_begin;
const char *m_param_end; const char *m_param_end;
private:
const char *m_body_begin; const char *m_body_begin;
public:
/* /*
Security context for stored routine which should be run under Security context for stored routine which should be run under
definer privileges. definer privileges.
...@@ -297,6 +300,8 @@ public: ...@@ -297,6 +300,8 @@ public:
void set_info(longlong created, longlong modified, void set_info(longlong created, longlong modified,
st_sp_chistics *chistics, ulong sql_mode); st_sp_chistics *chistics, ulong sql_mode);
void set_body_begin_ptr(Lex_input_stream *lip, const char *begin_ptr);
void set_definer(const char *definer, uint definerlen); void set_definer(const char *definer, uint definerlen);
void set_definer(const LEX_STRING *user_name, const LEX_STRING *host_name); void set_definer(const LEX_STRING *user_name, const LEX_STRING *host_name);
......
...@@ -1872,7 +1872,7 @@ ev_sql_stmt: ...@@ -1872,7 +1872,7 @@ ev_sql_stmt:
bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
lex->sphead->m_chistics= &lex->sp_chistics; lex->sphead->m_chistics= &lex->sp_chistics;
lex->sphead->m_body_begin= lip->get_cpp_ptr(); lex->sphead->set_body_begin_ptr(lip, lip->get_cpp_ptr());
} }
ev_sql_stmt_inner ev_sql_stmt_inner
{ {
...@@ -2066,7 +2066,7 @@ create_function_tail: ...@@ -2066,7 +2066,7 @@ create_function_tail:
Lex_input_stream *lip= thd->m_lip; Lex_input_stream *lip= thd->m_lip;
lex->sphead->m_chistics= &lex->sp_chistics; lex->sphead->m_chistics= &lex->sp_chistics;
lex->sphead->m_body_begin= lip->get_cpp_tok_start(); lex->sphead->set_body_begin_ptr(lip, lip->get_cpp_tok_start());
} }
sp_proc_stmt sp_proc_stmt
{ {
...@@ -11489,7 +11489,7 @@ trigger_tail: ...@@ -11489,7 +11489,7 @@ trigger_tail:
bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics)); bzero((char *)&lex->sp_chistics, sizeof(st_sp_chistics));
lex->sphead->m_chistics= &lex->sp_chistics; lex->sphead->m_chistics= &lex->sp_chistics;
lex->sphead->m_body_begin= lip->get_cpp_ptr(); lex->sphead->set_body_begin_ptr(lip, lip->get_cpp_ptr());
} }
sp_proc_stmt /* $16 */ sp_proc_stmt /* $16 */
{ /* $17 */ { /* $17 */
...@@ -11592,7 +11592,7 @@ sp_tail: ...@@ -11592,7 +11592,7 @@ sp_tail:
Lex_input_stream *lip= thd->m_lip; Lex_input_stream *lip= thd->m_lip;
lex->sphead->m_chistics= &lex->sp_chistics; lex->sphead->m_chistics= &lex->sp_chistics;
lex->sphead->m_body_begin= lip->get_cpp_tok_start(); lex->sphead->set_body_begin_ptr(lip, lip->get_cpp_tok_start());
} }
sp_proc_stmt sp_proc_stmt
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment