summaryrefslogtreecommitdiff
path: root/mysys/default.c
diff options
context:
space:
mode:
authorIgnacio Galarza <iggy@mysql.com>2009-03-17 16:29:24 -0400
committerIgnacio Galarza <iggy@mysql.com>2009-03-17 16:29:24 -0400
commit0d588edf61c93ab67fb7e26101a0fc00d021bb11 (patch)
tree3c313f70fd16653491985d8e8108fb5b99f0d5d0 /mysys/default.c
parent5b7347bda31b9d66cd78937e5dc339f553b9a736 (diff)
parent7ca1ebd83a1a7d291593be7a94f5a37298dfc863 (diff)
downloadmariadb-git-0d588edf61c93ab67fb7e26101a0fc00d021bb11.tar.gz
auto-merge
Diffstat (limited to 'mysys/default.c')
-rw-r--r--mysys/default.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mysys/default.c b/mysys/default.c
index dc4cce16ace..1875c0cebbe 100644
--- a/mysys/default.c
+++ b/mysys/default.c
@@ -144,6 +144,7 @@ static char *remove_end_comment(char *ptr);
RETURN
0 ok
1 given cinf_file doesn't exist
+ 2 out of memory
The global variable 'my_defaults_group_suffix' is updated with value for
--defaults_group_suffix
@@ -190,7 +191,7 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
if (!(extra_groups=
(const char**)alloc_root(ctx->alloc,
(2*group->count+1)*sizeof(char*))))
- goto err;
+ DBUG_RETURN(2);
for (i= 0; i < group->count; i++)
{
@@ -199,7 +200,7 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
len= strlen(extra_groups[i]);
if (!(ptr= alloc_root(ctx->alloc, (uint) (len+instance_len+1))))
- goto err;
+ DBUG_RETURN(2);
extra_groups[i+group->count]= ptr;
@@ -254,12 +255,11 @@ int my_search_option_files(const char *conf_file, int *argc, char ***argv,
}
}
- DBUG_RETURN(error);
+ DBUG_RETURN(0);
err:
fprintf(stderr,"Fatal error in defaults handling. Program aborted\n");
- exit(1);
- return 0; /* Keep compiler happy */
+ DBUG_RETURN(1);
}