Commit bf177015 authored by unknown's avatar unknown

Some new tests...................


mysql-test/r/derived.result:
  A test for derived table which requires creation on temporary MyISAM
  table ...
mysql-test/r/select_found.result:
  A test for LIMIT )
mysql-test/t/derived.test:
  A test for derived table which requires creation on temporary MyISAM
  table ...
mysql-test/t/select_found.test:
  A test for LIMIT 0
parent 67392a12
...@@ -40,3 +40,28 @@ a ...@@ -40,3 +40,28 @@ a
select 1 from (select 1); select 1 from (select 1);
1 1
1 1
drop table if exists t1;
create table t1(a int not null, t char(8), index(a));
SELECT * FROM (SELECT * FROM t1) ORDER BY a ASC LIMIT 0,20;
a t
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
11 11
12 12
13 13
14 14
15 15
16 16
17 17
18 18
19 19
20 20
drop table if exists t1;
...@@ -168,4 +168,14 @@ test2 2 2 ...@@ -168,4 +168,14 @@ test2 2 2
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
FOUND_ROWS() FOUND_ROWS()
2 2
SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0;
1
SELECT FOUND_ROWS();
FOUND_ROWS()
1
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0;
titre numeropost maxnumrep
SELECT FOUND_ROWS();
FOUND_ROWS()
3
drop table t1; drop table t1;
...@@ -22,3 +22,15 @@ drop table if exists t1.t2,t3; ...@@ -22,3 +22,15 @@ drop table if exists t1.t2,t3;
select * from (select 1); select * from (select 1);
select a from (select 1 as a); select a from (select 1 as a);
select 1 from (select 1); select 1 from (select 1);
drop table if exists t1;
create table t1(a int not null, t char(8), index(a));
disable_query_log;
let $1 = 10000;
while ($1)
{
eval insert into t1 values ($1,'$1');
dec $1;
}
enable_query_log;
SELECT * FROM (SELECT * FROM t1) ORDER BY a ASC LIMIT 0,20;
drop table if exists t1;
\ No newline at end of file
...@@ -84,4 +84,8 @@ INSERT INTO t1 (titre,maxnumrep) VALUES ...@@ -84,4 +84,8 @@ INSERT INTO t1 (titre,maxnumrep) VALUES
('test1','1'),('test2','2'),('test3','3'); ('test1','1'),('test2','2'),('test3','3');
SELECT SQL_CALC_FOUND_ROWS titre,numeropost,maxnumrep FROM t1 WHERE numeropost IN (1,2) ORDER BY maxnumrep DESC LIMIT 0, 1; SELECT SQL_CALC_FOUND_ROWS titre,numeropost,maxnumrep FROM t1 WHERE numeropost IN (1,2) ORDER BY maxnumrep DESC LIMIT 0, 1;
SELECT FOUND_ROWS(); SELECT FOUND_ROWS();
SELECT SQL_CALC_FOUND_ROWS 1 FROM (SELECT 1) LIMIT 0;
SELECT FOUND_ROWS();
SELECT SQL_CALC_FOUND_ROWS * FROM t1 LIMIT 0;
SELECT FOUND_ROWS();
drop table t1; drop table t1;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment