diff options
author | unknown <monty@hundin.mysql.fi> | 2002-03-06 18:36:31 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-03-06 18:36:31 +0200 |
commit | d6998363afc004fd92248af521ed40fa52027954 (patch) | |
tree | b15e545bf81d86ec528ceb737592fa34e6024c18 /mysql-test | |
parent | 39cdb786fd7db97399fff788df7547f5be73b132 (diff) | |
download | mariadb-git-d6998363afc004fd92248af521ed40fa52027954.tar.gz |
Fixed bug in DATE_FORMAT when used with GROUP BY
Build-tools/Do-compile:
Fixed typo
Docs/manual.texi:
Changelog
mysql-test/r/type_date.result:
Added test of bug in DATE_FORMAT
mysql-test/t/type_date.test:
Added test of bug in DATE_FORMAT
scripts/mysqlhotcopy.sh:
Fix for RAID files
sql/table.cc:
Fixed typo in last patch
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/type_date.result | 4 | ||||
-rw-r--r-- | mysql-test/t/type_date.test | 13 |
2 files changed, 17 insertions, 0 deletions
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result index 9aa6d6fb9b7..df8f0ee1814 100644 --- a/mysql-test/r/type_date.result +++ b/mysql-test/r/type_date.result @@ -18,3 +18,7 @@ s date_add(date,INTERVAL 1 DAY) date_add(date,INTERVAL 1 SECOND) 2000-08-11 2000-08-10 00:00:01 2000-08-12 2000-08-11 00:00:01 +DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) +Wed, 06 March 2002 10:11:12 GMT-0800 +DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) +Wed, 06 March 2002 10:11:12 GMT-0800 Wed, 06 March 2002 10:11:12 GMT-0800 diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test index 0d2e18bcc94..68c2d55aac9 100644 --- a/mysql-test/t/type_date.test +++ b/mysql-test/t/type_date.test @@ -62,3 +62,16 @@ create table t1 (date date); insert into t1 values ("2000-08-10"),("2000-08-11"); select date_add(date,INTERVAL 1 DAY),date_add(date,INTERVAL 1 SECOND) from t1; drop table t1; + +# +# Test problem with DATE_FORMAT +# + +CREATE TABLE t1(AFIELD INT); +INSERT INTO t1 VALUES(1); +CREATE TABLE t2(GMT VARCHAR(32)); +INSERT INTO t2 VALUES('GMT-0800'); +SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) FROM t1, t2 GROUP BY t1.AFIELD; +INSERT INTO t1 VALUES(1); +SELECT DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)), DATE_FORMAT("2002-03-06 10:11:12", CONCAT('%a, %d %M %Y %H:%i:%s ' , t2.GMT)) FROM t1,t2 GROUP BY t1.AFIELD; +drop table t1,t2; |