MySQL Lists are EOL. Please join:

List:Internals« Previous MessageNext Message »
From:ingo Date:September 14 2005 11:18am
Subject:bk commit into 4.1 tree (ingo:1.2436) BUG#12920
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of mydev. When mydev 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
  1.2436 05/09/14 13:18:16 ingo@stripped +8 -0
  Bug#12920 - key_read_requests counter appears to re-set
  After merge fix.

  sql/structs.h
    1.40 05/09/14 13:18:11 ingo@stripped +1 -1
    Bug#12920 - key_read_requests counter appears to re-set
    After merge fix.
    Added a branch for long long keycache values.

  sql/sql_test.cc
    1.35 05/09/14 13:18:11 ingo@stripped +13 -6
    Bug#12920 - key_read_requests counter appears to re-set
    After merge fix.
    changed to print full values.

  sql/sql_show.cc
    1.203 05/09/14 13:18:11 ingo@stripped +4 -0
    Bug#12920 - key_read_requests counter appears to re-set
    After merge fix.
    Added a branch for long long values.

  sql/mysqld.cc
    1.597 05/09/14 13:18:11 ingo@stripped +4 -4
    Bug#12920 - key_read_requests counter appears to re-set
    After merge fix.
    Changed to print full value.

  mysys/mf_keycache.c
    1.52 05/09/14 13:18:11 ingo@stripped +7 -6
    Bug#12920 - key_read_requests counter appears to re-set
    After merge fix.
    Status variables moved into KEY_CACHE in 4.1.
    Changed their debug printout.

  myisam/mi_test2.c
    1.29 05/09/14 13:18:11 ingo@stripped +6 -4
    Bug#12920 - key_read_requests counter appears to re-set
    After merge fix.
    Status variables moved into KEY_CACHE in 4.1.
    Changed to print default key cache status.

  include/my_sys.h
    1.143 05/09/14 13:18:11 ingo@stripped +0 -3
    Bug#12920 - key_read_requests counter appears to re-set
    After merge fix.
    Status variables moved into KEY_CACHE in 4.1.
    Removed unused global variables.

  include/keycache.h
    1.6 05/09/14 13:18:11 ingo@stripped +4 -4
    Bug#12920 - key_read_requests counter appears to re-set
    After merge fix.
    Status variables moved into KEY_CACHE in 4.1.
    Enlarging them there.

# 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:	ingo
# Host:	chilla.local
# Root:	/home/mydev/mysql-4.1-4100

--- 1.142/include/my_sys.h	2005-09-14 10:34:37 +02:00
+++ 1.143/include/my_sys.h	2005-09-14 13:18:11 +02:00
@@ -216,9 +216,6 @@
 extern CHARSET_INFO compiled_charsets[];
 
 /* statistics */
-extern ulonglong    my_cache_w_requests, my_cache_write;
-extern ulonglong    my_cache_r_requests, my_cache_read;
-extern ulong	my_blocks_used, my_blocks_changed;
 extern ulong	my_file_opened,my_stream_opened, my_tmp_file_created;
 extern uint	mysys_usage_id;
 extern my_bool	my_init_done;

--- 1.28/myisam/mi_test2.c	2005-09-14 10:34:37 +02:00
+++ 1.29/myisam/mi_test2.c	2005-09-14 13:18:11 +02:00
@@ -831,7 +831,6 @@
       puts("Locking used");
     if (use_blob)
       puts("blobs used");
-#if 0
     printf("key cache status: \n\
 blocks used:%10lu\n\
 not flushed:%10lu\n\
@@ -839,9 +838,12 @@
 writes:     %10lu\n\
 r_requests: %10lu\n\
 reads:      %10lu\n",
-           my_blocks_used, my_blocks_changed,
-           (ulong) my_cache_w_requests, (ulong) my_cache_write,
-           (ulong) my_cache_r_requests, (ulong) my_cache_read);
+           dflt_key_cache->blocks_used,
+           dflt_key_cache->global_blocks_changed,
+           (ulong) dflt_key_cache->global_cache_w_requests,
+           (ulong) dflt_key_cache->global_cache_write,
+           (ulong) dflt_key_cache->global_cache_r_requests,
+           (ulong) dflt_key_cache->global_cache_read);
   }
   end_key_cache(dflt_key_cache,1);
   if (blob_buffer)

--- 1.51/mysys/mf_keycache.c	2005-09-14 10:34:37 +02:00
+++ 1.52/mysys/mf_keycache.c	2005-09-14 13:18:11 +02:00
@@ -632,12 +632,13 @@
     keycache->blocks_changed= 0;
   }
 
