SOURCES (MYSQL_5_0): mysql-innodb_io_pattern.patch, mysql-innodb_locks_held...

arekm arekm at pld-linux.org
Thu Mar 12 22:49:13 CET 2009


Author: arekm                        Date: Thu Mar 12 21:49:13 2009 GMT
Module: SOURCES                       Tag: MYSQL_5_0
---- Log message:
- perfona patches for .77

---- Files affected:
SOURCES:
   mysql-innodb_io_pattern.patch (1.1.2.1 -> 1.1.2.2) , mysql-innodb_locks_held.patch (1.1.2.2 -> 1.1.2.3) , mysql-innodb_rw_lock.patch (1.1.2.1 -> 1.1.2.2) , mysql-microslow_innodb.patch (1.1.2.5 -> 1.1.2.6) , mysql-split_buf_pool_mutex_fixed_optimistic_safe.patch (1.1.2.2 -> 1.1.2.3) , mysql-userstatv2.patch (1.1.2.5 -> 1.1.2.6) 

---- Diffs:

================================================================
Index: SOURCES/mysql-innodb_io_pattern.patch
diff -u SOURCES/mysql-innodb_io_pattern.patch:1.1.2.1 SOURCES/mysql-innodb_io_pattern.patch:1.1.2.2
--- SOURCES/mysql-innodb_io_pattern.patch:1.1.2.1	Fri Jan  9 12:04:51 2009
+++ SOURCES/mysql-innodb_io_pattern.patch	Thu Mar 12 22:49:05 2009
@@ -1,6 +1,6 @@
-diff -r 2bbfde0e0e70 include/mysql_com.h
---- a/include/mysql_com.h	Mon Dec 22 00:33:11 2008 -0800
-+++ b/include/mysql_com.h	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 include/mysql_com.h
+--- a/include/mysql_com.h	Tue Feb 17 22:33:54 2009 -0800
++++ b/include/mysql_com.h	Tue Feb 17 22:33:58 2009 -0800
 @@ -121,6 +121,9 @@
  #define REFRESH_QUERY_CACHE_FREE 0x20000L /* pack query cache */
  #define REFRESH_DES_KEY_FILE	0x40000L
@@ -11,9 +11,9 @@
  
  #define CLIENT_LONG_PASSWORD	1	/* new more secure passwords */
  #define CLIENT_FOUND_ROWS	2	/* Found instead of affected rows */
-diff -r 2bbfde0e0e70 innobase/buf/buf0buf.c
---- a/innobase/buf/buf0buf.c	Mon Dec 22 00:33:11 2008 -0800
-+++ b/innobase/buf/buf0buf.c	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 innobase/buf/buf0buf.c
+--- a/innobase/buf/buf0buf.c	Tue Feb 17 22:33:54 2009 -0800
++++ b/innobase/buf/buf0buf.c	Tue Feb 17 22:33:58 2009 -0800
 @@ -653,6 +653,9 @@
  	}
  
@@ -147,9 +147,9 @@
 +       }
 +       mutex_exit(&(buf_pool->mutex));
 +}
-diff -r 2bbfde0e0e70 innobase/include/buf0buf.h
---- a/innobase/include/buf0buf.h	Mon Dec 22 00:33:11 2008 -0800
-+++ b/innobase/include/buf0buf.h	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 innobase/include/buf0buf.h
+--- a/innobase/include/buf0buf.h	Tue Feb 17 22:33:54 2009 -0800
++++ b/innobase/include/buf0buf.h	Tue Feb 17 22:33:58 2009 -0800
 @@ -709,6 +709,18 @@
  void buf_pool_dump(void);
  buf_block_t* buf_pool_get_nth_block_no_inline(buf_pool_t* pool, ulint i);  
@@ -195,9 +195,9 @@
  /* States of a control block */
  #define	BUF_BLOCK_NOT_USED	211	/* is in the free list */
  #define BUF_BLOCK_READY_FOR_USE	212	/* when buf_get_free_block returns
-diff -r 2bbfde0e0e70 innobase/include/buf0types.h
---- a/innobase/include/buf0types.h	Mon Dec 22 00:33:11 2008 -0800
-+++ b/innobase/include/buf0types.h	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 innobase/include/buf0types.h
+--- a/innobase/include/buf0types.h	Tue Feb 17 22:33:54 2009 -0800
++++ b/innobase/include/buf0types.h	Tue Feb 17 22:33:58 2009 -0800
 @@ -12,6 +12,8 @@
  typedef	struct buf_block_struct		buf_block_t;
  typedef	struct buf_pool_struct		buf_pool_t;
