Some new tests...................
This commit is contained in:
parent
5a38621cc2
commit
46beea06e1
@ -40,3 +40,28 @@ a
|
||||
select 1 from (select 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
|
||||
SELECT FOUND_ROWS();
|
||||
FOUND_ROWS()
|
||||
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;
|
||||
|
@ -22,3 +22,15 @@ drop table if exists t1.t2,t3;
|
||||
select * from (select 1);
|
||||
select a from (select 1 as a);
|
||||
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;
|
@ -84,4 +84,8 @@ INSERT INTO t1 (titre,maxnumrep) VALUES
|
||||
('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 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user