List:Commits« Previous MessageNext Message »
From:Sergey Petrunia Date:June 29 2007 10:19pm
Subject:bk commit into 5.2 tree (sergefp:1.2537)
View as plain text  
Below is the list of changes that have just been committed into a local
5.2 repository of psergey. When psergey 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, 2007-06-30 02:19:12+04:00, sergefp@stripped +3 -0
  WL#3751: Merge to 5.2: merge fixes part 1

  sql/handler.cc@stripped, 2007-06-30 02:19:07+04:00, sergefp@stripped +0 -34
    WL#3751: Merge to 5.2: merge fixes part 1

  sql/sql_select.cc@stripped, 2007-06-30 02:19:08+04:00, sergefp@stripped +4 -4
    WL#3751: Merge to 5.2: merge fixes part 1

  sql/sql_select.h@stripped, 2007-06-30 02:19:08+04:00, sergefp@stripped +1 -1
    WL#3751: Merge to 5.2: merge fixes part 1

# This is a BitKeeper patch.  What follows are the unified diffs for the
# set of deltas contained in the patch.  The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User:	sergefp
# Host:	pylon.mylan
# Root:	/home/psergey/mysql-5.2-merge-11-subq-in

--- 1.232/sql/handler.cc	2007-06-30 02:19:19 +04:00
+++ 1.233/sql/handler.cc	2007-06-30 02:19:19 +04:00
@@ -3103,40 +3103,6 @@
   return read_time;
 }
 
-/*
-  Calculate cost of 'index only' scan for given index and number of records
-
-  SYNOPSIS
-    index_only_read_time()
-      keynr    Index number
-      records  Estimated number of records to be retrieved
-
-  NOTES
-    It is assumed that we will read trough the whole key range and that all
-    key blocks are half full (normally things are much better). It is also
-    assumed that each time we read the next key from the index, the handler
-    performs a random seek, thus the cost is proportional to the number of
-    blocks read.
-
-  TODO
-    Consider joining this function and handler::read_time() into one
-    handler::read_time(keynr, records, ranges, bool index_only) function.
-
-  RETURN
-    Estimated cost of 'index only' scan
-*/
-
-
-double handler::index_only_read_time(uint keynr, double records)
-{
-  double read_time;
-  uint keys_per_block= (stats.block_size/2/
-			(table->key_info[keynr].key_length + ref_length) + 1);
-  read_time=((double) (records + keys_per_block-1) /
-             (double) keys_per_block);
-  return read_time;
-}
-
 
 /****************************************************************************
  * Default MRR implementation (MRR to non-MRR converter)

--- 1.543/sql/sql_select.cc	2007-06-30 02:19:19 +04:00
+++ 1.544/sql/sql_select.cc	2007-06-30 02:19:19 +04:00
@@ -7902,9 +7902,9 @@
     sorted= 0;                                  // only first must be sorted
     if (tab->insideout_match_tab)
     {
-      if (!(tab->insideout_buf= (byte*)join->thd->alloc(tab->table->key_info
-                                                        [tab->index].
-                                                        key_length)))
+      if (!(tab->insideout_buf= (uchar*)join->thd->alloc(tab->table->key_info
+                                                         [tab->index].
+                                                         key_length)))
         return TRUE;
     }
     switch (tab->type) {
@@ -12991,7 +12991,7 @@
   SJ_TMP_TABLE::TAB *tab= sjtbl->tabs;
   SJ_TMP_TABLE::TAB *tab_end= sjtbl->tabs_end;
   uchar *ptr= sjtbl->tmp_table->record[0] + 1;
-  byte *nulls_ptr= ptr;
+  uchar *nulls_ptr= ptr;
   
   /* Put the the rowids tuple into table->record[0]: */
 

--- 1.126/sql/sql_select.h	2007-06-30 02:19:19 +04:00
+++ 1.127/sql/sql_select.h	2007-06-30 02:19:19 +04:00
@@ -260,7 +260,7 @@
      NULL - Not an insideout scan.
   */
   struct st_join_table *insideout_match_tab;
-  byte *insideout_buf; // Buffer to save index tuple to be able to skip dups
+  uchar *insideout_buf; // Buffer to save index tuple to be able to skip dups
 
   /* Used by InsideOut scan. Just set to true when have found a row. */
   bool found_match;
Thread
bk commit into 5.2 tree (sergefp:1.2537)Sergey Petrunia29 Jun