diff options
author | unknown <jimw@mysql.com> | 2005-07-22 11:46:29 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-07-22 11:46:29 -0700 |
commit | e61f89747678581be98b6ddb3494ebca54c985c1 (patch) | |
tree | 2d9101f44231ffd75ff9767a455be7e569ce1196 /mysql-test/r/func_str.result | |
parent | de0d584b7167b9e752acbcc851b200b26a45db3f (diff) | |
download | mariadb-git-e61f89747678581be98b6ddb3494ebca54c985c1.tar.gz |
Fix calculation for length of LPAD() and RPAD() reported to
client via mysql_fetch_fields(). (Bug #11311)
mysql-test/r/func_str.result:
Add new results
mysql-test/t/func_str.test:
Add new regression test
sql/item_strfunc.cc:
Fix length reported for LPAD() and RPAD() -- they always truncate to the
length that is given.
Diffstat (limited to 'mysql-test/r/func_str.result')
-rw-r--r-- | mysql-test/r/func_str.result | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result index 18a04574596..4c3a03b8066 100644 --- a/mysql-test/r/func_str.result +++ b/mysql-test/r/func_str.result @@ -868,3 +868,18 @@ drop table t1; select hex(29223372036854775809), hex(-29223372036854775809); hex(29223372036854775809) hex(-29223372036854775809) FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF +create table t1 (i int); +insert into t1 values (1000000000),(1); +select lpad(i, 7, ' ') as t from t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def t 253 7 7 Y 128 31 63 +t +1000000 + 1 +select rpad(i, 7, ' ') as t from t1; +Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr +def t 253 7 7 Y 128 31 63 +t +1000000 +1 +drop table t1; |