862
Create a LEX_STRING in this connection.
862
Create a lex_string_t in this connection.
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
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)
875
875
return make_lex_string(lex_str, str.c_str(), str.length(), allocate_lex_string);
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)
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;
1727
1727
current_global_counters.connections= 0;
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)
1732
1732
return getVariable(std::string(name.str, name.length), create_if_not_exists);