diff options
author | sergefp@mysql.com <> | 2005-08-07 21:32:26 +0000 |
---|---|---|
committer | sergefp@mysql.com <> | 2005-08-07 21:32:26 +0000 |
commit | 65566e449d6efb074c5a772f74f72eca108188e6 (patch) | |
tree | 19c52ad26d2fdf1af81b89c06a0300c8fc241e1c /mysql-test | |
parent | b76cea46e936376a33bdb5c8c001bac649585e29 (diff) | |
parent | 0dba629a5ee2a4700d432e12622bcada42a4de8a (diff) | |
download | mariadb-git-65566e449d6efb074c5a772f74f72eca108188e6.tar.gz |
Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/psergey/mysql-5.0-bug11869-part3
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/fulltext_order_by.result | 18 | ||||
-rw-r--r-- | mysql-test/r/group_by.result | 7 | ||||
-rw-r--r-- | mysql-test/t/fulltext_order_by.test | 20 | ||||
-rw-r--r-- | mysql-test/t/group_by.test | 10 |
4 files changed, 50 insertions, 5 deletions
diff --git a/mysql-test/r/fulltext_order_by.result b/mysql-test/r/fulltext_order_by.result index 3b52be4b1f2..2c421826bb4 100644 --- a/mysql-test/r/fulltext_order_by.result +++ b/mysql-test/r/fulltext_order_by.result @@ -1,4 +1,4 @@ -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, message CHAR(20), @@ -158,5 +158,19 @@ where match(c.beitrag) against ('+abc' in boolean mode) order by match(betreff) against ('+abc' in boolean mode) desc; -ERROR HY000: The used table type doesn't support FULLTEXT indexes +text id betreff +(select b.id, b.betreff from t3 b) union +(select b.id, b.betreff from t3 b) +order by match(betreff) against ('+abc' in boolean mode) desc; +id betreff +(select b.id, b.betreff from t3 b) union +(select b.id, b.betreff from t3 b) +order by match(betreff) against ('+abc') desc; +ERROR HY000: Can't find FULLTEXT index matching the column list +select distinct b.id, b.betreff from t3 b +order by match(betreff) against ('+abc' in boolean mode) desc; +id betreff +select b.id, b.betreff from t3 b group by b.id+1 +order by match(betreff) against ('+abc' in boolean mode) desc; +id betreff drop table t1,t2,t3; diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result index 64446e63e6f..f7742178cbe 100644 --- a/mysql-test/r/group_by.result +++ b/mysql-test/r/group_by.result @@ -756,6 +756,13 @@ INSERT INTO t1 VALUES (1); SELECT n+1 AS n FROM t1 GROUP BY n; n 2 +create table t1 (f1 date); +insert into t1 values('2005-06-06'); +insert into t1 values('2005-06-06'); +select date(left(f1+0,8)) from t1 group by 1; +date(left(f1+0,8)) +2005-06-06 +drop table t1; Warnings: Warning 1052 Column 'n' in group statement is ambiguous DROP TABLE t1; diff --git a/mysql-test/t/fulltext_order_by.test b/mysql-test/t/fulltext_order_by.test index a0bd7954674..444f1b0510c 100644 --- a/mysql-test/t/fulltext_order_by.test +++ b/mysql-test/t/fulltext_order_by.test @@ -1,5 +1,5 @@ --disable_warnings -DROP TABLE IF EXISTS t1; +DROP TABLE IF EXISTS t1,t2,t3; --enable_warnings CREATE TABLE t1 ( @@ -117,8 +117,6 @@ where order by match(b.betreff) against ('+abc' in boolean mode) desc; --- todo psergey: fix ---error 1214 select a.text, b.id, b.betreff from t2 a inner join t3 b on a.id = b.forum inner join @@ -135,6 +133,22 @@ where order by match(betreff) against ('+abc' in boolean mode) desc; +# BUG#11869 part2: used table type doesn't support FULLTEXT indexes error +(select b.id, b.betreff from t3 b) union +(select b.id, b.betreff from t3 b) +order by match(betreff) against ('+abc' in boolean mode) desc; + +--error 1191 +(select b.id, b.betreff from t3 b) union +(select b.id, b.betreff from t3 b) +order by match(betreff) against ('+abc') desc; + +select distinct b.id, b.betreff from t3 b +order by match(betreff) against ('+abc' in boolean mode) desc; + +select b.id, b.betreff from t3 b group by b.id+1 +order by match(betreff) against ('+abc' in boolean mode) desc; + drop table t1,t2,t3; # End of 4.1 tests diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test index bfbdd098426..434c2662614 100644 --- a/mysql-test/t/group_by.test +++ b/mysql-test/t/group_by.test @@ -576,6 +576,16 @@ INSERT INTO t1 VALUES ('trans1'), ('trans2'); CREATE TABLE t2 (id varchar(20) NOT NULL, err_comment blob NOT NULL); INSERT INTO t2 VALUES ('trans1', 'a problem'); +# +# Bug #12266 GROUP BY expression on DATE column produces result with +# reduced length +# +create table t1 (f1 date); +insert into t1 values('2005-06-06'); +insert into t1 values('2005-06-06'); +select date(left(f1+0,8)) from t1 group by 1; +drop table t1; + SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS comment FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY comment; |