@@ -207,12 +207,12 @@
  /* The 'type' used of a buffer frame */
  typedef	byte	buf_frame_t;
  
-diff -r 2bbfde0e0e70 innobase/include/srv0srv.h
---- a/innobase/include/srv0srv.h	Mon Dec 22 00:33:11 2008 -0800
-+++ b/innobase/include/srv0srv.h	Mon Dec 22 00:33:48 2008 -0800
-@@ -141,6 +141,11 @@
- extern ulint	srv_io_capacity;
- extern ulint	srv_read_ahead;
+diff -r 5060df9888d7 innobase/include/srv0srv.h
+--- a/innobase/include/srv0srv.h	Tue Feb 17 22:33:54 2009 -0800
++++ b/innobase/include/srv0srv.h	Tue Feb 17 22:33:58 2009 -0800
+@@ -145,6 +145,11 @@
+ extern ulint	srv_flush_neighbor_pages;
+ extern uint	srv_read_ahead;
  extern ulint	srv_adaptive_checkpoint;
 +
 +extern volatile ibool srv_io_pattern;
@@ -222,12 +222,12 @@
  /*-------------------------------------------*/
  
  extern ulint	srv_n_rows_inserted;
-diff -r 2bbfde0e0e70 innobase/srv/srv0srv.c
---- a/innobase/srv/srv0srv.c	Mon Dec 22 00:33:11 2008 -0800
-+++ b/innobase/srv/srv0srv.c	Mon Dec 22 00:33:48 2008 -0800
-@@ -337,6 +337,11 @@
+diff -r 5060df9888d7 innobase/srv/srv0srv.c
+--- a/innobase/srv/srv0srv.c	Tue Feb 17 22:33:54 2009 -0800
++++ b/innobase/srv/srv0srv.c	Tue Feb 17 22:33:58 2009 -0800
+@@ -344,6 +344,11 @@
  
- ulint	srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
+ uint	srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
  ulint	srv_adaptive_checkpoint = 0; /* 0:disable 1:enable */
 +
 +volatile ibool srv_io_pattern = FALSE;
@@ -237,9 +237,9 @@
  /*-------------------------------------------*/
  ulong	srv_n_spin_wait_rounds	= 20;
  ulong	srv_n_free_tickets_to_enter = 500;
-diff -r 2bbfde0e0e70 mysql-test/r/information_schema.result
---- a/mysql-test/r/information_schema.result	Mon Dec 22 00:33:11 2008 -0800
-+++ b/mysql-test/r/information_schema.result	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 mysql-test/r/information_schema.result
+--- a/mysql-test/r/information_schema.result	Tue Feb 17 22:33:54 2009 -0800
++++ b/mysql-test/r/information_schema.result	Tue Feb 17 22:33:58 2009 -0800
 @@ -59,6 +59,7 @@
  USER_PRIVILEGES
  USER_STATISTICS
@@ -296,9 +296,9 @@
  KEY_COLUMN_USAGE	information_schema.KEY_COLUMN_USAGE	1
  PROCESSLIST	information_schema.PROCESSLIST	1
  PROFILING	information_schema.PROFILING	1
-diff -r 2bbfde0e0e70 mysql-test/r/information_schema_db.result
---- a/mysql-test/r/information_schema_db.result	Mon Dec 22 00:33:11 2008 -0800
-+++ b/mysql-test/r/information_schema_db.result	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 mysql-test/r/information_schema_db.result
+--- a/mysql-test/r/information_schema_db.result	Tue Feb 17 22:33:54 2009 -0800
++++ b/mysql-test/r/information_schema_db.result	Tue Feb 17 22:33:58 2009 -0800
 @@ -28,6 +28,7 @@
  USER_PRIVILEGES
  USER_STATISTICS
@@ -307,9 +307,9 @@
  show tables from INFORMATION_SCHEMA like 'T%';
  Tables_in_information_schema (T%)
  TABLES
