~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2011-07-25 14:24:19 UTC
  • mto: This revision was merged to the branch mainline in revision 2373.
  • Revision ID: brian@tangent.org-20110725142419-3vobv9u6k7jp4qej
Remove the typedef on lexkey

Show diffs side-by-side

added added

removed removed

Lines of Context:
859
859
}
860
860
 
861
861
/**
862
 
  Create a LEX_STRING in this connection.
 
862
  Create a lex_string_t in this connection.
863
863
 
864
 
  @param lex_str  pointer to LEX_STRING object to be initialized
 
864
  @param lex_str  pointer to lex_string_t object to be initialized
865
865
  @param str      initializer to be copied into lex_str
866
866
  @param length   length of str, in bytes
867
 
  @param allocate_lex_string  if true, allocate new LEX_STRING object,
 
867
  @param allocate_lex_string  if true, allocate new lex_string_t object,
868
868
                              instead of using lex_str value
869
 
  @return  NULL on failure, or pointer to the LEX_STRING object
 
869
  @return  NULL on failure, or pointer to the lex_string_t object
870
870
*/
871
 
LEX_STRING *Session::make_lex_string(LEX_STRING *lex_str,
 
871
lex_string_t *Session::make_lex_string(lex_string_t *lex_str,
872
872
                                     const std::string &str,
873
873
                                     bool allocate_lex_string)
874
874
{
875
875
  return make_lex_string(lex_str, str.c_str(), str.length(), allocate_lex_string);
876
876
}
877
877
 
878
 
LEX_STRING *Session::make_lex_string(LEX_STRING *lex_str,
 
878
lex_string_t *Session::make_lex_string(lex_string_t *lex_str,
879
879
                                     const char* str, uint32_t length,
880
880
                                     bool allocate_lex_string)
881
881
{
882
882
  if (allocate_lex_string)
883
 
    lex_str= new (mem) LEX_STRING;
 
883
    lex_str= new (mem) lex_string_t;
884
884
  lex_str->str= mem_root->strmake(str, length);
885
885
  lex_str->length= length;
886
886
  return lex_str;
1727
1727
  current_global_counters.connections= 0;
1728
1728
}
1729
1729
 
1730
 
user_var_entry *Session::getVariable(LEX_STRING &name, bool create_if_not_exists)
 
1730
user_var_entry *Session::getVariable(lex_string_t &name, bool create_if_not_exists)
1731
1731
{
1732
1732
  return getVariable(std::string(name.str, name.length), create_if_not_exists);
1733
1733
}