List:Commits« Previous MessageNext Message »
From:Jorgen Loland Date:January 13 2011 2:27pm
Subject:bzr commit into mysql-trunk branch (jorgen.loland:3270)
View as plain text  
#At bzr+ssh://bk-internal.mysql.com/bzrroot/server/mysql-next-mr-opt-team/ based on revid:martin.hansson@stripped

 3270 Jorgen Loland	2011-01-13 [merge]
      Automerge mysql-trunk -> opt-team
      
      No conflicts

    modified:
      include/my_base.h
      mysql-test/collections/default.experimental
      sql/ha_partition.cc
      sql/sql_show.cc
      storage/innobase/handler/ha_innodb.cc
=== modified file 'include/my_base.h'
--- a/include/my_base.h	2010-06-25 09:34:37 +0000
+++ b/include/my_base.h	2011-01-03 15:45:43 +0000
@@ -351,7 +351,7 @@ enum ha_base_keytype {
 /*
   update the 'variable' part of the info:
   handler::records, deleted, data_file_length, index_file_length,
-  delete_length, check_time, mean_rec_length
+  check_time, mean_rec_length
 */
 #define HA_STATUS_VARIABLE      16
 /*
@@ -364,6 +364,11 @@ enum ha_base_keytype {
   update handler::auto_increment_value
 */
 #define HA_STATUS_AUTO          64
+/*
+  Get also delete_length when HA_STATUS_VARIABLE is called. It's ok to set it also
+  when only HA_STATUS_VARIABLE but it won't be used.
+*/
+#define HA_STATUS_VARIABLE_EXTRA 128
 
 /*
   Errorcodes given by handler functions

=== modified file 'mysql-test/collections/default.experimental'
--- a/mysql-test/collections/default.experimental	2010-12-31 13:04:32 +0000
+++ b/mysql-test/collections/default.experimental	2011-01-04 08:06:54 +0000
@@ -22,10 +22,6 @@ main.sp @solaris                        
 main.type_float @freebsd                 # Bug#38965 2010-05-04 alik test cases gis-rtree, type_float, type_newdecimal fail in embedded server
 main.wait_timeout @solaris               # Bug#51244 2010-04-26 alik wait_timeout fails on OpenSolaris
 
-perfschema.func_file_io                  # Bug#58172 2010-11-15 alik perfschema.func_file_io fails sporadically in PB
-perfschema.start_server_on               # Bug#55576 2010-08-02 alik Two perfschema tests failed on mysql-next-mr-innodb PB2 tests#
-perfschema.server_init                   # Bug#55576 2010-08-02 alik Two perfschema tests failed on mysql-next-mr-innodb PB2 tests#
-
 rpl.rpl_heartbeat_basic                  # BUG#54820 2010-06-26 alik rpl.rpl_heartbeat_basic fails sporadically again
 rpl.rpl_innodb_bug28430*                 # Bug#46029
 rpl.rpl_row_sp011* @solaris              # Bug#47791 2010-01-20 alik Several test cases fail on Solaris with error Thread stack overrun

=== modified file 'sql/ha_partition.cc'
--- a/sql/ha_partition.cc	2010-12-17 11:28:59 +0000
+++ b/sql/ha_partition.cc	2011-01-03 15:45:43 +0000
@@ -5173,6 +5173,8 @@ int ha_partition::handle_ordered_prev(uc
 
 int ha_partition::info(uint flag)
 {
+  uint no_lock_flag= flag & HA_STATUS_NO_LOCK;
+  uint extra_var_flag= flag & HA_STATUS_VARIABLE_EXTRA;
   DBUG_ENTER("ha_partition::info");
 
   if (flag & HA_STATUS_AUTO)
@@ -5204,7 +5206,7 @@ int ha_partition::info(uint flag)
         do
         {
           file= *file_array;
-          file->info(HA_STATUS_AUTO);
+          file->info(HA_STATUS_AUTO | no_lock_flag);
           set_if_bigger(auto_increment_value,
                         file->stats.auto_increment_value);
         } while (*(++file_array));
@@ -5258,7 +5260,7 @@ int ha_partition::info(uint flag)
       if (bitmap_is_set(&(m_part_info->used_partitions), (file_array - m_file)))
       {
         file= *file_array;
-        file->info(HA_STATUS_VARIABLE);
+        file->info(HA_STATUS_VARIABLE | no_lock_flag | extra_var_flag);
         stats.records+= file->stats.records;
         stats.deleted+= file->stats.deleted;
         stats.data_file_length+= file->stats.data_file_length;
@@ -5340,7 +5342,7 @@ int ha_partition::info(uint flag)
       if (!(flag & HA_STATUS_VARIABLE) ||
           !bitmap_is_set(&(m_part_info->used_partitions),
                          (file_array - m_file)))
-        file->info(HA_STATUS_VARIABLE);
+        file->info(HA_STATUS_VARIABLE | no_lock_flag | extra_var_flag);
       if (file->stats.records > max_records)
       {
         max_records= file->stats.records;
@@ -5350,7 +5352,7 @@ int ha_partition::info(uint flag)
     } while (*(++file_array));
 
     file= m_file[handler_instance];
-    file->info(HA_STATUS_CONST);
+    file->info(HA_STATUS_CONST | no_lock_flag);
     stats.block_size= file->stats.block_size;
     stats.create_time= file->stats.create_time;
     ref_length= m_ref_length;
@@ -5366,7 +5368,7 @@ int ha_partition::info(uint flag)
       Note: all engines does not support HA_STATUS_ERRKEY, so set errkey.
     */
     file->errkey= errkey;
-    file->info(HA_STATUS_ERRKEY);
+    file->info(HA_STATUS_ERRKEY | no_lock_flag);
     errkey= file->errkey;
   }
   if (flag & HA_STATUS_TIME)