-diff -r 2bbfde0e0e70 mysql-test/r/mysqlshow.result
---- a/mysql-test/r/mysqlshow.result	Mon Dec 22 00:33:11 2008 -0800
-+++ b/mysql-test/r/mysqlshow.result	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 mysql-test/r/mysqlshow.result
+--- a/mysql-test/r/mysqlshow.result	Tue Feb 17 22:33:54 2009 -0800
++++ b/mysql-test/r/mysqlshow.result	Tue Feb 17 22:33:58 2009 -0800
 @@ -102,6 +102,7 @@
  | USER_PRIVILEGES                       |
  | USER_STATISTICS                       |
@@ -326,9 +326,9 @@
  +---------------------------------------+
  Wildcard: inf_rmation_schema
  +--------------------+
-diff -r 2bbfde0e0e70 patch_info/innodb_io_pattern.info
+diff -r 5060df9888d7 patch_info/innodb_io_pattern.info
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/innodb_io_pattern.info	Mon Dec 22 00:33:48 2008 -0800
++++ b/patch_info/innodb_io_pattern.info	Tue Feb 17 22:33:58 2009 -0800
 @@ -0,0 +1,8 @@
 +File=innodb_io_pattern.patch
 +Name=Information schema table of InnoDB IO counts for each datafile pages
@@ -338,9 +338,9 @@
 +Comment=INFORMATION_SCHEMA.INNODB_IO_PATTERN
 +2008-12-01
 +YK: fix for mysql-test
-diff -r 2bbfde0e0e70 sql/ha_innodb.cc
---- a/sql/ha_innodb.cc	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/ha_innodb.cc	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 sql/ha_innodb.cc
+--- a/sql/ha_innodb.cc	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/ha_innodb.cc	Tue Feb 17 22:33:58 2009 -0800
 @@ -1569,6 +1569,8 @@
          pthread_cond_init(&commit_cond, NULL);
  	innodb_inited= 1;
@@ -350,7 +350,7 @@
  	/* If this is a replication slave and we needed to do a crash recovery,
  	set the master binlog position to what InnoDB internally knew about
  	how far we got transactions durable inside InnoDB. There is a
-@@ -6527,6 +6529,28 @@
+@@ -6535,6 +6537,28 @@
  }
  
  /****************************************************************************
@@ -379,10 +379,10 @@
  Implements the SHOW INNODB STATUS command. Sends the output of the InnoDB
  Monitor to the client. */
  
-diff -r 2bbfde0e0e70 sql/ha_innodb.h
---- a/sql/ha_innodb.h	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/ha_innodb.h	Mon Dec 22 00:33:48 2008 -0800
-@@ -240,6 +240,9 @@
+diff -r 5060df9888d7 sql/ha_innodb.h
+--- a/sql/ha_innodb.h	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/ha_innodb.h	Tue Feb 17 22:33:58 2009 -0800
+@@ -244,6 +244,9 @@
  extern ulong srv_adaptive_checkpoint;
  extern ulong srv_show_locks_held;
  extern ulong srv_show_verbose_locks;
@@ -392,7 +392,7 @@
  }
  
  bool innobase_init(void);
-@@ -266,6 +269,9 @@
+@@ -270,6 +273,9 @@
  bool innodb_I_S_buffer_pool_content(THD* thd, TABLE_LIST *tables);
  bool innodb_mutex_show_status(THD* thd);
  void innodb_export_status(void);
@@ -402,9 +402,9 @@
  
  void innobase_release_temporary_latches(THD *thd);
  
-diff -r 2bbfde0e0e70 sql/lex.h
---- a/sql/lex.h	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/lex.h	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 sql/lex.h
+--- a/sql/lex.h	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/lex.h	Tue Feb 17 22:33:58 2009 -0800
 @@ -244,6 +244,7 @@
    { "INNER",		SYM(INNER_SYM)},
    { "INNOBASE",		SYM(INNOBASE_SYM)},
@@ -413,10 +413,10 @@
    { "INOUT",            SYM(INOUT_SYM)},
    { "INSENSITIVE",      SYM(INSENSITIVE_SYM)},
    { "INSERT",		SYM(INSERT)},
