summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2018-01-01 19:39:59 +0200
committerMonty <monty@mariadb.org>2018-01-01 19:39:59 +0200
commitfbab79c9b8a58b90292e900cf46ab6d6632ebb68 (patch)
tree49738ad2561489954fa0973d82be10fafbf42e0b /mysys
parentafbb72b3b6988f4c5242d46588754517724b2950 (diff)
parentaed2050e40cb332d54e8d40eb7242309b962c4e1 (diff)
downloadmariadb-git-fbab79c9b8a58b90292e900cf46ab6d6632ebb68.tar.gz
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Conflicts: cmake/make_dist.cmake.in mysql-test/r/func_json.result mysql-test/r/ps.result mysql-test/t/func_json.test mysql-test/t/ps.test sql/item_cmpfunc.h
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_default.c6
-rw-r--r--mysys/my_malloc.c2
-rw-r--r--mysys/typelib.c12
3 files changed, 3 insertions, 17 deletions
diff --git a/mysys/my_default.c b/mysys/my_default.c
index 37f6d2bfbbf..1c8e976d8dc 100644
--- a/mysys/my_default.c
+++ b/mysys/my_default.c
@@ -487,8 +487,7 @@ int load_defaults(const char *conf_file, const char **groups,
easily command line options override options in configuration files
NOTES
- In case of fatal error, the function will print a warning and do
- exit(1)
+ In case of fatal error, the function will print a warning and returns 2
To free used memory one should call free_defaults() with the argument
that was put in *argv
@@ -641,8 +640,7 @@ int my_load_defaults(const char *conf_file, const char **groups,
err:
fprintf(stderr,"Fatal error in defaults handling. Program aborted\n");
- exit(1);
- return 0; /* Keep compiler happy */
+ return 2;
}
diff --git a/mysys/my_malloc.c b/mysys/my_malloc.c
index dc02d3896bd..719c13a040e 100644
--- a/mysys/my_malloc.c
+++ b/mysys/my_malloc.c
@@ -109,7 +109,7 @@ void *my_malloc(size_t size, myf my_flags)
my_error(EE_OUTOFMEMORY, MYF(ME_BELL + ME_WAITTANG +
ME_NOREFRESH + ME_FATALERROR),size);
if (my_flags & MY_FAE)
- exit(1);
+ abort();
}
else
{
diff --git a/mysys/typelib.c b/mysys/typelib.c
index e45ede2c43a..f0be211fd46 100644
--- a/mysys/typelib.c
+++ b/mysys/typelib.c
@@ -45,18 +45,6 @@ int find_type_with_warning(const char *x, TYPELIB *typelib, const char *option)
}
-int find_type_or_exit(const char *x, TYPELIB *typelib, const char *option)
-{
- int res;
- if ((res= find_type_with_warning(x, typelib, option)) <= 0)
- {
- sf_leaking_memory= 1; /* no memory leak reports here */
- exit(1);
- }
- return res;
-}
-
-
/**
Search after a string in a list of strings. Endspace in x is not compared.