@@ -5383,7 +5385,7 @@ int ha_partition::info(uint flag)
     do
     {
       file= *file_array;
-      file->info(HA_STATUS_TIME);
+      file->info(HA_STATUS_TIME | no_lock_flag);
       if (file->stats.update_time > stats.update_time)
 	stats.update_time= file->stats.update_time;
     } while (*(++file_array));
@@ -5397,7 +5399,7 @@ void ha_partition::get_dynamic_partition
 {
   handler *file= m_file[part_id];
   file->info(HA_STATUS_CONST | HA_STATUS_TIME | HA_STATUS_VARIABLE |
-             HA_STATUS_NO_LOCK);
+             HA_STATUS_VARIABLE_EXTRA | HA_STATUS_NO_LOCK);
 
   stat_info->records=              file->stats.records;
   stat_info->mean_rec_length=      file->stats.mean_rec_length;

=== modified file 'sql/sql_show.cc'
--- a/sql/sql_show.cc	2010-12-29 00:38:59 +0000
+++ b/sql/sql_show.cc	2011-01-03 15:45:43 +0000
@@ -3930,6 +3930,7 @@ static int get_schema_tables_record(THD 
       /* If info() fails, then there's nothing else to do */
       if ((info_error= file->info(HA_STATUS_VARIABLE |
                                   HA_STATUS_TIME |
+                                  HA_STATUS_VARIABLE_EXTRA |
                                   HA_STATUS_AUTO)) != 0)
         goto err;
 

=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc	2010-12-17 18:43:38 +0000
+++ b/storage/innobase/handler/ha_innodb.cc	2011-01-03 15:45:43 +0000
@@ -8284,11 +8284,14 @@ ha_innobase::info_low(
 		are asked by MySQL to avoid locking. Another reason to
 		avoid the call is that it uses quite a lot of CPU.
 		See Bug#38185. */
-		if (flag & HA_STATUS_NO_LOCK) {
+		if (flag & HA_STATUS_NO_LOCK ||
+                    !(flag & HA_STATUS_VARIABLE_EXTRA)) {
 			/* We do not update delete_length if no
 			locking is requested so the "old" value can
 			remain. delete_length is initialized to 0 in
-			the ha_statistics' constructor. */
+			the ha_statistics' constructor. Also we only
+                        need delete_length to be set when
+                        HA_STATUS_VARIABLE_EXTRA is set */
 		} else if (UNIV_UNLIKELY
 			   (srv_force_recovery >= SRV_FORCE_NO_IBUF_MERGE)) {
 			/* Avoid accessing the tablespace if

No bundle (reason: revision is a merge).
Thread
bzr commit into mysql-trunk branch (jorgen.loland:3270) Jorgen Loland13 Jan