summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-19 21:48:08 -0200
committerDavi Arnaut <Davi.Arnaut@Sun.COM>2009-11-19 21:48:08 -0200
commit5aeeaaf507ac87f6ff56806fe8a356cea7d4a48f (patch)
treed21225ac09b301f317ca89093128769a5ede9fbb /mysys
parent780871d8b90fe3146db39b4be65ebedb309b9f9b (diff)
parent5128b54c38ae183d18a29e00b318c22046445715 (diff)
downloadmariadb-git-5aeeaaf507ac87f6ff56806fe8a356cea7d4a48f.tar.gz
Manual merge of mysql-next-mr-runtime upstream.
Diffstat (limited to 'mysys')
-rw-r--r--mysys/my_alloc.c4
-rw-r--r--mysys/my_getopt.c8
2 files changed, 10 insertions, 2 deletions
diff --git a/mysys/my_alloc.c b/mysys/my_alloc.c
index 2607ea57d08..9c45cdc2277 100644
--- a/mysys/my_alloc.c
+++ b/mysys/my_alloc.c
@@ -155,7 +155,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
DBUG_ASSERT(alloc_root_inited(mem_root));
length+=ALIGN_SIZE(sizeof(USED_MEM));
- if (!(next = (USED_MEM*) my_malloc(length,MYF(MY_WME))))
+ if (!(next = (USED_MEM*) my_malloc(length,MYF(MY_WME | ME_FATALERROR))))
{
if (mem_root->error_handler)
(*mem_root->error_handler)();
@@ -198,7 +198,7 @@ void *alloc_root(MEM_ROOT *mem_root, size_t length)
get_size= length+ALIGN_SIZE(sizeof(USED_MEM));
get_size= max(get_size, block_size);
- if (!(next = (USED_MEM*) my_malloc(get_size,MYF(MY_WME))))
+ if (!(next = (USED_MEM*) my_malloc(get_size,MYF(MY_WME | ME_FATALERROR))))
{
if (mem_root->error_handler)
(*mem_root->error_handler)();
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index f444e0f0c94..2e8f09f14fd 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -1222,6 +1222,14 @@ void my_print_help(const struct my_option *options)
printf("%s", comment);
}
putchar('\n');
+ if ((optp->var_type & GET_TYPE_MASK) == GET_NO_ARG ||
+ (optp->var_type & GET_TYPE_MASK) == GET_BOOL)
+ {
+ if (optp->def_value != 0)
+ {
+ printf("%*s(Defaults to on; use --skip-%s to disable.)\n", name_space, "", optp->name);
+ }
+ }
}
}