diff options
author | Monty <monty@mariadb.org> | 2018-01-08 15:33:23 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-01-30 21:33:56 +0200 |
commit | f55dc7f733446a201e3b465ae03a0388d192a3ad (patch) | |
tree | 54bb6977650a907dcd069ef1b7124e61944ceabe /sql/sql_class.h | |
parent | 18e22cb69f7d56207c80a5bf4336f2a52ff0d70f (diff) | |
download | mariadb-git-f55dc7f733446a201e3b465ae03a0388d192a3ad.tar.gz |
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
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r-- | sql/sql_class.h | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h index 092e409f55a..8199418cd8f 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -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; |