Commit 0153d67e authored by unknown's avatar unknown
Browse files

Merge bk-internal:/home/bk/mysql-4.1

into  dl145s.mysql.com:/data/bk/team_tree_merge/MERGE/mysql-4.1-opt


sql/sql_base.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
parents 2576c4c0 9bfaab57
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -71,6 +71,21 @@ ha_rows mi_records_in_range(MI_INFO *info, int inx, key_range *min_key,
    uchar * key_buff;
    uint start_key_len;

    /*
      The problem is that the optimizer doesn't support
      RTree keys properly at the moment.
      Hope this will be fixed some day.
      But now NULL in the min_key means that we
      didn't make the task for the RTree key
      and expect BTree functionality from it.
      As it's not able to handle such request
      we return the error.
    */
    if (!min_key)
    {
      res= HA_POS_ERROR;
      break;
    }
    key_buff= info->lastkey+info->s->base.max_key_length;
    start_key_len= _mi_pack_key(info,inx, key_buff,
                                (uchar*) min_key->key, min_key->length,
+0 −5
Original line number Diff line number Diff line
@@ -74,11 +74,6 @@ grp group_concat(c order by 1)
1	a
2	b,c
3	C,D,d,d,D,E
select grp,group_concat(c order by "c") from t1 group by grp;
grp	group_concat(c order by "c")
1	a
2	b,c
3	C,D,d,d,D,E
select grp,group_concat(distinct c order by c) from t1 group by grp;
grp	group_concat(distinct c order by c)
1	a
+11 −0
Original line number Diff line number Diff line
@@ -857,3 +857,14 @@ CHECK TABLE t1 EXTENDED;
Table	Op	Msg_type	Msg_text
test.t1	check	status	OK
DROP TABLE t1;
CREATE TABLE t1 (foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) );
INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(1,1)));
INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(1,0)));
INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(0,1)));
INSERT INTO t1 (foo) VALUES (PointFromWKB(POINT(0,0)));
SELECT 1 FROM t1 WHERE foo != PointFromWKB(POINT(0,0));
1
1
1
1
DROP TABLE t1;
+45 −0
Original line number Diff line number Diff line
@@ -773,3 +773,48 @@ select sql_buffer_result max(f1)+1 from t1;
max(f1)+1
3
drop table t1;
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES (1),(2);
SELECT a FROM t1 GROUP BY 'a';
a
1
SELECT a FROM t1 GROUP BY "a";
a
1
SELECT a FROM t1 GROUP BY `a`;
a
1
2
set sql_mode=ANSI_QUOTES;
SELECT a FROM t1 GROUP BY "a";
a
1
2
SELECT a FROM t1 GROUP BY 'a';
a
1
SELECT a FROM t1 GROUP BY `a`;
a
1
2
set sql_mode='';
SELECT a FROM t1 HAVING 'a' > 1;
a
SELECT a FROM t1 HAVING "a" > 1;
a
SELECT a FROM t1 HAVING `a` > 1;
a
2
SELECT a FROM t1 ORDER BY 'a' DESC;
a
1
2
SELECT a FROM t1 ORDER BY "a" DESC;
a
1
2
SELECT a FROM t1 ORDER BY `a` DESC;
a
2
1
DROP TABLE t1;
+15 −0
Original line number Diff line number Diff line
@@ -541,3 +541,18 @@ a max(b)
NULL	2
a	1
drop table t1;
create table t1 (a varchar(22) not null , b int);
insert into t1 values ("2006-07-01 21:30", 1), ("2006-07-01 23:30", 10);
select left(a,10), a, sum(b) from t1 group by 1,2 with rollup;
left(a,10)	a	sum(b)
2006-07-01	2006-07-01 21:30	1
2006-07-01	2006-07-01 23:30	10
2006-07-01	NULL	11
NULL	NULL	11
select left(a,10) x, a, sum(b) from t1 group by x,a with rollup;
x	a	sum(b)
2006-07-01	2006-07-01 21:30	1
2006-07-01	2006-07-01 23:30	10
2006-07-01	NULL	11
NULL	NULL	11
drop table t1;
Loading