diff options
author | Guilhem Bichot <guilhem.bichot@oracle.com> | 2011-05-21 10:21:08 +0200 |
---|---|---|
committer | Guilhem Bichot <guilhem.bichot@oracle.com> | 2011-05-21 10:21:08 +0200 |
commit | 3ceec2f19cff22d7b6078b6a8d5788fa19264b8a (patch) | |
tree | 43fd6afdae9f8879ad4cdbb000497fee7cba02f4 /sql/set_var.cc | |
parent | 955cb796e7672d1186f44de84528b7b8fe47f0c9 (diff) | |
parent | 12c42b980aa94105a9108d4f58c5dc75d96ec824 (diff) | |
download | mariadb-git-3ceec2f19cff22d7b6078b6a8d5788fa19264b8a.tar.gz |
Merge from 5.1.
Diffstat (limited to 'sql/set_var.cc')
-rw-r--r-- | sql/set_var.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/set_var.cc b/sql/set_var.cc index f31fe6a351d..8e48e0213f0 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -117,7 +117,8 @@ void sys_var_end() sys_var constructor @param chain variables are linked into chain for mysql_add_sys_var_chain() - @param name_arg the name of the variable. @sa my_option::name + @param name_arg the name of the variable. Must be 0-terminated and exist + for the liftime of the sys_var object. @sa my_option::name @param comment shown in mysqld --help, @sa my_option::comment @param flags_arg or'ed flag_enum values @param off offset of the global variable value from the @@ -164,8 +165,8 @@ sys_var::sys_var(sys_var_chain *chain, const char *name_arg, */ DBUG_ASSERT(parse_flag == PARSE_NORMAL || getopt_id <= 0 || getopt_id >= 255); - name.str= name_arg; - name.length= strlen(name_arg); + name.str= name_arg; // ER_NO_DEFAULT relies on 0-termination of name_arg + name.length= strlen(name_arg); // and so does this. DBUG_ASSERT(name.length <= NAME_CHAR_LEN); bzero(&option, sizeof(option)); |