-diff -r 2bbfde0e0e70 sql/mysqld.cc
---- a/sql/mysqld.cc	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/mysqld.cc	Mon Dec 22 00:33:48 2008 -0800
-@@ -4983,6 +4983,9 @@
+diff -r 5060df9888d7 sql/mysqld.cc
+--- a/sql/mysqld.cc	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/mysqld.cc	Tue Feb 17 22:33:58 2009 -0800
+@@ -5026,6 +5026,9 @@
    OPT_INNODB_SYNC_SPIN_LOOPS,
    OPT_INNODB_CONCURRENCY_TICKETS,
    OPT_INNODB_THREAD_SLEEP_DELAY,
@@ -426,7 +426,7 @@
    OPT_BDB_CACHE_SIZE,
    OPT_BDB_LOG_BUFFER_SIZE,
    OPT_BDB_MAX_LOCK,
-@@ -5382,6 +5385,18 @@
+@@ -5445,6 +5448,18 @@
     "Number of background write I/O threads in InnoDB.",
     (gptr*) &innobase_write_io_threads, (gptr*) &innobase_write_io_threads,
     0, GET_LONG, REQUIRED_ARG, 1, 1, 64, 0, 0, 0},
@@ -445,10 +445,10 @@
  #endif /* End HAVE_INNOBASE_DB */
    {"isam", OPT_ISAM, "Obsolete. ISAM storage engine is no longer supported.",
     (gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, 0, 0, 0,
-diff -r 2bbfde0e0e70 sql/set_var.cc
---- a/sql/set_var.cc	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/set_var.cc	Mon Dec 22 00:33:48 2008 -0800
-@@ -501,6 +501,12 @@
+diff -r 5060df9888d7 sql/set_var.cc
+--- a/sql/set_var.cc	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/set_var.cc	Tue Feb 17 22:33:58 2009 -0800
+@@ -528,6 +528,12 @@
  sys_var_long_ptr  sys_innodb_show_verbose_locks(
                                          "innodb_show_verbose_locks",
                                          &srv_show_verbose_locks);
@@ -461,7 +461,7 @@
  sys_var_const_os_str_ptr sys_innodb_data_file_path("innodb_data_file_path", 
                                                 &innobase_data_file_path);
  sys_var_const_os_str_ptr sys_innodb_data_home_dir("innodb_data_home_dir", 
-@@ -870,6 +876,9 @@
+@@ -901,6 +907,9 @@
    &sys_innodb_adaptive_checkpoint,
    &sys_innodb_show_locks_held,
    &sys_innodb_show_verbose_locks,
@@ -471,7 +471,7 @@
  #endif
    &sys_trust_routine_creators,
    &sys_trust_function_creators,
-@@ -1012,6 +1021,9 @@
+@@ -1047,6 +1056,9 @@
    {sys_innodb_adaptive_checkpoint.name, (char*) &sys_innodb_adaptive_checkpoint, SHOW_SYS},
    {"innodb_read_io_threads", (char*) &innobase_read_io_threads, SHOW_LONG},
    {"innodb_write_io_threads", (char*) &innobase_write_io_threads, SHOW_LONG},
@@ -481,7 +481,7 @@
  #endif
    {sys_interactive_timeout.name,(char*) &sys_interactive_timeout,   SHOW_SYS},
    {sys_join_buffer_size.name,   (char*) &sys_join_buffer_size,	    SHOW_SYS},
-@@ -3117,6 +3129,19 @@
+@@ -3160,6 +3172,19 @@
      thd->variables.lc_time_names= global_system_variables.lc_time_names;
  }
  
@@ -501,10 +501,10 @@
  /*
    Functions to update thd->options bits
  */
-diff -r 2bbfde0e0e70 sql/set_var.h
---- a/sql/set_var.h	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/set_var.h	Mon Dec 22 00:33:48 2008 -0800
-@@ -985,6 +985,17 @@
+diff -r 5060df9888d7 sql/set_var.h
+--- a/sql/set_var.h	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/set_var.h	Tue Feb 17 22:33:58 2009 -0800
+@@ -989,6 +989,17 @@
    virtual void set_default(THD *thd, enum_var_type type);
  };
  
@@ -522,10 +522,10 @@
  /****************************************************************************
    Classes for parsing of the SET command
  ****************************************************************************/
-diff -r 2bbfde0e0e70 sql/sql_parse.cc
---- a/sql/sql_parse.cc	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/sql_parse.cc	Mon Dec 22 00:33:48 2008 -0800
-@@ -7998,6 +7998,13 @@
+diff -r 5060df9888d7 sql/sql_parse.cc
+--- a/sql/sql_parse.cc	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/sql_parse.cc	Tue Feb 17 22:33:58 2009 -0800
+@@ -8009,6 +8009,13 @@
      }
      pthread_mutex_unlock(&LOCK_global_user_client_stats);
    }
