summaryrefslogtreecommitdiff
path: root/sql/structs.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/structs.h')
-rw-r--r--sql/structs.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/sql/structs.h b/sql/structs.h
index 1b3c0b7a7f2..1a143602eea 100644
--- a/sql/structs.h
+++ b/sql/structs.h
@@ -124,10 +124,10 @@ typedef struct st_key {
union
{
plugin_ref parser; /* Fulltext [pre]parser */
- LEX_STRING *parser_name; /* Fulltext [pre]parser name */
+ LEX_CSTRING *parser_name; /* Fulltext [pre]parser name */
};
KEY_PART_INFO *key_part;
- char *name; /* Name of key */
+ const char *name; /* Name of key */
/* Unique name for cache; db + \0 + table_name + \0 + key_name + \0 */
uchar *cache_name;
/*
@@ -152,7 +152,7 @@ typedef struct st_key {
int bdb_return_if_eq;
} handler;
TABLE *table;
- LEX_STRING comment;
+ LEX_CSTRING comment;
/** reference to the list of options or NULL */
engine_option_value *option_list;
ha_index_option_struct *option_struct; /* structure with parsed options */
@@ -204,21 +204,24 @@ extern const char *show_comp_option_name[];
typedef int *(*update_var)(THD *, struct st_mysql_show_var *);
typedef struct st_lex_user {
- LEX_STRING user, host, plugin, auth;
- LEX_STRING pwtext, pwhash;
+ LEX_CSTRING user, host, plugin, auth;
+ LEX_CSTRING pwtext, pwhash;
bool is_role() const { return user.str[0] && !host.str[0]; }
- void set_lex_string(LEX_STRING *l, char *buf)
+ void set_lex_string(LEX_CSTRING *l, char *buf)
{
if (is_role())
*l= user;
else
- l->length= strxmov(l->str= buf, user.str, "@", host.str, NullS) - buf;
+ {
+ l->str= buf;
+ l->length= strxmov(buf, user.str, "@", host.str, NullS) - buf;
+ }
}
void reset_auth()
{
pwtext.length= pwhash.length= plugin.length= auth.length= 0;
pwtext.str= pwhash.str= 0;
- plugin.str= auth.str= const_cast<char*>("");
+ plugin.str= auth.str= "";
}
} LEX_USER;
@@ -708,7 +711,7 @@ public:
};
-struct Lex_string_with_pos_st: public LEX_STRING
+struct Lex_string_with_pos_st: public LEX_CSTRING
{
const char *m_pos;
};