mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 05:22:25 +01:00
4d5dcac35e
Changed mysql-test to use --language Cleaned up parameters to filesort() configure.in: Fixed typo mysql-test/install_test_db.sh: Changed test case to use --language mysql-test/mysql-test-run.sh: Changed test case to use --language Fixed that test names are not 'cut'-ed. mysql-test/r/select_found.result: Fixed test case to make it repeatable mysql-test/t/insert.test: Added test of unique key handling mysql-test/t/order_fill_sortbuf.test: Cleaned up test mysql-test/t/select_found.test: Fixed test case to make it repeatable sql/filesort.cc: Fixed bug when sorting big files (introduced with multi-table-delete) cleaned up parameters. sql/mysql_priv.h: Cleaned up parameters to filesort() sql/mysqld.cc: Fixed typo on enum sql/sql_delete.cc: Cleanup sql/sql_select.cc: Cleanup sql/sql_table.cc: Cleanup sql/sql_test.cc: Cleanup sql/sql_update.cc: Cleanup
20 lines
708 B
Text
20 lines
708 B
Text
#
|
|
# Testing of found_rows()
|
|
#
|
|
|
|
drop table if exists t1;
|
|
create table t1 (a int not null auto_increment, b int not null, primary key(a));
|
|
insert into t1 (b) values (2),(3),(5),(5),(5),(6),(7),(9);
|
|
select SQL_CALC_FOUND_ROWS * from t1;
|
|
select found_rows();
|
|
select SQL_CALC_FOUND_ROWS * from t1 limit 1;
|
|
select found_rows();
|
|
select SQL_CALC_FOUND_ROWS * from t1 order by b desc limit 1;
|
|
select found_rows();
|
|
select SQL_CALC_FOUND_ROWS distinct b from t1 limit 1;
|
|
select found_rows();
|
|
select SQL_CALC_FOUND_ROWS b,count(*) as c from t1 group by b order by c desc limit 1;
|
|
select found_rows();
|
|
select SQL_CALC_FOUND_ROWS * from t1 left join t1 as t2 on (t1.b=t2.a) limit 2,1;
|
|
select found_rows();
|
|
drop table t1;
|