@@ -539,9 +539,9 @@
   *write_to_binlog= tmp_write_to_binlog;
   return result;
  }
-diff -r 2bbfde0e0e70 sql/sql_show.cc
---- a/sql/sql_show.cc	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/sql_show.cc	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 sql/sql_show.cc
+--- a/sql/sql_show.cc	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/sql_show.cc	Tue Feb 17 22:33:58 2009 -0800
 @@ -32,6 +32,17 @@
  #ifdef HAVE_INNOBASE_DB
  #include "ha_innodb.h"
@@ -560,7 +560,7 @@
  
  #ifndef NO_EMBEDDED_ACCESS_CHECKS
  static const char *grant_names[]={
-@@ -4074,6 +4085,67 @@
+@@ -4088,6 +4099,67 @@
    DBUG_RETURN(res);
  }
  
@@ -628,7 +628,7 @@
  /*
    Find schema_tables elment by name
  
-@@ -4880,6 +4952,19 @@
+@@ -4894,6 +4966,19 @@
    {0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
  };
  
@@ -648,7 +648,7 @@
  
  ST_FIELD_INFO variables_fields_info[]=
  {
-@@ -5055,6 +5140,10 @@
+@@ -5069,6 +5154,10 @@
     make_old_format, 0, -1, -1, 1},
    {"VIEWS", view_fields_info, create_schema_table, 
      get_all_tables, 0, get_schema_views_record, 1, 2, 0},
@@ -659,9 +659,9 @@
    {0, 0, 0, 0, 0, 0, 0, 0, 0}
  };
  
-diff -r 2bbfde0e0e70 sql/sql_yacc.yy
---- a/sql/sql_yacc.yy	Mon Dec 22 00:33:11 2008 -0800
-+++ b/sql/sql_yacc.yy	Mon Dec 22 00:33:48 2008 -0800
+diff -r 5060df9888d7 sql/sql_yacc.yy
+--- a/sql/sql_yacc.yy	Tue Feb 17 22:33:54 2009 -0800
++++ b/sql/sql_yacc.yy	Tue Feb 17 22:33:58 2009 -0800
 @@ -685,6 +685,7 @@
  %token  INFILE
  %token  INNER_SYM

================================================================
Index: SOURCES/mysql-innodb_locks_held.patch
diff -u SOURCES/mysql-innodb_locks_held.patch:1.1.2.2 SOURCES/mysql-innodb_locks_held.patch:1.1.2.3
--- SOURCES/mysql-innodb_locks_held.patch:1.1.2.2	Tue Feb  3 17:46:09 2009
+++ SOURCES/mysql-innodb_locks_held.patch	Thu Mar 12 22:49:05 2009
@@ -1,6 +1,6 @@
-diff -r ae6708ab17e5 innobase/include/srv0srv.h
---- a/innobase/include/srv0srv.h	Mon Dec 22 00:32:07 2008 -0800
-+++ b/innobase/include/srv0srv.h	Mon Dec 22 00:32:58 2008 -0800
+diff -r 7d3d7786b927 innobase/include/srv0srv.h
+--- a/innobase/include/srv0srv.h	Tue Feb 17 22:33:33 2009 -0800
++++ b/innobase/include/srv0srv.h	Tue Feb 17 22:33:47 2009 -0800
 @@ -80,6 +80,8 @@
  extern ulint	srv_log_file_size;
  extern ulint	srv_log_buffer_size;
@@ -10,9 +10,9 @@
  
  extern byte	srv_latin1_ordering[256];/* The sort order table of the latin1
  					character set */
-diff -r ae6708ab17e5 innobase/lock/lock0lock.c
---- a/innobase/lock/lock0lock.c	Mon Dec 22 00:32:07 2008 -0800
-+++ b/innobase/lock/lock0lock.c	Mon Dec 22 00:32:58 2008 -0800
+diff -r 7d3d7786b927 innobase/lock/lock0lock.c
+--- a/innobase/lock/lock0lock.c	Tue Feb 17 22:33:33 2009 -0800
++++ b/innobase/lock/lock0lock.c	Tue Feb 17 22:33:47 2009 -0800
 @@ -4181,6 +4181,7 @@
  #endif /* UNIV_SYNC_DEBUG */
  	}
