diff options
author | Bjorn Munch <Bjorn.Munch@sun.com> | 2010-01-20 14:22:34 +0100 |
---|---|---|
committer | Bjorn Munch <Bjorn.Munch@sun.com> | 2010-01-20 14:22:34 +0100 |
commit | 87ff57cb7eaefd87e54ec0cbf80f71af2167581a (patch) | |
tree | a666e6fe05ffb3a85619fcd061abdaced55179e0 | |
parent | a1c940535464869f11287ec193d5d1ce9afcb8b5 (diff) | |
parent | b554f4c52d072518548f41c609144f98f2fae237 (diff) | |
download | mariadb-git-87ff57cb7eaefd87e54ec0cbf80f71af2167581a.tar.gz |
merge 48888
-rw-r--r-- | client/mysqltest.cc | 4 | ||||
-rw-r--r-- | mysql-test/r/mysqltest.result | 3 | ||||
-rw-r--r-- | mysql-test/t/mysqltest.test | 11 |
3 files changed, 16 insertions, 2 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 68668c92e3e..bafc5f6781d 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -9477,7 +9477,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name) if (pa->length+length >= pa->max_length) { if (!(new_pos= (uchar*) my_realloc((uchar*) pa->str, - (uint) (pa->max_length+PS_MALLOC), + (uint) (pa->length+length+PS_MALLOC), MYF(MY_WME)))) DBUG_RETURN(1); if (new_pos != pa->str) @@ -9488,7 +9488,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name) char*); pa->str=new_pos; } - pa->max_length+=PS_MALLOC; + pa->max_length= pa->length+length+PS_MALLOC; } if (pa->typelib.count >= pa->max_count-1) { diff --git a/mysql-test/r/mysqltest.result b/mysql-test/r/mysqltest.result index e1dac73ab1d..ae860e2a72c 100644 --- a/mysql-test/r/mysqltest.result +++ b/mysql-test/r/mysqltest.result @@ -421,6 +421,9 @@ mysqltest: At line 1: Wrong number of arguments to replace_column in 'replace_co mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a b' mysqltest: At line 1: Wrong column number to replace_column in 'replace_column a 1' mysqltest: At line 1: Wrong column number to replace_column in 'replace_column 1 b c ' +select "LONG_STRING" as x; +x +LONG_STRING mysqltest: At line 1: Invalid integer argument "10!" mysqltest: At line 1: Invalid integer argument "a" mysqltest: At line 1: Missing required argument 'connection name' to command 'connect' diff --git a/mysql-test/t/mysqltest.test b/mysql-test/t/mysqltest.test index 63e15a84a72..3212c82bffd 100644 --- a/mysql-test/t/mysqltest.test +++ b/mysql-test/t/mysqltest.test @@ -1316,6 +1316,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 |