summaryrefslogtreecommitdiff
path: root/sql/set_var.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-01-08 15:33:23 +0200
committerMonty <monty@mariadb.org>2018-01-30 21:33:56 +0200
commitf55dc7f733446a201e3b465ae03a0388d192a3ad (patch)
tree54bb6977650a907dcd069ef1b7124e61944ceabe /sql/set_var.cc
parent18e22cb69f7d56207c80a5bf4336f2a52ff0d70f (diff)
downloadmariadb-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/set_var.cc')
-rw-r--r--sql/set_var.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc
index 3a6b73d574e..91224421117 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -324,14 +324,14 @@ do { \
sval.length= sval.str ? strlen(sval.str) : 0; \
break; \
case SHOW_LEX_STRING: \
- sval= *(LEX_STRING *) value; \
+ sval= *(LEX_CSTRING *) value; \
break
longlong sys_var::val_int(bool *is_null,
THD *thd, enum_var_type type,
const LEX_CSTRING *base)
{
- LEX_STRING sval;
+ LEX_CSTRING sval;
AutoWLock lock(&PLock_global_system_variables);
const uchar *value= value_ptr(thd, type, base);
*is_null= false;
@@ -357,13 +357,13 @@ longlong sys_var::val_int(bool *is_null,
String *sys_var::val_str_nolock(String *str, THD *thd, const uchar *value)
{
- static LEX_STRING bools[]=
+ static LEX_CSTRING bools[]=
{
- { C_STRING_WITH_LEN("OFF") },
- { C_STRING_WITH_LEN("ON") }
+ { STRING_WITH_LEN("OFF") },
+ { STRING_WITH_LEN("ON") }
};
- LEX_STRING sval;
+ LEX_CSTRING sval;
switch (show_type())
{
case_get_string_as_lex_string;
@@ -395,7 +395,7 @@ String *sys_var::val_str(String *str,
double sys_var::val_real(bool *is_null,
THD *thd, enum_var_type type, const LEX_CSTRING *base)
{
- LEX_STRING sval;
+ LEX_CSTRING sval;
AutoWLock lock(&PLock_global_system_variables);
const uchar *value= value_ptr(thd, type, base);
*is_null= false;