@@ -50,9 +50,9 @@
  			file);
  	
  		nth_trx++;
-diff -r ae6708ab17e5 innobase/srv/srv0srv.c
---- a/innobase/srv/srv0srv.c	Mon Dec 22 00:32:07 2008 -0800
-+++ b/innobase/srv/srv0srv.c	Mon Dec 22 00:32:58 2008 -0800
+diff -r 7d3d7786b927 innobase/srv/srv0srv.c
+--- a/innobase/srv/srv0srv.c	Tue Feb 17 22:33:33 2009 -0800
++++ b/innobase/srv/srv0srv.c	Tue Feb 17 22:33:47 2009 -0800
 @@ -116,6 +116,8 @@
  ulint	srv_log_file_size	= ULINT_MAX;	/* size in database pages */ 
  ulint	srv_log_buffer_size	= ULINT_MAX;	/* size in database pages */ 
@@ -62,7 +62,7 @@
  
  byte	srv_latin1_ordering[256]	/* The sort order table of the latin1
  					character set. The following table is
-@@ -1694,24 +1696,6 @@
+@@ -1703,24 +1705,6 @@
  
  	mutex_exit(&dict_foreign_err_mutex);
  
@@ -87,10 +87,11 @@
  	fputs("--------\n"
  		"FILE I/O\n"
  		"--------\n", file);
-@@ -1805,6 +1789,25 @@
+@@ -1813,6 +1797,25 @@
+ 	srv_n_rows_updated_old = srv_n_rows_updated;
  	srv_n_rows_deleted_old = srv_n_rows_deleted;
  	srv_n_rows_read_old = srv_n_rows_read;
- 
++
 +	lock_print_info_summary(file);
 +	if (trx_start) {
 +		long	t = ftell(file);
@@ -109,13 +110,12 @@
 +			*trx_end = (ulint) t;
 +		}
 +	}
-+
+ 
    fputs("----------------------------\n"
  		       "END OF INNODB MONITOR OUTPUT\n"
- 		"============================\n", file);
-diff -r ae6708ab17e5 libmysqld/set_var.cc
---- a/libmysqld/set_var.cc	Mon Dec 22 00:32:07 2008 -0800
-+++ b/libmysqld/set_var.cc	Mon Dec 22 00:32:58 2008 -0800
+diff -r 7d3d7786b927 libmysqld/set_var.cc
+--- a/libmysqld/set_var.cc	Tue Feb 17 22:33:33 2009 -0800
++++ b/libmysqld/set_var.cc	Tue Feb 17 22:33:47 2009 -0800
 @@ -821,6 +821,8 @@
    &sys_innodb_thread_concurrency,
    &sys_innodb_commit_concurrency,
@@ -134,9 +134,9 @@
    {"innodb_flush_method",    (char*) &innobase_unix_file_flush_method, SHOW_CHAR_PTR},
    {"innodb_force_recovery", (char*) &innobase_force_recovery, SHOW_LONG },
    {"innodb_lock_wait_timeout", (char*) &innobase_lock_wait_timeout, SHOW_LONG },
-diff -r ae6708ab17e5 patch_info/innodb_locks_held.info
+diff -r 7d3d7786b927 patch_info/innodb_locks_held.info
 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/innodb_locks_held.info	Mon Dec 22 00:32:58 2008 -0800
++++ b/patch_info/innodb_locks_held.info	Tue Feb 17 22:33:47 2009 -0800
 @@ -0,0 +1,6 @@
 +File=innodb_locks_held.patch
 +Name=Add locks held, remove locked records in SHOW INNODB STATUS
@@ -144,22 +144,22 @@
 +Author=Baron Schwartz <baron at xaprb.com>
 +License=GPL
 +Comment=Bug #29126 fix
-diff -r ae6708ab17e5 sql/ha_innodb.h
---- a/sql/ha_innodb.h	Mon Dec 22 00:32:07 2008 -0800
-+++ b/sql/ha_innodb.h	Mon Dec 22 00:32:58 2008 -0800
-@@ -238,6 +238,8 @@
- extern ulong srv_io_capacity;
- extern ulong srv_read_ahead;
+diff -r 7d3d7786b927 sql/ha_innodb.h
+--- a/sql/ha_innodb.h	Tue Feb 17 22:33:33 2009 -0800
++++ b/sql/ha_innodb.h	Tue Feb 17 22:33:47 2009 -0800
+@@ -242,6 +242,8 @@
+ extern ulong srv_flush_neighbor_pages;
+ extern uint srv_read_ahead;
  extern ulong srv_adaptive_checkpoint;
 +extern ulong srv_show_locks_held;
 +extern ulong srv_show_verbose_locks;
  }
  
  bool innobase_init(void);
-diff -r ae6708ab17e5 sql/mysqld.cc
---- a/sql/mysqld.cc	Mon Dec 22 00:32:07 2008 -0800
-+++ b/sql/mysqld.cc	Mon Dec 22 00:32:58 2008 -0800
-@@ -4969,6 +4969,8 @@
+diff -r 7d3d7786b927 sql/mysqld.cc
+--- a/sql/mysqld.cc	Tue Feb 17 22:33:33 2009 -0800
++++ b/sql/mysqld.cc	Tue Feb 17 22:33:47 2009 -0800
+@@ -5012,6 +5012,8 @@
    OPT_INNODB_MAX_PURGE_LAG,
    OPT_INNODB_FILE_IO_THREADS,
    OPT_INNODB_LOCK_WAIT_TIMEOUT,
@@ -168,7 +168,7 @@
    OPT_INNODB_THREAD_CONCURRENCY,
    OPT_INNODB_COMMIT_CONCURRENCY,
    OPT_INNODB_FORCE_RECOVERY,
-@@ -5308,6 +5310,14 @@
+@@ -5356,6 +5358,14 @@
     (gptr*) &srv_flush_log_at_trx_commit,
     (gptr*) &srv_flush_log_at_trx_commit,
     0, GET_ULONG, OPT_ARG,  1, 0, 2, 0, 0, 0},
@@ -183,11 +183,11 @@
    {"innodb_flush_method", OPT_INNODB_FLUSH_METHOD,
     "With which method to flush data.", (gptr*) &innobase_unix_file_flush_method,
     (gptr*) &innobase_unix_file_flush_method, 0, GET_STR, REQUIRED_ARG, 0, 0, 0,
-diff -r ae6708ab17e5 sql/set_var.cc
---- a/sql/set_var.cc	Mon Dec 22 00:32:07 2008 -0800
-+++ b/sql/set_var.cc	Mon Dec 22 00:32:58 2008 -0800
-@@ -495,6 +495,12 @@
-                                               &srv_read_ahead);
+diff -r 7d3d7786b927 sql/set_var.cc
+--- a/sql/set_var.cc	Tue Feb 17 22:33:33 2009 -0800
++++ b/sql/set_var.cc	Tue Feb 17 22:33:47 2009 -0800
+@@ -522,6 +522,12 @@
+                                       &innodb_read_ahead_typelib, fix_innodb_read_ahead);
  sys_var_long_ptr	sys_innodb_adaptive_checkpoint("innodb_adaptive_checkpoint",
                                                        &srv_adaptive_checkpoint);
 +sys_var_long_ptr  sys_innodb_show_locks_held(
@@ -199,8 +199,8 @@
  sys_var_const_os_str_ptr sys_innodb_data_file_path("innodb_data_file_path", 
                                                 &innobase_data_file_path);
  sys_var_const_os_str_ptr sys_innodb_data_home_dir("innodb_data_home_dir", 
-@@ -862,6 +868,8 @@
-   &sys_innodb_io_capacity,
+@@ -893,6 +899,8 @@
+   &sys_innodb_flush_neighbor_pages,
    &sys_innodb_read_ahead,
    &sys_innodb_adaptive_checkpoint,
 +  &sys_innodb_show_locks_held,
@@ -208,7 +208,7 @@
  #endif
    &sys_trust_routine_creators,
    &sys_trust_function_creators,
-@@ -977,6 +985,8 @@
+@@ -1008,6 +1016,8 @@
    {"innodb_file_io_threads", (char*) &innobase_file_io_threads, SHOW_LONG },
    {"innodb_file_per_table", (char*) &innobase_file_per_table, SHOW_MY_BOOL},
    {sys_innodb_flush_log_at_trx_commit.name, (char*) &sys_innodb_flush_log_at_trx_commit, SHOW_SYS},

================================================================
Index: SOURCES/mysql-innodb_rw_lock.patch
diff -u SOURCES/mysql-innodb_rw_lock.patch:1.1.2.1 SOURCES/mysql-innodb_rw_lock.patch:1.1.2.2
--- SOURCES/mysql-innodb_rw_lock.patch:1.1.2.1	Fri Jan  9 12:04:50 2009
+++ SOURCES/mysql-innodb_rw_lock.patch	Thu Mar 12 22:49:06 2009
@@ -173,13 +173,19 @@
  /*================*/
  	rw_lock_t*	lock);
  UNIV_INLINE
