Commit 7ca7da41 authored by unknown's avatar unknown
Browse files

Merge spetrunia@bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/psergey/mysql-5.0-bug11869-part3


BitKeeper/deleted/.del-not_windows.inc:
  Auto merged
mysql-test/r/create.result:
  Auto merged
mysql-test/r/query_cache.result:
  Auto merged
mysql-test/r/type_datetime.result:
  Auto merged
mysql-test/t/query_cache.test:
  Auto merged
mysql-test/t/rpl_flush_tables.test:
  Auto merged
sql/item_sum.cc:
  Auto merged
sql/mysql_priv.h:
  Auto merged
sql-common/my_time.c:
  Auto merged
sql/sql_select.cc:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/sql_union.cc:
  Auto merged
parents 9cd28273 f34d542c
Loading
Loading
Loading
Loading
+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),
@@ -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;
+7 −0
Original line number Diff line number Diff line
@@ -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;
+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 (
@@ -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
+10 −0
Original line number Diff line number Diff line
@@ -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;

+4 −2
Original line number Diff line number Diff line
@@ -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
@@ -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