diff options
author | Sergei Golubchik <sergii@pisem.net> | 2012-11-03 12:28:51 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2012-11-03 12:28:51 +0100 |
commit | 40e94a3734b1daa254810c4be64e17b84dbbc2a2 (patch) | |
tree | 5e14dfc106276445caf85dc76c8034c8b0df11b4 /mysys | |
parent | 247e654fa7e04dd0c5181c2241470f56749d2a99 (diff) | |
parent | 4ffc9c3b01459a2904a7154a6c750d128864fc7b (diff) | |
download | mariadb-git-40e94a3734b1daa254810c4be64e17b84dbbc2a2.tar.gz |
merge with 5.5
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/mf_iocache.c | 7 | ||||
-rw-r--r-- | mysys/my_context.c | 19 | ||||
-rw-r--r-- | mysys/my_getopt.c | 5 | ||||
-rw-r--r-- | mysys/stacktrace.c | 1 |
4 files changed, 25 insertions, 7 deletions
diff --git a/mysys/mf_iocache.c b/mysys/mf_iocache.c index f9e51e48189..02e5c5373ae 100644 --- a/mysys/mf_iocache.c +++ b/mysys/mf_iocache.c @@ -1527,8 +1527,13 @@ int _my_b_get(IO_CACHE *info) int _my_b_write(register IO_CACHE *info, const uchar *Buffer, size_t Count) { size_t rest_length,length; + my_off_t pos_in_file= info->pos_in_file; - if (info->pos_in_file+info->buffer_length > info->end_of_file) + DBUG_EXECUTE_IF("simulate_huge_load_data_file", + { + pos_in_file=(my_off_t)(5000000000ULL); + }); + if (pos_in_file+info->buffer_length > info->end_of_file) { my_errno=errno=EFBIG; return info->error = -1; diff --git a/mysys/my_context.c b/mysys/my_context.c index 1a147437c90..6b8761e554d 100644 --- a/mysys/my_context.c +++ b/mysys/my_context.c @@ -1,5 +1,5 @@ /* - Copyright 2011 Kristian Nielsen and Monty Program Ab + Copyright 2011, 2012 Kristian Nielsen and Monty Program Ab This file is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -454,6 +454,15 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d) ( "movl %%esp, (%[save])\n\t" "movl %[stack], %%esp\n\t" +#if __GNUC__ >= 4 && __GNUC_MINOR__ >= 4 + /* + This emits a DWARF DW_CFA_undefined directive to make the return address + undefined. This indicates that this is the top of the stack frame, and + helps tools that use DWARF stack unwinding to obtain stack traces. + (I use numeric constant to avoid a dependency on libdwarf includes). + */ + ".cfi_escape 0x07, 8\n\t" +#endif /* Push the parameter on the stack. */ "pushl %[d]\n\t" "movl %%ebp, 4(%[save])\n\t" @@ -483,12 +492,12 @@ my_context_spawn(struct my_context *c, void (*f)(void *), void *d) "3:\n\t" "movl $1, %[ret]\n" "4:\n" - : [ret] "=a" (ret) + : [ret] "=a" (ret), + [f] "+c" (f), + [d] "+d" (d) : [stack] "a" (c->stack_top), /* Need this in callee-save register to preserve across function call. */ - [save] "D" (&c->save[0]), - [f] "c" (f), - [d] "d" (d) + [save] "D" (&c->save[0]) : "memory", "cc" ); diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c index c1b0a129a30..7905ad90877 100644 --- a/mysys/my_getopt.c +++ b/mysys/my_getopt.c @@ -720,6 +720,11 @@ static int setval(const struct my_option *opts, void *value, char *argument, } *(ulong*)value= arg; } + else if (type < 0) + { + res= EXIT_AMBIGUOUS_OPTION; + goto ret; + } else *(ulong*)value= type - 1; } diff --git a/mysys/stacktrace.c b/mysys/stacktrace.c index 846a90cc127..402520990b6 100644 --- a/mysys/stacktrace.c +++ b/mysys/stacktrace.c @@ -654,7 +654,6 @@ void my_print_stacktrace(uchar* unused1, ulong unused2) &(package.sym)); have_source= SymGetLineFromAddr64(hProcess, addr, &line_offset, &line); - my_safe_printf_stderr("%p ", (uintptr_t)addr); if(have_module) { const char *base_image_name= my_basename(module.ImageName); |