1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00
check for negative count in RPAD added


mysql-test/r/func_str.result:
  Appropriate result
mysql-test/t/func_str.test:
  testcase added
sql/item_strfunc.cc:
  we return NULL if count < 0
This commit is contained in:
unknown
2003-07-03 23:24:23 +05:00
parent fd0ecf1e47
commit 33c416f67e
3 changed files with 25 additions and 1 deletions

View File

@ -247,3 +247,13 @@ elt(status_wnio,data_podp)
NULL
NULL
DROP TABLE t1;
CREATE TABLE t1 (
title text
) TYPE=MyISAM;
INSERT INTO t1 VALUES ('Congress reconvenes in September to debate welfare and adult education');
INSERT INTO t1 VALUES ('House passes the CAREERS bill');
SELECT CONCAT("</a>",RPAD("",(55 - LENGTH(title)),".")) from t1;
CONCAT("</a>",RPAD("",(55 - LENGTH(title)),"."))
NULL
</a>..........................
DROP TABLE t1;