diff options
author | unknown <jimw@rama.(none)> | 2006-08-17 14:09:24 -0700 |
---|---|---|
committer | unknown <jimw@rama.(none)> | 2006-08-17 14:09:24 -0700 |
commit | 8d8fa0e312bd5e0fcb807fd757414d7d9eb4db32 (patch) | |
tree | 1c7dc589490315dd11fafb9b7e6efc33446857e0 /mysql-test/t/mysqldump.test | |
parent | 842ec2334118f67541c77bb824a7baffe5ba2b62 (diff) | |
download | mariadb-git-8d8fa0e312bd5e0fcb807fd757414d7d9eb4db32.tar.gz |
Bug #21288: mysqldump segmentation fault when using --where
The problem was that the error handling was using a too-small buffer to
print the error message generated. We fix this by not using a buffer at
all, but by using fprintf() directly. There were also some problems with
the error handling in table dumping that was exposed by this fix that were
also corrected.
client/mysqldump.c:
Use fprintf() instead of my_printf_error() to avoid buffer overflow issues.
Since ME_BELL wasn't specified, calling my_printf_error() offered no advantage
except for adding my_progname, which we just go ahead and do manually. Also,
fix the error handling in dumpTable() when queries to get data fail and --force
was specified.
mysql-test/r/mysqldump.result:
Add new results
mysql-test/t/mysqldump.test:
Add new regression test
Diffstat (limited to 'mysql-test/t/mysqldump.test')
-rw-r--r-- | mysql-test/t/mysqldump.test | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test index e86635e24d0..b0df2bb9db2 100644 --- a/mysql-test/t/mysqldump.test +++ b/mysql-test/t/mysqldump.test @@ -694,4 +694,12 @@ create table t3(a int); --exec $MYSQL_DUMP --skip-comments --force --no-data test t3 t1 non_existing t2 drop table t1, t2, t3; +# +# Bug #21288: mysqldump segmentation fault when using --where +# +create table t1 (a int); +--error 2 +--exec $MYSQL_DUMP --skip-comments --force test t1 --where='xx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' 2>&1 +drop table t1; + --echo End of 4.1 tests |