List:Commits« Previous MessageNext Message »
From:Hakan Kuecuekilmaz Date:May 9 2008 12:38am
Subject:bk commit into 6.0 tree (hakank:1.2675)
View as plain text  
Below is the list of changes that have just been committed into a local
6.0 repository of hakank.  When hakank does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2008-05-09 00:38:06+02:00, hakank@au0012. +2 -0
  Reworked test case to reflect Falcon's recently introduced LIMIT optimiztion behavior.

  mysql-test/suite/falcon/r/falcon_select.result@stripped, 2008-05-09 00:38:00+02:00,
hakank@au0012. +16 -13
    Adjusted result file.

  mysql-test/suite/falcon/t/falcon_select.test@stripped, 2008-05-09 00:38:00+02:00,
hakank@au0012. +15 -18
    Reworked test case to reflect Falcon's recently introduced LIMIT optimiztion behavior.

diff -Nrup a/mysql-test/suite/falcon/r/falcon_select.result
b/mysql-test/suite/falcon/r/falcon_select.result
--- a/mysql-test/suite/falcon/r/falcon_select.result	2008-02-14 16:45:49 +01:00
+++ b/mysql-test/suite/falcon/r/falcon_select.result	2008-05-09 00:38:00 +02:00
@@ -370,18 +370,21 @@ admonishing
 sumac
 flanking
 combed
-select distinct fld3 from t2 having fld3 like "A%" limit 10;
+select count(*) from (select distinct fld3 from t2 having fld3 like "A%" limit 10) as
t10;
+count(*)
+10
+select distinct fld3 from t2 having fld3 like "A%" order by fld3 limit 10;
 fld3
-astound
-admonishing
-annihilates
-aging
-afield
-ammonium
-Augustine
-audiology
-attainments
-announces
+abates
+abiding
+Abraham
+abrogating
+absentee
+abut
+accessed
+accruing
+accumulating
+accuracies
 select count(distinct substring(fld3,1,3)) from t2 where fld3 like "A%";
 count(distinct substring(fld3,1,3))
 62
@@ -547,11 +550,11 @@ id	select_type	table	type	possible_keys	
 1	SIMPLE	t3	ref	period	period	4	test.t1.period	2	
 explain select * from t3 as t1,t3 where t1.period=t3.period order by t3.period limit 10;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t3	ALL	period	NULL	NULL	NULL	41810	Using filesort
+1	SIMPLE	t3	index	period	period	4	NULL	5	
 1	SIMPLE	t1	ref	period	period	4	test.t3.period	2	
 explain select * from t3 as t1,t3 where t1.period=t3.period order by t1.period limit 10;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	ALL	period	NULL	NULL	NULL	41810	Using filesort
+1	SIMPLE	t1	index	period	period	4	NULL	5	
 1	SIMPLE	t3	ref	period	period	4	test.t1.period	2	
 select period from t1;
 period
diff -Nrup a/mysql-test/suite/falcon/t/falcon_select.test
b/mysql-test/suite/falcon/t/falcon_select.test
--- a/mysql-test/suite/falcon/t/falcon_select.test	2007-11-15 09:07:55 +01:00
+++ b/mysql-test/suite/falcon/t/falcon_select.test	2008-05-09 00:38:00 +02:00
@@ -2,8 +2,6 @@
 # Find string "NOTE NOTE NOTE" in order to find some 'unsure' tests
 #
 
-let $fixed_bug226= 1;
-
 --source include/have_falcon.inc
 
 #
@@ -1339,10 +1337,7 @@ explain select fld1 from t2 where fld1=2
 # If the like starts with a certain letter key will be used.
 #
 
-if ($fixed_bug226)
-{
 select fld1,fld3 from t2 where companynr = 37 and fld3 like 'f%' order by fld1;
-}
 select fld3 from t2 where fld3 like "L%" and fld3 = "ok";
 select fld3 from t2 where (fld3 like "C%" and fld3 = "Chantilly");
 select fld1,fld3 from t2 where fld1 like "25050%";
@@ -1358,18 +1353,26 @@ select fld1,fld3 from t2 where fld1 like
 select distinct companynr from t2;
 select distinct companynr from t2 order by companynr;
 select distinct companynr from t2 order by companynr desc;
-if ($fixed_bug226)
-{
 select distinct t2.fld3,period from t2,t1 where companynr=37 and fld3 like "O%" order by
fld3;
-}
 
 select distinct fld3 from t2 where companynr = 34 order by fld3;
 select distinct fld3 from t2 limit 10;
-select distinct fld3 from t2 having fld3 like "A%" limit 10;
-if ($fixed_bug226)
-{
+#
+# In Falcon a LIMIT without ORDER BY behaves different than
+# in MyISAM or InnoDB. Therefore we rewrote following statement to
+# two new ones covering the test. Advantage is that we get a
+# a deterministic test, even when optimzer changes it's access strategies.
+#
+# We have to do a subselect here, otherwise we get:
+#     mysqltest: At line 1371: query 'select count(distinct fld3) from t2 having fld3
like "A%" limit 10'
+#                failed: 1054: Unknown column 'fld3' in 'having clause'
+#
+# Original statement was:
+#     select distinct fld3 from t2 having fld3 like "A%" limit 10;
+select count(*) from (select distinct fld3 from t2 having fld3 like "A%" limit 10) as
t10;
+select distinct fld3 from t2 having fld3 like "A%" order by fld3 limit 10;
+
 select count(distinct substring(fld3,1,3)) from t2 where fld3 like "A%";
-}
 select distinct substring(fld3,1,3) as a from t2 having a like "A%" order by a limit 10;
 select distinct substring(fld3,1,3) from t2 where fld3 like "A%" limit 10;
 select distinct substring(fld3,1,3) as a from t2 having a like "A%" limit 10;
@@ -1616,10 +1619,7 @@ select fld1 from t2 where fld1 in (25050
 
 select fld1 from t2 where fld1 between 250502 and 250504;
 
-if ($fixed_bug226)
-{
 select fld3 from t2 where (((fld3 like "_%L%" ) or (fld3 like "%ok%")) and ( fld3 like
"L%" or fld3 like "G%")) and fld3 like "L%" order by fld3;
-}
 
 #
 # Group on one table.
@@ -1654,10 +1654,7 @@ select name,count(*) from t3 where name=
 select name,count(*) from t3 where name='cloakroom' and price>10 group by name;
 select count(*) from t3 where name='cloakroom' and price2=823742;
 select name,count(*) from t3 where name='cloakroom' and price2=823742 group by name;
-if ($fixed_bug226)
-{
 select name,count(*) from t3 where name >= "extramarital" and price <= 39654943
group by name order by name;
-}
 select t2.fld3,count(*) from t2,t3 where t2.fld1=158402 and t3.name=t2.fld3 group by
t3.name;
 
 #
Thread
bk commit into 6.0 tree (hakank:1.2675)Hakan Kuecuekilmaz9 May 2008