From 8bed69fa9ec200925d9a9ec36419d2c5eecf9739 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 24 Jun 2003 17:07:43 +0500 Subject: Test case for bug #666 mysql-test/r/func_str.result: test for bug #666 result mysql-test/t/func_str.test: test for bug #666 --- mysql-test/t/func_str.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mysql-test/t/func_str.test') diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 118de6cd01e..476629f98d3 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -125,3 +125,15 @@ CREATE TABLE t1 (id int(11) NOT NULL auto_increment, tmp text NOT NULL, KEY id ( INSERT INTO t1 VALUES (1, 'a545f661efdd1fb66fdee3aab79945bf'); SELECT 1 FROM t1 WHERE tmp=AES_DECRYPT(tmp,"password"); DROP TABLE t1; + +CREATE TABLE t1 ( + wid int(10) unsigned NOT NULL auto_increment, + data_podp date default NULL, + status_wnio enum('nowy','podp','real','arch') NOT NULL default 'nowy', + PRIMARY KEY(wid), +); + +INSERT INTO t1 VALUES (8,NULL,'real'); +INSERT INTO t1 VALUES (9,NULL,'nowy'); +SELECT elt(status_wnio,data_podp) FROM t1 GROUP BY wid; +DROP TABLE t1; -- cgit v1.2.1 From 33c416f67e6ba11ca1e21888be6cd9c0cc647813 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 3 Jul 2003 23:24:23 +0500 Subject: Fix for #739 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 --- mysql-test/t/func_str.test | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'mysql-test/t/func_str.test') diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test index 476629f98d3..5ea3654134b 100644 --- a/mysql-test/t/func_str.test +++ b/mysql-test/t/func_str.test @@ -137,3 +137,17 @@ INSERT INTO t1 VALUES (8,NULL,'real'); INSERT INTO t1 VALUES (9,NULL,'nowy'); SELECT elt(status_wnio,data_podp) FROM t1 GROUP BY wid; DROP TABLE t1; + +# +# test for #739 + +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("",RPAD("",(55 - LENGTH(title)),".")) from t1; + +DROP TABLE t1; -- cgit v1.2.1