diff options
author | unknown <monty@hundin.mysql.fi> | 2002-02-08 03:21:34 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2002-02-08 03:21:34 +0200 |
commit | 0f9932a162bdd80d83fd0c4a3d6641d41ff3f1e3 (patch) | |
tree | 6fb2be8a25c87f580e5d7831b049ad0839a48237 /mysql-test/t | |
parent | 6340283614f9f5cc4b9212ec5affa177b3f71711 (diff) | |
download | mariadb-git-0f9932a162bdd80d83fd0c4a3d6641d41ff3f1e3.tar.gz |
Fix some bugs introduced with the new my_getopt
Added counting of rollback's and commits
Fixed bug in 'SELECT 0 LIMIT 0'
Fixed bug in 'SELECT SQL_CALC_FOUND_ROWS'
Docs/manual.texi:
Changelog
configure.in:
Cleanup
myisam/myisamchk.c:
Fix some bugs introduced with the new my_getopt
mysql-test/r/limit.result:
Test for bugfix
mysql-test/r/rpl000001.result:
fix wrong result
mysql-test/r/select.result:
Fix things after fixing ignore index()
mysql-test/r/select_found.result:
Test of bug in SQL_CALC_FOUND_ROWS
mysql-test/t/limit.test:
Test bug in LIMIT 0
mysql-test/t/rpl000001.test:
fix wrong result
mysql-test/t/select_found.test:
Test of bug in SQL_CALC_FOUND_ROWS
sql/handler.cc:
Added counting of rollback's and commits
sql/mysql_priv.h:
Added counting of rollback's and commits
sql/mysqld.cc:
Added counting of rollback's and commits
sql/sql_select.cc:
Fixed bug in 'SELECT 0 LIMIT 0'
Fixed bug in 'SELECT SQL_CALC_FOUND_ROWS'
Diffstat (limited to 'mysql-test/t')
-rw-r--r-- | mysql-test/t/limit.test | 2 | ||||
-rw-r--r-- | mysql-test/t/rpl000001.test | 1 | ||||
-rw-r--r-- | mysql-test/t/select_found.test | 12 |
3 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/limit.test b/mysql-test/t/limit.test index 112761abd87..d4f6ce186cf 100644 --- a/mysql-test/t/limit.test +++ b/mysql-test/t/limit.test @@ -28,3 +28,5 @@ delete from t1 limit 0; update t1 set i=3 limit 0; select * from t1; drop table t1; + +select 0 limit 0; diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test index 597b1c69b1e..a5496d505f0 100644 --- a/mysql-test/t/rpl000001.test +++ b/mysql-test/t/rpl000001.test @@ -5,6 +5,7 @@ use test; drop table if exists t1,t3; create table t1 (word char(20) not null); load data infile '../../std_data/words.dat' into table t1; +--replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR eval load data local infile '$MYSQL_TEST_DIR/std_data/words.dat' into table t1; select * from t1; set password for root@"localhost" = password('foo'); diff --git a/mysql-test/t/select_found.test b/mysql-test/t/select_found.test index 52c8039b2f5..9b14ab1fcf0 100644 --- a/mysql-test/t/select_found.test +++ b/mysql-test/t/select_found.test @@ -18,3 +18,15 @@ 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; + +# +# Test SQL_CALC_FOUND_ROWS optimization when used with one table and filesort +# + +create table t1 (a int not null primary key); +insert into t1 values (1),(2),(3),(4),(5); +select sql_calc_found_rows a from t1 where a in (1,2,3) order by a desc limit 0,2; +select FOUND_ROWS(); +select sql_calc_found_rows a from t1 where a in (1,2,3) order by a+2 desc limit 0,2; +select FOUND_ROWS(); +drop table t1; |