summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <anozdrin/alik@ibm.>2007-06-14 22:14:52 +0400
committerunknown <anozdrin/alik@ibm.>2007-06-14 22:14:52 +0400
commit4392056010de9e22f14d4afda2c5c9b31223087f (patch)
treecc9c2f0d6c8753c5337c5bb567394013f7c87b1e
parentd8baa2037d7cf597be9a118a88fae2fbf9378d9a (diff)
downloadmariadb-git-4392056010de9e22f14d4afda2c5c9b31223087f.tar.gz
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. sql/sp_head.cc: Make sp_head::m_body_begin pointer private. sql/sp_head.h: Make sp_head::m_body_begin pointer private. sql/sql_yacc.yy: Make sp_head::m_body_begin pointer private.
-rw-r--r--sql/sp_head.cc7
-rw-r--r--sql/sp_head.h5
-rw-r--r--sql/sql_yacc.yy8
3 files changed, 16 insertions, 4 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc
index edfa493da9f..feceb2fb960 100644
--- a/sql/sp_head.cc
+++ b/sql/sp_head.cc
@@ -2054,6 +2054,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
sp_head::set_definer(const char *definer, uint definerlen)
{
char user_name_holder[USERNAME_LENGTH + 1];
diff --git a/sql/sp_head.h b/sql/sp_head.h
index f3c3ebfe6e8..2d3bc1307d9 100644
--- a/sql/sp_head.h
+++ b/sql/sp_head.h
@@ -178,8 +178,11 @@ public:
// Pointers set during parsing
const char *m_param_begin;
const char *m_param_end;
+
+private:
const char *m_body_begin;
+public:
/*
Security context for stored routine which should be run under
definer privileges.
@@ -297,6 +300,8 @@ public:
void set_info(longlong created, longlong modified,
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 LEX_STRING *user_name, const LEX_STRING *host_name);
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy
index 8a4c99b6d00..f3b8e7fe640 100644
--- a/sql/sql_yacc.yy
+++ b/sql/sql_yacc.yy
@@ -1872,7 +1872,7 @@ ev_sql_stmt:
bzero((char *)&lex->sp_chistics, sizeof(st_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
{
@@ -2066,7 +2066,7 @@ create_function_tail:
Lex_input_stream *lip= thd->m_lip;
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
{
@@ -11489,7 +11489,7 @@ trigger_tail:
bzero((char *)&lex->sp_chistics, sizeof(st_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 */
{ /* $17 */
@@ -11592,7 +11592,7 @@ sp_tail:
Lex_input_stream *lip= thd->m_lip;
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
{