diff options
author | unknown <stewart@willster.(none)> | 2006-10-20 22:47:28 +1000 |
---|---|---|
committer | unknown <stewart@willster.(none)> | 2006-10-20 22:47:28 +1000 |
commit | 7c0b76a8031dbc5126a0ee542daec0b919533d5d (patch) | |
tree | adebb4f921becbbf541077dcdfa4c10145f22384 /mysys/string.c | |
parent | 5fd7e5e32cc0878f131856ea9e59594293db07d9 (diff) | |
download | mariadb-git-7c0b76a8031dbc5126a0ee542daec0b919533d5d.tar.gz |
BUG#20839 Illegal error code: 155 returned downgrading from 5.1.12-> 5.1.11
post-review fixups - magnus suggested creating dynstr_trunc instead of doing
it manually.
client/mysqldump.c:
use dynstr_trunc instead of manually fiddling with the string
include/my_sys.h:
add dynstr_trunc
mysys/string.c:
add dynstr_trunc
Diffstat (limited to 'mysys/string.c')
-rw-r--r-- | mysys/string.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/mysys/string.c b/mysys/string.c index dfd42d137dd..368f7344aa6 100644 --- a/mysys/string.c +++ b/mysys/string.c @@ -115,6 +115,12 @@ my_bool dynstr_append_mem(DYNAMIC_STRING *str, const char *append, return FALSE; } +my_bool dynstr_trunc(DYNAMIC_STRING *str, int n) +{ + str->length-=n; + str->str[str->length]= '\0'; + return FALSE; +} void dynstr_free(DYNAMIC_STRING *str) { |