Loading mysql-test/r/fulltext_order_by.result +16 −2 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, message CHAR(20), Loading Loading @@ -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; mysql-test/r/group_by.result +7 −0 Original line number Diff line number Diff line Loading @@ -751,6 +751,13 @@ COUNT(DISTINCT(t1.id)) comment 1 NULL 1 a problem DROP TABLE t1, t2; 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; CREATE TABLE t1 (n int); INSERT INTO t1 VALUES (1); SELECT n+1 AS n FROM t1 GROUP BY n; Loading mysql-test/t/fulltext_order_by.test +17 −3 Original line number Diff line number Diff line --disable_warnings DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1,t2,t3; --enable_warnings CREATE TABLE t1 ( Loading Loading @@ -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 Loading @@ -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 mysql-test/t/group_by.test +11 −1 Original line number Diff line number Diff line Loading @@ -575,12 +575,22 @@ CREATE TABLE t1 (id varchar(20) NOT NULL); 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'); SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS comment FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY comment; DROP TABLE t1, t2; # # 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; # # Test for bug #11414: crash on Windows for a simple GROUP BY query # Loading sql/item_sum.cc +4 −2 Original line number Diff line number Diff line Loading @@ -2291,7 +2291,8 @@ bool Item_sum_count_distinct::setup(THD *thd) DBUG_ASSERT(table == 0); if (!(table= create_tmp_table(thd, tmp_table_param, list, (ORDER*) 0, 1, 0, select_lex->options | thd->options, (select_lex->options | thd->options) & ~TMP_TABLE_FORCE_MYISAM, HA_POS_ERROR, (char*)""))) return TRUE; table->file->extra(HA_EXTRA_NO_ROWS); // Don't update rows Loading Loading @@ -3073,7 +3074,8 @@ bool Item_func_group_concat::setup(THD *thd) */ if (!(table= create_tmp_table(thd, tmp_table_param, all_fields, (ORDER*) 0, 0, TRUE, select_lex->options | thd->options, (select_lex->options | thd->options) & ~TMP_TABLE_FORCE_MYISAM, HA_POS_ERROR, (char*) ""))) DBUG_RETURN(TRUE); table->file->extra(HA_EXTRA_NO_ROWS); Loading Loading
mysql-test/r/fulltext_order_by.result +16 −2 Original line number Diff line number Diff line DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1,t2,t3; CREATE TABLE t1 ( a INT AUTO_INCREMENT PRIMARY KEY, message CHAR(20), Loading Loading @@ -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;
mysql-test/r/group_by.result +7 −0 Original line number Diff line number Diff line Loading @@ -751,6 +751,13 @@ COUNT(DISTINCT(t1.id)) comment 1 NULL 1 a problem DROP TABLE t1, t2; 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; CREATE TABLE t1 (n int); INSERT INTO t1 VALUES (1); SELECT n+1 AS n FROM t1 GROUP BY n; Loading
mysql-test/t/fulltext_order_by.test +17 −3 Original line number Diff line number Diff line --disable_warnings DROP TABLE IF EXISTS t1; DROP TABLE IF EXISTS t1,t2,t3; --enable_warnings CREATE TABLE t1 ( Loading Loading @@ -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 Loading @@ -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
mysql-test/t/group_by.test +11 −1 Original line number Diff line number Diff line Loading @@ -575,12 +575,22 @@ CREATE TABLE t1 (id varchar(20) NOT NULL); 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'); SELECT COUNT(DISTINCT(t1.id)), LEFT(err_comment, 256) AS comment FROM t1 LEFT JOIN t2 ON t1.id=t2.id GROUP BY comment; DROP TABLE t1, t2; # # 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; # # Test for bug #11414: crash on Windows for a simple GROUP BY query # Loading
sql/item_sum.cc +4 −2 Original line number Diff line number Diff line Loading @@ -2291,7 +2291,8 @@ bool Item_sum_count_distinct::setup(THD *thd) DBUG_ASSERT(table == 0); if (!(table= create_tmp_table(thd, tmp_table_param, list, (ORDER*) 0, 1, 0, select_lex->options | thd->options, (select_lex->options | thd->options) & ~TMP_TABLE_FORCE_MYISAM, HA_POS_ERROR, (char*)""))) return TRUE; table->file->extra(HA_EXTRA_NO_ROWS); // Don't update rows Loading Loading @@ -3073,7 +3074,8 @@ bool Item_func_group_concat::setup(THD *thd) */ if (!(table= create_tmp_table(thd, tmp_table_param, all_fields, (ORDER*) 0, 0, TRUE, select_lex->options | thd->options, (select_lex->options | thd->options) & ~TMP_TABLE_FORCE_MYISAM, HA_POS_ERROR, (char*) ""))) DBUG_RETURN(TRUE); table->file->extra(HA_EXTRA_NO_ROWS); Loading