summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2014-11-16 13:12:58 +0100
committerSergei Golubchik <serg@mariadb.org>2014-12-04 10:41:51 +0100
commit97a913e31c161dbd18f4fcb9cc00f23640497e03 (patch)
tree3405f9195999422b9ee3d596c0ae1db95c2d6134 /sql/sql_lex.h
parenta50ddebb5cfa7b79540d155e8e41c7a07c4c3fbf (diff)
downloadmariadb-git-97a913e31c161dbd18f4fcb9cc00f23640497e03.tar.gz
cleanup: freshen up CREATE SERVER code
* pass LEX_STRING's from the parser, don't ignore the length only to strlen later * init LEX::server_options only for SERVER commands, not for every statement * don't put temporary values into a global persistent memroot but really it's just scratching a surface
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index 7aa6aae9289..d1aa2464210 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -202,8 +202,13 @@ typedef Mem_root_array<ORDER*, true> Group_list_ptrs;
typedef struct st_lex_server_options
{
long port;
- uint server_name_length;
- char *server_name, *host, *db, *username, *password, *scheme, *socket, *owner;
+ LEX_STRING server_name, host, db, username, password, scheme, socket, owner;
+ void reset(LEX_STRING name)
+ {
+ server_name= name;
+ host= db= username= password= scheme= socket= owner= null_lex_str;
+ port= -1;
+ }
} LEX_SERVER_OPTIONS;