diff options
author | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-12-05 12:33:02 -0500 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@mariadb.com> | 2014-12-05 12:33:02 -0500 |
commit | 3bb02f3e6d70687b02c6902fd6478e8c328608f8 (patch) | |
tree | 7962068cae78450246a484cf95cbe5cf2e37382a /mysys | |
parent | a4cdd20d49a5a6ca0eb7346b7b9e898ac5e7995b (diff) | |
parent | ffc0ef63164e9a121d8a02323afe32a82299171e (diff) | |
download | mariadb-git-3bb02f3e6d70687b02c6902fd6478e8c328608f8.tar.gz |
bzr merge -rtag:mariadb-10.0.15 maria/10.0
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/ma_dyncol.c | 1 | ||||
-rw-r--r-- | mysys/mf_fn_ext.c | 14 | ||||
-rw-r--r-- | mysys/my_default.c | 2 |
3 files changed, 9 insertions, 8 deletions
diff --git a/mysys/ma_dyncol.c b/mysys/ma_dyncol.c index c0508b97922..a7a048acac1 100644 --- a/mysys/ma_dyncol.c +++ b/mysys/ma_dyncol.c @@ -3591,7 +3591,6 @@ end: create_new_string: /* There is no columns from before, so let's just add the new ones */ rc= ER_DYNCOL_OK; - my_free(alloc_plan); if (not_null != 0) rc= dynamic_column_create_many_internal_fmt(str, add_column_count, (uint*)column_keys, values, diff --git a/mysys/mf_fn_ext.c b/mysys/mf_fn_ext.c index cbf0d5dd9e4..b78d73074da 100644 --- a/mysys/mf_fn_ext.c +++ b/mysys/mf_fn_ext.c @@ -29,7 +29,7 @@ (normally '.') after the directory name. RETURN VALUES - Pointer to to the extension character. If there isn't any extension, + Pointer to the extension character. If there isn't any extension, points at the end ASCII(0) of the filename. */ @@ -49,7 +49,7 @@ char *fn_ext(const char *name) if (!(gpos= strrchr(name, FN_LIBCHAR))) gpos= name; #endif - pos=strchr(gpos,FN_EXTCHAR); + pos= strchr(gpos, FN_EXTCHAR); DBUG_RETURN((char*) (pos ? pos : strend(gpos))); } /* fn_ext */ @@ -58,7 +58,7 @@ char *fn_ext(const char *name) Return a pointer to the extension of the filename. SYNOPSIS - fn_ext() + fn_ext2() name Name of file DESCRIPTION @@ -66,7 +66,7 @@ char *fn_ext(const char *name) (normally '.') after the directory name. RETURN VALUES - Pointer to to the extension character. If there isn't any extension, + Pointer to the extension character. If there isn't any extension, points at the end ASCII(0) of the filename. */ @@ -86,6 +86,8 @@ char *fn_ext2(const char *name) if (!(gpos= strrchr(name, FN_LIBCHAR))) gpos= name; #endif - pos=strrchr(gpos,FN_EXTCHAR); + // locate the last occurence of FN_EXTCHAR + pos= strrchr(gpos, FN_EXTCHAR); DBUG_RETURN((char*) (pos ? pos : strend(gpos))); -} /* fn_ext */ +} /* fn_ext2 */ + diff --git a/mysys/my_default.c b/mysys/my_default.c index f383a3ce1e6..a39c61a9d16 100644 --- a/mysys/my_default.c +++ b/mysys/my_default.c @@ -861,7 +861,7 @@ static int search_default_file_with_ext(Process_option_func opt_handler, for (i= 0; i < (uint) search_dir->number_of_files; i++) { search_file= search_dir->dir_entry + i; - ext= fn_ext(search_file->name); + ext= fn_ext2(search_file->name); /* check extension */ for (tmp_ext= (char**) f_extensions; *tmp_ext; tmp_ext++) |