summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqltest.test
diff options
context:
space:
mode:
authorBjorn Munch <Bjorn.Munch@sun.com>2010-01-20 12:52:35 +0100
committerBjorn Munch <Bjorn.Munch@sun.com>2010-01-20 12:52:35 +0100
commit35d0d10ac281acb87b35caec0ceb0eade9a6927d (patch)
tree308ea0417ae1dac871b4396120117c6ada7335c8 /mysql-test/t/mysqltest.test
parentbe128c547fc614349695208f37fccf2a86e2139a (diff)
downloadmariadb-git-35d0d10ac281acb87b35caec0ceb0eade9a6927d.tar.gz
Bug #48888 mysqltest crashes on --replace_result if 'from' is longer than ~1024 symbols
valgrind pointed to a buffer allocated by my_realloc which looked fishy Replaced size with what was probably intended, added test case. Now also fixed line after review comment
Diffstat (limited to 'mysql-test/t/mysqltest.test')
-rw-r--r--mysql-test/t/mysqltest.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test
index 45fc0715312..7f5a46fdcee 100644
--- a/mysql-test/t/mysqltest.test
+++ b/mysql-test/t/mysqltest.test
@@ -1285,6 +1285,17 @@ select "a" as col1, "c" as col2;
--error 1
--exec echo "--replace_column 1 b c " | $MYSQL_TEST 2>&1
+let $long_rep= 1234567890123456789012345678901234567890;
+let $long_rep= $long_rep,$long_rep;
+let $long_rep= $long_rep,$long_rep;
+let $long_rep= $long_rep,$long_rep;
+let $long_rep= $long_rep,$long_rep;
+let $long_rep= $long_rep,$long_rep;
+
+# This tests from strings > 1024 (here 1311)
+
+--replace_result $long_rep LONG_STRING
+eval select "$long_rep" as x;
# ----------------------------------------------------------------------------
# Test sync_with_master