← Back to team overview

maria-developers team mailing list archive

bzr commit into file:///home/tsk/mprog/src/5.3/ branch (timour:2806)

 

#At file:///home/tsk/mprog/src/5.3/ based on revid:timour@xxxxxxxxxxxx-20100716110215-toh8erf6p93d1n6i

 2806 timour@xxxxxxxxxxxx	2010-07-23
      Removed dead code that was made obsolete by the introduction of
      check_join_cache_usage() by the change:
      
      Revno: 2793
      Revision Id: igor@xxxxxxxxxxxx-20091221022615-kx5ieiu0okmiupuc
      Timestamp: Sun 2009-12-20 18:26:15 -0800
      
      Backport into MariaDB-5.2 the following:
      WL#2771 "Block Nested Loop Join and Batched Key Access Join"

    modified:
      sql/sql_select.cc
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc	2010-07-15 13:59:10 +0000
+++ b/sql/sql_select.cc	2010-07-23 08:25:00 +0000
@@ -7560,7 +7560,6 @@ make_join_readinfo(JOIN *join, ulonglong
 {
   uint i;
   bool statistics= test(!(join->select_options & SELECT_DESCRIBE));
-  bool ordered_set= 0;
   bool sorted= 1;
   uint first_sjm_table= MAX_TABLES;
   uint last_sjm_table= MAX_TABLES;
@@ -7580,21 +7579,6 @@ make_join_readinfo(JOIN *join, ulonglong
     tab->read_record.file=table->file;
     tab->read_record.unlock_row= rr_unlock_row;
     tab->next_select=sub_select;		/* normal select */
-
-    /*
-      Determine if the set is already ordered for ORDER BY, so it can 
-      disable join cache because it will change the ordering of the results.
-      Code handles sort table that is at any location (not only first after 
-      the const tables) despite the fact that it's currently prohibited.
-      We must disable join cache if the first non-const table alone is
-      ordered. If there is a temp table the ordering is done as a last
-      operation and doesn't prevent join cache usage.
-    */
-    if (!ordered_set && !join->need_tmp && 
-        (table == join->sort_by_table ||
-         (join->sort_by_table == (TABLE *) 1 && i != join->const_tables)))
-      ordered_set= 1;
-
     tab->sorted= sorted;
     sorted= 0;                                  // only first must be sorted
     if (tab->loosescan_match_tab)

# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: timour@xxxxxxxxxxxx-20100723082500-kwqzzvuv62nw412k
# target_branch: file:///home/tsk/mprog/src/5.3/
# testament_sha1: f56923d9ecf60f7a9572b1344ccd5e9f42d3e777
# timestamp: 2010-07-23 11:25:07 +0300
# base_revision_id: timour@xxxxxxxxxxxx-20100716110215-\
#   toh8erf6p93d1n6i
# 
# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWUacu9oAAaNfgAAQWGP/93Y/
HIC////wUAPtXc3WWJHrU87hKJGmiZqYKeSeCE0NGmTUZMTRsk9QZIiM1NmiaKPImmhpoaAA0AAS
hDQg0U2kxQ9J+o1DaQAAGhoEkiRibTRI8gh6gHqDI0ZADQwSiJpBoDTI0AAAAAACStbT33epbbSW
z6JrF352FrWcVBkTI4GNkLq81Sqqe/qfqMxaStWOK5rOLeHxp+O+Bw34Pu+g4pKrxzlXRq98EIR1
K6m+yyqeTuGZMzqh5thy1sxlKPhEP55NJqpxMfmy7YQpIVVdJAlttYbJzdMlDWIis2kkTgSEHIqI
SHqDCpeIvf0CeMSHcpFI2HbAoYoa6yYFzzqLzTgIM2FzaJOdVMyBniPc7HVPUzRDKzbLWkgyIyBS
IWhWCbBjQVuR9dj0JEVOqll9oOeQwBqvbtsdWo3mhncUW7dISQmNJwcSxPLohnWaWvhuLx4nVhtj
V6WR85niMbGPT7Etwieo06igmyObaRQfLLGJK3IK5SscnMGGF0TxK+0lDw7iU6pjA08BG9Jya4zV
KbHXcKcc1zTHQusxObI8zcgZwgjqe0aiHhDzB9aRcGiNhtgKGQE0Byil4wbAZa0dLRctoqkWrXQF
aUvgF5TQSmMbCWRFLtOe67SuE88MlW/bCUlezEWRXWJQHmrUGcDxnhmGXMv47QTH1dmUVVIP07Bs
IclTJwxSbPEzcwNmrJIiGANZoLcOHTw1duaLozOXBJTOQV0WzIf3h8Aj4lnVbDWUm077fGFcfCk3
6UL0jFd3H+/CcPmR24y0v428ucJdbPs+RFMLmHUv6dpj2c796Vs3rwTOqN+XSRN26IeTP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