-@@ -408,6 +418,11 @@
+@@ -408,6 +418,17 @@
  	rw_lock_debug_t*	info);	/* in: debug struct */
  #endif /* UNIV_SYNC_DEBUG */
  
 +#ifdef HAVE_ATOMIC_BUILTINS
 +/* This value means NOT_LOCKED */
 +#define RW_LOCK_BIAS		0x00100000
++#else
++#error HAVE_ATOMIC_BUILTINS is not defined. Do you use enough new GCC or compatibles?
++#error Or do you use exact options for CFLAGS?
++#error e.g. (for x86_32): "-m32 -march=i586 -mtune=i686"
++#error e.g. (for Sparc_64): "-m64 -mcpu=v9"
++#error Otherwise, this build may be slower than normal version.
 +#endif
 +
  /* NOTE! The structure appears here only for the compiler to know its size.
@@ -1024,7 +1030,7 @@
  		/* If we get here, locking did not succeed, we may
  		suspend the thread to wait in the wait array */
  
-@@ -281,9 +311,19 @@
+@@ -281,9 +311,26 @@
  				file_name, line,
  				&index);
  
@@ -1039,6 +1045,13 @@
 +				return; /* Success */
 +			}
 +		}
++
++		/* If wait_ex_waiter stalls, wakes it. */
++		if (lock->wait_ex_waiters && lock->lock_word == RW_LOCK_BIAS) {
++			rw_lock_set_wx_waiters(lock, 0);
++			os_event_set(lock->wait_ex_event);
++			sync_array_object_signalled(sync_primary_wait_array);
++		}
 +#else
  		mutex_exit(rw_lock_get_mutex(lock));
 +#endif
