mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
merged
man/perror.1: Auto merged scripts/mysqld_safe.sh: Auto merged sql/gen_lex_hash.cc: Auto merged sql/ha_myisam.cc: Auto merged sql/item.cc: Auto merged sql/sql_select.cc: Auto merged strings/ctype-tis620.c: Auto merged mysql-test/r/analyse.result: ul mysql-test/r/group_by.result: ul mysql-test/r/select.result: ul
This commit is contained in:
@ -3,9 +3,11 @@
|
||||
#
|
||||
|
||||
drop table if exists t1,t2;
|
||||
create table t1 (i int, j int);
|
||||
insert into t1 values (1,2), (3,4), (5,6), (7,8);
|
||||
create table t1 (i int, j int, empty_string char(10), bool char(1), d date);
|
||||
insert into t1 values (1,2,"","Y","2002-03-03"), (3,4,"","N","2002-03-04"), (5,6,"","Y","2002-03-04"), (7,8,"","N","2002-03-05");
|
||||
select * from t1 procedure analyse();
|
||||
select * from t1 procedure analyse(2);
|
||||
create table t2 select * from t1 procedure analyse();
|
||||
select * from t2;
|
||||
drop table t1,t2;
|
||||
|
||||
|
@ -68,7 +68,8 @@ CREATE TABLE t1 (
|
||||
|
||||
INSERT INTO t1 VALUES (1,'1970-01-01','1997-10-17 00:00:00',2529,1,21000,11886,'check',0,'F',16200,6);
|
||||
|
||||
!$1056 SELECT COUNT(P.URID),SUM(P.amount),P.method, MIN(PP.recdate+0) > 19980501000000 AS IsNew FROM t1 AS P JOIN t1 as PP WHERE P.URID = PP.URID GROUP BY method,IsNew;
|
||||
--error 1056
|
||||
SELECT COUNT(P.URID),SUM(P.amount),P.method, MIN(PP.recdate+0) > 19980501000000 AS IsNew FROM t1 AS P JOIN t1 as PP WHERE P.URID = PP.URID GROUP BY method,IsNew;
|
||||
|
||||
drop table t1;
|
||||
|
||||
@ -255,6 +256,14 @@ select sql_big_result score,count(*) from t1 group by score desc;
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
|
||||
# not purely group_by bug, but group_by is involved...
|
||||
|
||||
create table t1 (a date default null, b date default null);
|
||||
insert t1 values ('1999-10-01','2000-01-10'), ('1997-01-01','1998-10-01');
|
||||
select a,min(b) c,count(distinct rand()) from t1 group by a having c<a + interval 1 day;
|
||||
drop table t1;
|
||||
|
||||
# Compare with hash keys
|
||||
#
|
||||
|
||||
|
@ -1722,10 +1722,26 @@ drop table t4, t3, t2, t1;
|
||||
|
||||
#
|
||||
# Test of DO
|
||||
#
|
||||
|
||||
DO 1;
|
||||
DO benchmark(100,1+1),1,1;
|
||||
|
||||
#
|
||||
# random in WHERE clause
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (
|
||||
id mediumint(8) unsigned NOT NULL auto_increment,
|
||||
pseudo varchar(35) NOT NULL default '',
|
||||
PRIMARY KEY (id),
|
||||
UNIQUE KEY pseudo (pseudo)
|
||||
);
|
||||
INSERT INTO t1 (pseudo) VALUES ('test');
|
||||
INSERT INTO t1 (pseudo) VALUES ('test1');
|
||||
SELECT 1 from t1 where rand() > 2;
|
||||
DROP TABLE t1;
|
||||
|
||||
#
|
||||
# Test of bug with SUM(CASE...)
|
||||
#
|
||||
@ -1794,10 +1810,11 @@ select * from t1 natural right join (t1 as t2 left join t1 as t3 using (a));
|
||||
select * from t1 natural join (t1 as t2 left join t1 as t3 using (a));
|
||||
select * from (t1 as t2 left join t1 as t3 using (a)) natural join t1;
|
||||
drop table t1;
|
||||
drop table if exists t1,t2;
|
||||
|
||||
CREATE TABLE t1 ( aa char(2), id int(11) NOT NULL auto_increment, t2_id int(11) NOT NULL default '0', PRIMARY KEY (id), KEY replace_id (t2_id)) TYPE=MyISAM;
|
||||
INSERT INTO t1 VALUES ("1",8264,2506),("2",8299,2517),("3",8301,2518),("4",8302,2519),("5",8303,2520),("6",8304,2521),("7",8305,2522);
|
||||
CREATE TABLE t2 ( id int(11) NOT NULL auto_increment, PRIMARY KEY (id)) TYPE=MyISAM;
|
||||
INSERT INTO t2 VALUES (2517), (2518), (2519), (2520), (2521), (2522);
|
||||
select * from t1, t2 WHERE t1.t2_id = t2.id and t1.t2_id > 0 order by t1.id LIMIT 0, 5;
|
||||
drop table if exists t1,t2;
|
||||
drop table t1,t2;
|
||||
|
||||
|
Reference in New Issue
Block a user