-  DBUG_PRINT("status",
-    ("used: %d  changed: %d  w_requests: %ld  \
-writes: %ld  r_requests: %ld  reads: %ld",
-      keycache->blocks_used, keycache->global_blocks_changed,
-      keycache->global_cache_w_requests, keycache->global_cache_write,
-      keycache->global_cache_r_requests, keycache->global_cache_read));
+  DBUG_PRINT("status", ("used: %d  changed: %d  w_requests: %lu  "
+                        "writes: %lu  r_requests: %lu  reads: %lu",
+                        keycache->blocks_used, keycache->global_blocks_changed,
+                        (ulong) keycache->global_cache_w_requests,
+                        (ulong) keycache->global_cache_write,
+                        (ulong) keycache->global_cache_r_requests,
+                        (ulong) keycache->global_cache_read));
 
   if (cleanup)
   {

--- 1.596/sql/mysqld.cc	2005-09-14 10:34:37 +02:00
+++ 1.597/sql/mysqld.cc	2005-09-14 13:18:11 +02:00
@@ -5544,13 +5544,13 @@
   {"Key_blocks_used",          (char*) &dflt_key_cache_var.blocks_used,
    SHOW_KEY_CACHE_CONST_LONG},
   {"Key_read_requests",        (char*) &dflt_key_cache_var.global_cache_r_requests,
-   SHOW_KEY_CACHE_LONG},
+   SHOW_KEY_CACHE_LONGLONG},
   {"Key_reads",                (char*) &dflt_key_cache_var.global_cache_read,
-   SHOW_KEY_CACHE_LONG},
+   SHOW_KEY_CACHE_LONGLONG},
   {"Key_write_requests",       (char*) &dflt_key_cache_var.global_cache_w_requests,
-   SHOW_KEY_CACHE_LONG},
+   SHOW_KEY_CACHE_LONGLONG},
   {"Key_writes",               (char*) &dflt_key_cache_var.global_cache_write,
-   SHOW_KEY_CACHE_LONG},
+   SHOW_KEY_CACHE_LONGLONG},
   {"Max_used_connections",     (char*) &max_used_connections,  SHOW_LONG},
   {"Not_flushed_delayed_rows", (char*) &delayed_rows_in_use,    SHOW_LONG_CONST},
   {"Open_files",               (char*) &my_file_opened,         SHOW_LONG_CONST},

--- 1.202/sql/sql_show.cc	2005-09-09 10:22:12 +02:00
+++ 1.203/sql/sql_show.cc	2005-09-14 13:18:11 +02:00
@@ -2091,6 +2091,10 @@
 	value= (value-(char*) &dflt_key_cache_var)+ (char*) dflt_key_cache;
 	end= int10_to_str(*(long*) value, buff, 10);
         break;
+      case SHOW_KEY_CACHE_LONGLONG:
+	value= (value-(char*) &dflt_key_cache_var)+ (char*) dflt_key_cache;
+	end= longlong10_to_str(*(longlong*) value, buff, 10);
+	break;
       case SHOW_UNDEF:				// Show never happen
       case SHOW_SYS:
 	break;					// Return empty string

--- 1.34/sql/sql_test.cc	2005-09-14 10:34:37 +02:00
+++ 1.35/sql/sql_test.cc	2005-09-14 13:18:11 +02:00
@@ -309,6 +309,11 @@
 
 static int print_key_cache_status(const char *name, KEY_CACHE *key_cache)
 {
+  char llbuff1[22];
+  char llbuff2[22];
+  char llbuff3[22];
+  char llbuff4[22];
+
   if (!key_cache->key_cache_inited)
   {
     printf("%s: Not in use\n", name);
@@ -322,16 +327,18 @@
 Age_limit:      %10lu\n\
 blocks used:    %10lu\n\
 not flushed:    %10lu\n\
-w_requests:     %10lu\n\
-writes:         %10lu\n\
-r_requests:     %10lu\n\
-reads:          %10lu\n\n",
+w_requests:     %10s\n\
+writes:         %10s\n\
+r_requests:     %10s\n\
+reads:          %10s\n\n",
 	   name,
 	   (ulong) key_cache->param_buff_size, key_cache->param_block_size,
 	   key_cache->param_division_limit, key_cache->param_age_threshold,
 	   key_cache->blocks_used,key_cache->global_blocks_changed,
-	   key_cache->global_cache_w_requests,key_cache->global_cache_write,
-	   key_cache->global_cache_r_requests,key_cache->global_cache_read);
+	   llstr(key_cache->global_cache_w_requests,llbuff1),
+           llstr(key_cache->global_cache_write,llbuff2),
+	   llstr(key_cache->global_cache_r_requests,llbuff3),
+           llstr(key_cache->global_cache_read,llbuff4));
   }
   return 0;
 }

--- 1.39/sql/structs.h	2005-03-23 19:19:10 +01:00
+++ 1.40/sql/structs.h	2005-09-14 13:18:11 +02:00
@@ -181,7 +181,7 @@
   SHOW_SSL_GET_CIPHER_LIST,
 #endif /* HAVE_OPENSSL */
   SHOW_RPL_STATUS, SHOW_SLAVE_RUNNING, SHOW_SLAVE_RETRIED_TRANS,
-  SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG
+  SHOW_KEY_CACHE_LONG, SHOW_KEY_CACHE_CONST_LONG, SHOW_KEY_CACHE_LONGLONG
 };
 
 enum SHOW_COMP_OPTION { SHOW_OPTION_YES, SHOW_OPTION_NO, SHOW_OPTION_DISABLED};

--- 1.5/include/keycache.h	2005-01-19 10:04:02 +01:00
+++ 1.6/include/keycache.h	2005-09-14 13:18:11 +02:00
@@ -90,10 +90,10 @@
 
   /* Statistics variables. These are reset in reset_key_cache_counters(). */
   ulong global_blocks_changed;	/* number of currently dirty blocks         */
-  ulong global_cache_w_requests;/* number of write requests (write hits)    */
-  ulong global_cache_write;     /* number of writes from the cache to files */
-  ulong global_cache_r_requests;/* number of read requests (read hits)      */
-  ulong global_cache_read;      /* number of reads from files to the cache  */
+  ulonglong global_cache_w_requests;/* number of write requests (write hits) */
+  ulonglong global_cache_write;     /* number of writes from cache to files  */
+  ulonglong global_cache_r_requests;/* number of read requests (read hits)   */
+  ulonglong global_cache_read;      /* number of reads from files to cache   */
 
   int blocks;                   /* max number of blocks in the cache        */
   my_bool in_init;		/* Set to 1 in MySQL during init/resize     */
Thread
bk commit into 4.1 tree (ingo:1.2436) BUG#12920ingo14 Sep