@@ -1095,32 +1108,32 @@
 +	switch(rw_lock_get_writer(lock)) {
 +	    case RW_LOCK_WAIT_EX:
 +		/* have right to try x-lock */
-+		if (lock->lock_word == RW_LOCK_BIAS) {
-+			/* try x-lock */
-+			if(__sync_sub_and_fetch(&(lock->lock_word),
-+					RW_LOCK_BIAS) == 0) {
-+				/* success */
-+				lock->pass = pass;
-+				lock->writer_is_wait_ex = FALSE;
-+				__sync_fetch_and_add(&(lock->writer_count),1);
++retry_x_lock:
++		/* try x-lock */
++		if(__sync_sub_and_fetch(&(lock->lock_word),
++				RW_LOCK_BIAS) == 0) {
++			/* success */
++			lock->pass = pass;
++			lock->writer_is_wait_ex = FALSE;
++			__sync_fetch_and_add(&(lock->writer_count),1);
 +
 +#ifdef UNIV_SYNC_DEBUG
-+				rw_lock_remove_debug_info(lock, pass, RW_LOCK_WAIT_EX);
-+				rw_lock_add_debug_info(lock, pass, RW_LOCK_EX,
-+							file_name, line);
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-innodb_io_pattern.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-innodb_locks_held.patch?r1=1.1.2.2&r2=1.1.2.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-innodb_rw_lock.patch?r1=1.1.2.1&r2=1.1.2.2&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-microslow_innodb.patch?r1=1.1.2.5&r2=1.1.2.6&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-split_buf_pool_mutex_fixed_optimistic_safe.patch?r1=1.1.2.2&r2=1.1.2.3&f=u
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-userstatv2.patch?r1=1.1.2.5&r2=1.1.2.6&f=u



More information about the pld-cvs-commit mailing list