diff options
author | unknown <gshchepa/uchum@gleb.loc> | 2007-05-28 00:22:44 +0500 |
---|---|---|
committer | unknown <gshchepa/uchum@gleb.loc> | 2007-05-28 00:22:44 +0500 |
commit | 4f9d984572f08a981f13dbb83293a17304a420d8 (patch) | |
tree | d507b01c581dcd55bffd91939feeff21f51f64c2 /client/mysqldump.c | |
parent | 2d6544b496574151acad7fa3e1b81ae387d3e5c2 (diff) | |
parent | 5f99cf963ea4138fd7adb70ec4a9add55388c281 (diff) | |
download | mariadb-git-4f9d984572f08a981f13dbb83293a17304a420d8.tar.gz |
Merge gleb.loc:/home/uchum/work/bk/mysql-5.0-opt
into gleb.loc:/home/uchum/work/bk/mysql-5.1-opt
client/mysqldump.c:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/kill.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/join_outer.test:
Auto merged
mysql-test/t/kill.test:
Auto merged
sql/field.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/sp_head.cc:
Auto merged
sql/sql_base.cc:
Auto merged
mysql-test/r/mysqldump.result:
Merge with 5.0-opt
mysql-test/t/mysqldump.test:
Merge with 5.0-opt
mysql-test/t/view.test:
Merge with 5.0-opt
sql/sql_select.cc:
Merge with 5.0-opt
Diffstat (limited to 'client/mysqldump.c')
-rw-r--r-- | client/mysqldump.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c index afefa467cce..9daadec34bf 100644 --- a/client/mysqldump.c +++ b/client/mysqldump.c @@ -2687,15 +2687,18 @@ static void dump_table(char *table, char *db) plus 2 bytes for '0x' prefix. - In non-HEX mode we need up to 2 bytes per character, plus 2 bytes for leading and trailing '\'' characters. + Also we need to reserve 1 byte for terminating '\0'. */ - dynstr_realloc_checked(&extended_row,length * 2+2); + dynstr_realloc_checked(&extended_row,length * 2 + 2 + 1); if (opt_hex_blob && is_blob) { dynstr_append_checked(&extended_row, "0x"); extended_row.length+= mysql_hex_string(extended_row.str + extended_row.length, row[i], length); - extended_row.str[extended_row.length]= '\0'; + DBUG_ASSERT(extended_row.length+1 <= extended_row.max_length); + /* mysql_hex_string() already terminated string by '\0' */ + DBUG_ASSERT(extended_row.str[extended_row.length] == '\0'); } else { |