mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Change C_STRING_WITH_LEN to STRING_WITH_LEN
This preserves const str for constant strings Other things - A few variables where changed from LEX_STRING to LEX_CSTRING - Incident_log_event::Incident_log_event and record_incident where changed to take LEX_CSTRING* as an argument instead of LEX_STRING
This commit is contained in:
@ -443,7 +443,7 @@ typedef enum enum_diag_condition_item_name
|
||||
Name of each diagnostic condition item.
|
||||
This array is indexed by Diag_condition_item_name.
|
||||
*/
|
||||
extern const LEX_STRING Diag_condition_item_names[];
|
||||
extern const LEX_CSTRING Diag_condition_item_names[];
|
||||
|
||||
/**
|
||||
These states are bit coded with HARD. For each state there must be a pair
|
||||
@ -3571,21 +3571,6 @@ public:
|
||||
return lex_str;
|
||||
}
|
||||
|
||||
LEX_STRING *make_lex_string(const char* str, uint length)
|
||||
{
|
||||
LEX_STRING *lex_str;
|
||||
char *tmp;
|
||||
if (!(lex_str= (LEX_STRING *) alloc_root(mem_root, sizeof(LEX_STRING) +
|
||||
length+1)))
|
||||
return 0;
|
||||
tmp= (char*) (lex_str+1);
|
||||
lex_str->str= tmp;
|
||||
memcpy(tmp, str, length);
|
||||
tmp[length]= 0;
|
||||
lex_str->length= length;
|
||||
return lex_str;
|
||||
}
|
||||
|
||||
LEX_CSTRING *make_clex_string(const char* str, uint length)
|
||||
{
|
||||
LEX_CSTRING *lex_str;
|
||||
|
Reference in New Issue
Block a user