MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:March 19 2010 2:30pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3131) Bug#52081
View as plain text  
#At file:///localhome/jl208045/mysql/mysql-next-mr-bugfixing/ based on revid:alexey.kopytov@stripped

 3131 Jorgen Loland	2010-03-19
      Bug#52081: Index hint/forcing for GROUP BY / ORDER BY is broken
            
      Found during code inspection: There is a mixup between GROUP BY 
      and ORDER BY in which indexes that should be considered/allowed 
      during optimization of a query. The bug is a simple mixup of 
      argument 'is_order_by' to create_sort_index() in JOIN::exec().
            
      No test case included as only problem is increased execution
      time due to wrong plan, and this does not show in EXPLAIN.
     @ sql/sql_select.cc
        Fixed mixup between GROUP BY/ORDER BY for JOIN::exec() call to 
        create_sort_index().

    modified:
      sql/sql_select.cc
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-03-11 10:29:10 +0000
+++ b/sql/sql_select.cc	2010-03-19 14:30:55 +0000
@@ -2257,7 +2257,7 @@ JOIN::exec()
 			    curr_join->select_limit,
 			    (select_options & OPTION_FOUND_ROWS ?
 			     HA_POS_ERROR : unit->select_limit_cnt),
-                            curr_join->group_list ? TRUE : FALSE))
+                            curr_join->group_list ? FALSE : TRUE))
 	DBUG_VOID_RETURN;
       sortorder= curr_join->sortorder;
       if (curr_join->const_tables != curr_join->tables &&


Attachment: [text/bzr-bundle] bzr/jorgen.loland@sun.com-20100319143055-hjtbv0eqqt9xj1y7.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (jorgen.loland:3131) Bug#52081Jorgen Loland19 Mar