MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Gleb Shchepa Date:June 17 2010 12:16pm
Subject:bzr commit into mysql-next-mr-bugfixing branch (gshchepa:3246)
Bug#53737
View as plain text  
#At file:///mnt/sda7/work/53737-next-mr-bugfixing/ based on revid:gshchepa@stripped

 3246 Gleb Shchepa	2010-06-17
      Bug #53737: Performance regressions after applying patch for bug 36569    
                                                                                                           
      Some single table UPDATE/SELECT queries those use quick select method                                
      that sends result data in the order incompatible with ORDER BY clause                                
      were affected by the performance degradation after applying the patch                                
      for the bug 36569.                                                                                   
                                                                                                           
      By the mistake the quick select object for such queries was freed                                    
      and cleaned up ignoring the fact that filesort uses quick select                                     
      data intensively for speed.                                                                          
                                                                                                           
      The get_index_for_order function has been modified to not to                                         
      remove quick select objects even in the case where quick select                                      
      ordering is incompatible with a desired ORDER BY ordering.         
     @ sql/sql_select.cc
        Bug #53737: Performance regressions after applying patch for bug 36569                               
                                                                                                             
        The get_index_for_order function has been modified to not to                                         
        remove quick select objects even in the case where quick select                                      
        ordering is incompatible with a desired ORDER BY ordering.

    modified:
      sql/sql_select.cc
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-06-16 19:42:03 +0000
+++ b/sql/sql_select.cc	2010-06-17 12:16:16 +0000
@@ -17520,8 +17520,6 @@ uint get_index_for_order(ORDER *order, T
 
   if (!is_simple_order(order)) // just to cut further expensive checks
   {
-    if (select)
-      select->set_quick(NULL);
     *need_sort= TRUE;
     return MAX_KEY;
   }
@@ -17531,7 +17529,6 @@ uint get_index_for_order(ORDER *order, T
     if (select->quick->index == MAX_KEY)
     {
       *need_sort= TRUE;
-      select->set_quick(NULL);
       return MAX_KEY;
     }
 
@@ -17541,7 +17538,6 @@ uint get_index_for_order(ORDER *order, T
       return select->quick->index;
     case 0: // unacceptable order
       *need_sort= TRUE;
-      select->set_quick(NULL);
       return MAX_KEY;
     case -1: // desired order, but opposite direction
       {
@@ -17555,7 +17551,6 @@ uint get_index_for_order(ORDER *order, T
         }
         else
         {
-          select->set_quick(NULL);
           *need_sort= TRUE;
           return MAX_KEY;
         }


Attachment: [text/bzr-bundle] bzr/gshchepa@mysql.com-20100617121616-7sxwhurre2jlvld0.bundle
Thread
bzr commit into mysql-next-mr-bugfixing branch (gshchepa:3246)Bug#53737Gleb Shchepa17 Jun