Author: glen                         Date: Tue Feb  3 16:46:16 2009 GMT
Module: SOURCES                       Tag: MYSQL_5_0
---- Log message:
- updated by  Eero Hänninen <eero.hanninen#delfi.ee>

---- Files affected:
SOURCES:
   mysql-innodb_io_patches.patch (1.1.2.1 -> 1.1.2.2) , 
mysql-innodb_locks_held.patch (1.1.2.1 -> 1.1.2.2) , 
mysql-microsec_process.patch (1.1.2.1 -> 1.1.2.2) , 
mysql-microslow_innodb.patch (1.1.2.3 -> 1.1.2.4) , mysql-userstatv2.patch 
(1.1.2.3 -> 1.1.2.4) 

---- Diffs:

================================================================
Index: SOURCES/mysql-innodb_io_patches.patch
diff -u SOURCES/mysql-innodb_io_patches.patch:1.1.2.1 
SOURCES/mysql-innodb_io_patches.patch:1.1.2.2
--- SOURCES/mysql-innodb_io_patches.patch:1.1.2.1       Fri Jan  9 12:04:53 2009
+++ SOURCES/mysql-innodb_io_patches.patch       Tue Feb  3 17:46:08 2009
@@ -1,17 +1,38 @@
-diff -r 45683461331d innobase/buf/buf0rea.c
---- a/innobase/buf/buf0rea.c   Mon Dec 22 00:31:16 2008 -0800
-+++ b/innobase/buf/buf0rea.c   Mon Dec 22 00:32:02 2008 -0800
-@@ -188,6 +188,10 @@
-       ulint           low, high;
+diff -ruN a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c
+--- a/innobase/buf/buf0flu.c   2008-12-19 02:19:35.000000000 +0900
++++ b/innobase/buf/buf0flu.c   2009-01-09 15:51:10.000000000 +0900
+@@ -898,10 +898,17 @@
+ 
+                               old_page_count = page_count;
+                               
++                              if (srv_flush_neighbor_pages) {
+                               /* Try to flush also all the neighbors */
+                               page_count +=
+                                       buf_flush_try_neighbors(space, offset,
+                                                               flush_type);
++                              } else {
++                              /* Try to flush the page only */
++                              page_count +=
++                                      buf_flush_try_page(space, offset,
++                                                         flush_type);
++                              }
+                               /* fprintf(stderr,
+                               "Flush type %lu, page no %lu, neighb %lu\n",
+                               flush_type, offset,
+diff -ruN a/innobase/buf/buf0rea.c b/innobase/buf/buf0rea.c
+--- a/innobase/buf/buf0rea.c   2009-01-09 15:40:22.000000000 +0900
++++ b/innobase/buf/buf0rea.c   2009-01-09 15:40:46.000000000 +0900
+@@ -189,6 +189,10 @@
        ulint           err;
        ulint           i;
-+
+ 
 +      if (!(srv_read_ahead & 1)) {
 +              return(0);
 +      }
- 
++
        if (srv_startup_is_before_trx_rollback_phase) {
                /* No read-ahead to avoid thread deadlocks */
+               return(0);
 @@ -396,6 +400,10 @@
        ulint           err;
        ulint           i;
@@ -23,9 +44,38 @@
        if (srv_startup_is_before_trx_rollback_phase) {
                /* No read-ahead to avoid thread deadlocks */
                return(0);
-diff -r 45683461331d innobase/include/os0file.h
---- a/innobase/include/os0file.h       Mon Dec 22 00:31:16 2008 -0800
-+++ b/innobase/include/os0file.h       Mon Dec 22 00:32:02 2008 -0800
+diff -ruN a/innobase/ibuf/ibuf0ibuf.c b/innobase/ibuf/ibuf0ibuf.c
+--- a/innobase/ibuf/ibuf0ibuf.c        2008-12-19 02:19:35.000000000 +0900
++++ b/innobase/ibuf/ibuf0ibuf.c        2009-01-09 15:53:18.000000000 +0900
+@@ -370,8 +370,9 @@
+       grow in size, as the references on the upper levels of the tree can
+       change */
+       
+-      ibuf->max_size = buf_pool_get_curr_size() / UNIV_PAGE_SIZE
+-                                              / IBUF_POOL_SIZE_PER_MAX_SIZE;
++      ibuf->max_size = ut_min( buf_pool_get_curr_size() / UNIV_PAGE_SIZE
++              / IBUF_POOL_SIZE_PER_MAX_SIZE, (ulint) srv_ibuf_max_size / 
UNIV_PAGE_SIZE);
++      srv_ibuf_max_size = (long long) ibuf->max_size * UNIV_PAGE_SIZE;
+       ibuf->meter = IBUF_THRESHOLD + 1;
+ 
+       UT_LIST_INIT(ibuf->data_list);
+@@ -2258,11 +2259,13 @@
+ 
+       mutex_enter(&ibuf_mutex);
+ 
++      if (!srv_ibuf_active_contract) {
+       if (ibuf->size < ibuf->max_size + IBUF_CONTRACT_ON_INSERT_NON_SYNC) {
+               mutex_exit(&ibuf_mutex);
+ 
+               return;
+       }
++      }
+ 
+       sync = FALSE;
+       
+diff -ruN a/innobase/include/os0file.h b/innobase/include/os0file.h
+--- a/innobase/include/os0file.h       2009-01-09 15:40:22.000000000 +0900
++++ b/innobase/include/os0file.h       2009-01-09 15:40:46.000000000 +0900
 @@ -551,8 +551,10 @@
  /*========*/
        ulint   n,              /* in: maximum number of pending aio operations
@@ -39,9 +89,9 @@
        ulint   n_slots_sync);  /* in: number of slots in the sync aio array */
  /***********************************************************************
  Requests an asynchronous i/o operation. */
-diff -r 45683461331d innobase/include/srv0srv.h
---- a/innobase/include/srv0srv.h       Mon Dec 22 00:31:16 2008 -0800
-+++ b/innobase/include/srv0srv.h       Mon Dec 22 00:32:02 2008 -0800
+diff -ruN a/innobase/include/srv0srv.h b/innobase/include/srv0srv.h
+--- a/innobase/include/srv0srv.h       2009-01-09 15:40:22.000000000 +0900
++++ b/innobase/include/srv0srv.h       2009-01-09 15:54:33.000000000 +0900
 @@ -89,6 +89,8 @@
  extern ulint  srv_lock_table_size;
  
@@ -51,20 +101,24 @@
  
  #ifdef UNIV_LOG_ARCHIVE
  extern ibool  srv_log_archive_on;
-@@ -133,6 +135,10 @@
+@@ -133,6 +135,14 @@
  extern ulong  srv_max_purge_lag;
  extern ibool  srv_use_awe;
  extern ibool  srv_use_adaptive_hash_indexes;
 +
 +extern ulint  srv_io_capacity;
-+extern ulint  srv_read_ahead;
++extern long long      srv_ibuf_max_size;
++extern ulint  srv_ibuf_active_contract;
++extern ulint  srv_ibuf_accel_rate;
++extern ulint  srv_flush_neighbor_pages;
++extern uint   srv_read_ahead;
 +extern ulint  srv_adaptive_checkpoint;
  /*-------------------------------------------*/
  
  extern ulint  srv_n_rows_inserted;
-diff -r 45683461331d innobase/log/log0log.c
---- a/innobase/log/log0log.c   Mon Dec 22 00:31:16 2008 -0800
-+++ b/innobase/log/log0log.c   Mon Dec 22 00:32:02 2008 -0800
+diff -ruN a/innobase/log/log0log.c b/innobase/log/log0log.c
+--- a/innobase/log/log0log.c   2008-12-19 02:19:36.000000000 +0900
++++ b/innobase/log/log0log.c   2009-01-09 15:40:46.000000000 +0900
 @@ -3326,6 +3326,15 @@
                        (ulong) 
ut_dulint_get_high(log_sys->last_checkpoint_lsn),
                        (ulong) 
ut_dulint_get_low(log_sys->last_checkpoint_lsn));
@@ -81,9 +135,9 @@
        current_time = time(NULL);
                        
        time_elapsed = 0.001 + difftime(current_time,
-diff -r 45683461331d innobase/os/os0file.c
---- a/innobase/os/os0file.c    Mon Dec 22 00:31:16 2008 -0800
-+++ b/innobase/os/os0file.c    Mon Dec 22 00:32:02 2008 -0800
+diff -ruN a/innobase/os/os0file.c b/innobase/os/os0file.c
+--- a/innobase/os/os0file.c    2009-01-09 15:40:23.000000000 +0900
++++ b/innobase/os/os0file.c    2009-01-09 15:40:46.000000000 +0900
 @@ -2877,8 +2877,10 @@
  /*========*/
        ulint   n,              /* in: maximum number of pending aio operations
@@ -131,7 +185,7 @@
  loop:
        os_mutex_enter(array->mutex);
  
-@@ -3198,12 +3209,23 @@
+@@ -3198,6 +3209,16 @@
                goto loop;
        }
  
@@ -148,16 +202,17 @@
        for (i = 0;; i++) {
                slot = os_aio_array_get_nth_slot(array, i);
  
-               if (slot->reserved == FALSE) {
+@@ -3205,6 +3226,7 @@
                        break;
                }
-+      }
        }
++      }
  
        array->n_reserved++;
-diff -r 45683461331d innobase/srv/srv0srv.c
---- a/innobase/srv/srv0srv.c   Mon Dec 22 00:31:16 2008 -0800
-+++ b/innobase/srv/srv0srv.c   Mon Dec 22 00:32:02 2008 -0800
+ 
+diff -ruN a/innobase/srv/srv0srv.c b/innobase/srv/srv0srv.c
+--- a/innobase/srv/srv0srv.c   2009-01-09 15:40:23.000000000 +0900
++++ b/innobase/srv/srv0srv.c   2009-01-09 15:58:36.000000000 +0900
 @@ -167,6 +167,8 @@
  ulint srv_lock_table_size     = ULINT_MAX;
  
@@ -167,7 +222,7 @@
  
  #ifdef UNIV_LOG_ARCHIVE
  ibool srv_log_archive_on      = FALSE;
-@@ -324,6 +326,15 @@
+@@ -324,6 +326,22 @@
  ibool srv_use_awe                     = FALSE;
  ibool srv_use_adaptive_hash_indexes   = TRUE;
  
@@ -178,12 +233,19 @@
 +where max is srv_io_capacity. */
 +#define PCT_IO(pct) ((ulint) (srv_io_capacity * ((double) pct / 100.0)))
 +
-+ulint srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
++long long     srv_ibuf_max_size = 0;
++ulint srv_ibuf_active_contract = 0; /* 0:disable 1:enable */
++ulint srv_ibuf_accel_rate = 100;
++#define PCT_IBUF_IO(pct) ((ulint) (srv_io_capacity * srv_ibuf_accel_rate * 
((double) pct / 10000.0)))
++
++ulint srv_flush_neighbor_pages = 1; /* 0:disable 1:enable */
++
++uint  srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
 +ulint srv_adaptive_checkpoint = 0; /* 0:disable 1:enable */
  /*-------------------------------------------*/
  ulong srv_n_spin_wait_rounds  = 20;
  ulong srv_n_free_tickets_to_enter = 500;
-@@ -2214,6 +2225,8 @@
+@@ -2214,6 +2232,8 @@
        ibool           skip_sleep      = FALSE;
        ulint           i;
        
@@ -192,7 +254,7 @@
  #ifdef UNIV_DEBUG_THREAD_CREATION
        fprintf(stderr, "Master thread starts, id %lu\n",
                              os_thread_pf(os_thread_get_curr_id()));
-@@ -2302,9 +2315,9 @@
+@@ -2302,9 +2322,9 @@
                                                + log_sys->n_pending_writes;
                n_ios = log_sys->n_log_ios + buf_pool->n_pages_read
                                                + buf_pool->n_pages_written;
@@ -200,11 +262,11 @@
 +              if (n_pend_ios < 3 && (n_ios - n_ios_old < PCT_IO(5))) {
                        srv_main_thread_op_info = "doing insert buffer merge";
 -                      ibuf_contract_for_n_pages(TRUE, 5);
-+                      ibuf_contract_for_n_pages(TRUE, PCT_IO(5));
++                      ibuf_contract_for_n_pages(TRUE, PCT_IBUF_IO(5));
  
                        srv_main_thread_op_info = "flushing log";
  
-@@ -2317,7 +2330,7 @@
+@@ -2317,7 +2337,7 @@
                        /* Try to keep the number of modified pages in the
                        buffer pool under the limit wished by the user */
                        
@@ -213,7 +275,7 @@
                                                          ut_dulint_max);
  
                        /* If we had to do the flush, it may have taken
-@@ -2326,6 +2339,44 @@
+@@ -2326,6 +2346,49 @@
                        iteration of this loop. */
                             
                        skip_sleep = TRUE;
@@ -231,6 +293,11 @@
 +
 +                      } else {
 +                              if (ut_dulint_minus(log_sys->lsn, oldest_lsn)
++                                  > (log_sys->max_checkpoint_age) - 
((log_sys->max_checkpoint_age) / 8)) {
++                                      /* LOG_POOL_PREFLUSH_RATIO_ASYNC is 
exceeded. */
++                                      /* We should not flush from here. */
++                                      mutex_exit(&(log_sys->mutex));
++                              } else if (ut_dulint_minus(log_sys->lsn, 
oldest_lsn)
 +                                  > (log_sys->max_checkpoint_age) - 
((log_sys->max_checkpoint_age) / 4)) {
 +
 +                                      /* 2nd defence line (max_checkpoint_age 
* 3/4) */
@@ -258,7 +325,7 @@
                }
  
                if (srv_activity_count == old_activity_count) {
-@@ -2352,10 +2403,10 @@
+@@ -2352,10 +2415,10 @@
        n_pend_ios = buf_get_n_pending_ios() + log_sys->n_pending_writes;
        n_ios = log_sys->n_log_ios + buf_pool->n_pages_read
                                                + buf_pool->n_pages_written;
@@ -271,16 +338,16 @@
  
                srv_main_thread_op_info = "flushing log";
                log_buffer_flush_to_disk();
-@@ -2365,7 +2416,7 @@
+@@ -2365,7 +2428,7 @@
        even if the server were active */
  
        srv_main_thread_op_info = "doing insert buffer merge";
 -      ibuf_contract_for_n_pages(TRUE, 5);
-+      ibuf_contract_for_n_pages(TRUE, PCT_IO(5));
++      ibuf_contract_for_n_pages(TRUE, PCT_IBUF_IO(5));
  
        srv_main_thread_op_info = "flushing log";
        log_buffer_flush_to_disk();
-@@ -2407,14 +2458,14 @@
+@@ -2407,14 +2470,14 @@
                (> 70 %), we assume we can afford reserving the disk(s) for
                the time it requires to flush 100 pages */
  
@@ -297,16 +364,16 @@
                                                        ut_dulint_max);
        }
  
-@@ -2503,7 +2554,7 @@
+@@ -2503,7 +2566,7 @@
        if (srv_fast_shutdown && srv_shutdown_state > 0) {
                n_bytes_merged = 0;
        } else {
 -              n_bytes_merged = ibuf_contract_for_n_pages(TRUE, 20);
-+              n_bytes_merged = ibuf_contract_for_n_pages(TRUE, PCT_IO(100));
++              n_bytes_merged = ibuf_contract_for_n_pages(TRUE, 
PCT_IBUF_IO(100));
        }
  
        srv_main_thread_op_info = "reserving kernel mutex";
-@@ -2520,7 +2571,7 @@
+@@ -2520,7 +2583,7 @@
  
        if (srv_fast_shutdown < 2) {
                n_pages_flushed =
@@ -315,9 +382,9 @@
        } else {
                /* In the fastest shutdown we do not flush the buffer pool
                to data files: we set n_pages_flushed to 0 artificially. */
-diff -r 45683461331d innobase/srv/srv0start.c
---- a/innobase/srv/srv0start.c Mon Dec 22 00:31:16 2008 -0800
-+++ b/innobase/srv/srv0start.c Mon Dec 22 00:32:02 2008 -0800
+diff -ruN a/innobase/srv/srv0start.c b/innobase/srv/srv0start.c
+--- a/innobase/srv/srv0start.c 2008-12-19 02:19:37.000000000 +0900
++++ b/innobase/srv/srv0start.c 2009-01-09 15:40:46.000000000 +0900
 @@ -1205,24 +1205,28 @@
                return(DB_ERROR);
        }
@@ -351,22 +418,24 @@
                                        SRV_MAX_N_PENDING_SYNC_IOS);
        }
        
-diff -r 45683461331d patch_info/innodb_io_patches.info
---- /dev/null  Thu Jan 01 00:00:00 1970 +0000
-+++ b/patch_info/innodb_io_patches.info        Mon Dec 22 00:32:02 2008 -0800
-@@ -0,0 +1,9 @@
+diff -ruN a/patch_info/innodb_io_patches.info 
b/patch_info/innodb_io_patches.info
+--- /dev/null  1970-01-01 09:00:00.000000000 +0900
++++ b/patch_info/innodb_io_patches.info        2009-01-09 15:59:05.000000000 
+0900
+@@ -0,0 +1,11 @@
 +File=innodb_io_patches.patch
 +Name=Cluster of past InnoDB IO patches
-+Version=1.0
++Version=1.1
 +Author=Percona
 +License=GPL
 +Comment=This patch contains fixed (control_flush_and_merge_and_read, 
control_io-threads, adaptive_flush)
 +ChangeLog=
 +2008-11-06
 +YK: Initial release
-diff -r 45683461331d sql/ha_innodb.cc
---- a/sql/ha_innodb.cc Mon Dec 22 00:31:16 2008 -0800
-+++ b/sql/ha_innodb.cc Mon Dec 22 00:32:02 2008 -0800
++2009-01-09
++YK: Some parameters are added
+diff -ruN a/sql/ha_innodb.cc b/sql/ha_innodb.cc
+--- a/sql/ha_innodb.cc 2009-01-09 15:40:23.000000000 +0900
++++ b/sql/ha_innodb.cc 2009-01-09 15:40:46.000000000 +0900
 @@ -149,6 +149,7 @@
       innobase_lock_wait_timeout, innobase_force_recovery,
       innobase_open_files;
@@ -384,9 +453,9 @@
  
        srv_lock_wait_timeout = (ulint) innobase_lock_wait_timeout;
        srv_force_recovery = (ulint) innobase_force_recovery;
-diff -r 45683461331d sql/ha_innodb.h
---- a/sql/ha_innodb.h  Mon Dec 22 00:31:16 2008 -0800
-+++ b/sql/ha_innodb.h  Mon Dec 22 00:32:02 2008 -0800
+diff -ruN a/sql/ha_innodb.h b/sql/ha_innodb.h
+--- a/sql/ha_innodb.h  2009-01-09 15:40:23.000000000 +0900
++++ b/sql/ha_innodb.h  2009-01-09 15:59:41.000000000 +0900
 @@ -204,6 +204,7 @@
  extern long innobase_additional_mem_pool_size;
  extern long innobase_buffer_pool_awe_mem_mb;
@@ -395,24 +464,32 @@
  extern long innobase_force_recovery;
  extern long innobase_open_files;
  extern char *innobase_data_home_dir, *innobase_data_file_path;
-@@ -234,6 +235,9 @@
+@@ -234,6 +235,13 @@
  extern ulong srv_thread_concurrency;
  extern ulong srv_commit_concurrency;
  extern ulong srv_flush_log_at_trx_commit;
 +extern ulong srv_io_capacity;
-+extern ulong srv_read_ahead;
++extern long long srv_ibuf_max_size;
++extern ulong srv_ibuf_active_contract;
++extern ulong srv_ibuf_accel_rate;
++extern ulong srv_flush_neighbor_pages;
++extern uint srv_read_ahead;
 +extern ulong srv_adaptive_checkpoint;
  }
  
  bool innobase_init(void);
-diff -r 45683461331d sql/mysqld.cc
---- a/sql/mysqld.cc    Mon Dec 22 00:31:16 2008 -0800
-+++ b/sql/mysqld.cc    Mon Dec 22 00:32:02 2008 -0800
-@@ -5036,6 +5036,11 @@
+diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
+--- a/sql/mysqld.cc    2009-01-09 15:40:23.000000000 +0900
++++ b/sql/mysqld.cc    2009-01-09 16:01:25.000000000 +0900
+@@ -5036,6 +5036,15 @@
    OPT_INNODB_ROLLBACK_ON_TIMEOUT,
    OPT_SECURE_FILE_PRIV,
    OPT_KEEP_FILES_ON_CREATE,
 +  OPT_INNODB_IO_CAPACITY,
++  OPT_INNODB_IBUF_MAX_SIZE,
++  OPT_INNODB_IBUF_ACTIVE_CONTRACT,
++  OPT_INNODB_IBUF_ACCEL_RATE,
++  OPT_INNODB_FLUSH_NEIGHBOR_PAGES,
 +  OPT_INNODB_READ_AHEAD,
 +  OPT_INNODB_ADAPTIVE_CHECKPOINT,
 +  OPT_INNODB_READ_IO_THREADS,
@@ -420,7 +497,7 @@
    OPT_INNODB_ADAPTIVE_HASH_INDEX,
    OPT_FEDERATED
  };
-@@ -5344,6 +5349,26 @@
+@@ -5344,6 +5353,41 @@
     (gptr*) &global_system_variables.innodb_table_locks,
     (gptr*) &global_system_variables.innodb_table_locks,
     0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
@@ -428,12 +505,27 @@
 +   "Number of IO operations per second the server can do. Tunes background IO 
rate.",
 +   (gptr*) &srv_io_capacity, (gptr*) &srv_io_capacity,
 +   0, GET_ULONG, REQUIRED_ARG, 100, 100, 999999999, 0, 0, 0},
++  {"innodb_ibuf_max_size", OPT_INNODB_IBUF_MAX_SIZE,
++   "The maximum size of the insert buffer. (in bytes)",
++   (gptr*) &srv_ibuf_max_size, (gptr*) &srv_ibuf_max_size, 0,
++   GET_LL, REQUIRED_ARG, LONGLONG_MAX, 0, LONGLONG_MAX, 0, 0, 0},
++  {"innodb_ibuf_active_contract", OPT_INNODB_IBUF_ACTIVE_CONTRACT,
++   "Enable/Disable active_contract of insert buffer. 0:disable 1:enable",
++   (gptr*) &srv_ibuf_active_contract, (gptr*) &srv_ibuf_active_contract,
++   0, GET_ULONG, REQUIRED_ARG, 0, 0, 1, 0, 0, 0},
++  {"innodb_ibuf_accel_rate", OPT_INNODB_IBUF_ACCEL_RATE,
++   "Tunes amount of insert buffer processing of background, in addition to 
innodb_io_capacity. (in percentage)",
++   (gptr*) &srv_ibuf_accel_rate, (gptr*) &srv_ibuf_accel_rate,
++   0, GET_ULONG, REQUIRED_ARG, 100, 100, 999999999, 0, 0, 0},
++  {"innodb_flush_neighbor_pages", OPT_INNODB_FLUSH_NEIGHBOR_PAGES,
++   "Enable/Disable flushing also neighbor pages. 0:disable 1:enable",
++   (gptr*) &srv_flush_neighbor_pages, (gptr*) &srv_flush_neighbor_pages,
++   0, GET_ULONG, REQUIRED_ARG, 1, 0, 1, 0, 0, 0},
 +  {"innodb_read_ahead", OPT_INNODB_READ_AHEAD,
-+   "Enable/Diasable read aheads bit0:random bit1:linear",
-+   (gptr*) &srv_read_ahead, (gptr*) &srv_read_ahead,
-+   0, GET_ULONG, REQUIRED_ARG, 3, 0, 3, 0, 0, 0},
++   "Control read ahead activity. (none, random, linear, [both])",
++   0, 0, 0, GET_ULONG, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 +  {"innodb_adaptive_checkpoint", OPT_INNODB_ADAPTIVE_CHECKPOINT,
-+   "Enable/Diasable flushing along modified age 0:disable 1:enable",
++   "Enable/Diasable flushing along modified age. 0:disable 1:enable",
 +   (gptr*) &srv_adaptive_checkpoint, (gptr*) &srv_adaptive_checkpoint,
 +   0, GET_ULONG, REQUIRED_ARG, 0, 0, 1, 0, 0, 0},
 +  {"innodb_read_io_threads", OPT_INNODB_READ_IO_THREADS,
@@ -447,37 +539,92 @@
  #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 45683461331d sql/set_var.cc
---- a/sql/set_var.cc   Mon Dec 22 00:31:16 2008 -0800
-+++ b/sql/set_var.cc   Mon Dec 22 00:32:02 2008 -0800
-@@ -484,6 +484,12 @@
+@@ -7637,6 +7636,22 @@
+   case OPT_INNODB_LOG_ARCHIVE:
+     innobase_log_archive= argument ? test(atoi(argument)) : 1;
+     break;
++  case OPT_INNODB_READ_AHEAD:
++    if (argument == disabled_my_option)
++      srv_read_ahead = 0;
++    else if (! argument)
++      srv_read_ahead = 3;
++    else
++    {
++      int type;
++      if ((type=find_type(argument, &innodb_read_ahead_typelib, 2)) <= 0)
++      {
++        fprintf(stderr,"Unknown innodb_read_ahead type: %s\n",argument);
++        exit(1);
++      }
++      srv_read_ahead = (uint) ((type - 1) & 3);
++    }
++    break;
+ #endif /* HAVE_INNOBASE_DB */
+   case OPT_MYISAM_RECOVER:
+   {
+diff -ruN a/sql/set_var.cc b/sql/set_var.cc
+--- a/sql/set_var.cc   2009-01-09 15:40:23.000000000 +0900
++++ b/sql/set_var.cc   2009-01-09 16:05:22.000000000 +0900
+@@ -484,6 +484,37 @@
  sys_var_long_ptr  sys_innodb_flush_log_at_trx_commit(
                                          "innodb_flush_log_at_trx_commit",
                                          &srv_flush_log_at_trx_commit);
 +sys_var_long_ptr      sys_innodb_io_capacity("innodb_io_capacity",
 +                                               &srv_io_capacity);
-+sys_var_long_ptr      sys_innodb_read_ahead("innodb_read_ahead",
-+                                              &srv_read_ahead);
++sys_var_long_ptr      
sys_innodb_ibuf_active_contract("innodb_ibuf_active_contract",
++                                                        
&srv_ibuf_active_contract);
++sys_var_long_ptr      sys_innodb_ibuf_accel_rate("innodb_ibuf_accel_rate",
++                                                   &srv_ibuf_accel_rate);
++sys_var_long_ptr      
sys_innodb_flush_neighbor_pages("innodb_flush_neighbor_pages",
++                                                        
&srv_flush_neighbor_pages);
++
++const char *innodb_read_ahead_names[]=
++{
++  "none", /* 0 */
++  "random",
++  "linear",
++  "both", /* 3 */
++  /* For compatibility of the older patch */
++  "0", /* 4 ("none" + 4) */
++  "1",
++  "2",
++  "3", /* 7 ("both" + 4) */
++  NullS
++};
++TYPELIB innodb_read_ahead_typelib=
++{
++  array_elements(innodb_read_ahead_names) - 1, "innodb_read_ahead_typelib",
++  innodb_read_ahead_names, NULL
++};
++sys_var_enum  sys_innodb_read_ahead("innodb_read_ahead", &srv_read_ahead,
++                                      &innodb_read_ahead_typelib, 
fix_innodb_read_ahead);
 +sys_var_long_ptr      
sys_innodb_adaptive_checkpoint("innodb_adaptive_checkpoint",
 +                                                      
&srv_adaptive_checkpoint);
  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", 
-@@ -847,6 +853,9 @@
+@@ -847,6 +859,12 @@
    &sys_innodb_thread_concurrency,
    &sys_innodb_commit_concurrency,
    &sys_innodb_flush_log_at_trx_commit,
 +  &sys_innodb_io_capacity,
++  &sys_innodb_ibuf_active_contract,
++  &sys_innodb_ibuf_accel_rate,
++  &sys_innodb_flush_neighbor_pages,
 +  &sys_innodb_read_ahead,
 +  &sys_innodb_adaptive_checkpoint,
  #endif
    &sys_trust_routine_creators,
    &sys_trust_function_creators,
-@@ -982,6 +991,11 @@
+@@ -982,6 +1000,15 @@
    {sys_innodb_table_locks.name, (char*) &sys_innodb_table_locks, SHOW_SYS},
    {sys_innodb_thread_concurrency.name, (char*) 
&sys_innodb_thread_concurrency, SHOW_SYS},
    {sys_innodb_thread_sleep_delay.name, (char*) 
&sys_innodb_thread_sleep_delay, SHOW_SYS},
 +  {sys_innodb_io_capacity.name, (char*) &sys_innodb_io_capacity, SHOW_SYS},
++  {"innodb_ibuf_max_size", (char*) &srv_ibuf_max_size, SHOW_LONGLONG},
++  {sys_innodb_ibuf_active_contract.name, (char*) 
&sys_innodb_ibuf_active_contract, SHOW_SYS},
++  {sys_innodb_ibuf_accel_rate.name, (char*) &sys_innodb_ibuf_accel_rate, 
SHOW_SYS},
++  {sys_innodb_flush_neighbor_pages.name, (char*) 
&sys_innodb_flush_neighbor_pages, SHOW_SYS},
 +  {sys_innodb_read_ahead.name, (char*) &sys_innodb_read_ahead, SHOW_SYS},
 +  {sys_innodb_adaptive_checkpoint.name, (char*) 
&sys_innodb_adaptive_checkpoint, SHOW_SYS},
 +  {"innodb_read_io_threads", (char*) &innobase_read_io_threads, SHOW_LONG},
@@ -485,3 +632,41 @@
  #endif
    {sys_interactive_timeout.name,(char*) &sys_interactive_timeout,   SHOW_SYS},
    {sys_join_buffer_size.name,   (char*) &sys_join_buffer_size,            
SHOW_SYS},
+@@ -1482,6 +1501,13 @@
+   }
+ }
+
++#ifdef HAVE_INNOBASE_DB
++extern void fix_innodb_read_ahead(THD *thd, enum_var_type type)
++{
++  srv_read_ahead &= 3;
++}
++#endif /* HAVE_INNOBASE_DB */
++
+ static void fix_max_binlog_size(THD *thd, enum_var_type type)
+ {
+   DBUG_ENTER("fix_max_binlog_size");
+diff -ruN a/sql/set_var.h b/sql/set_var.h
+--- a/sql/set_var.h    2009-01-12 11:20:31.000000000 +0900
++++ b/sql/set_var.h    2009-01-12 15:26:35.000000000 +0900
+@@ -31,6 +31,10 @@
+
+ extern TYPELIB bool_typelib, delay_key_write_typelib, sql_mode_typelib;
+
++#ifdef HAVE_INNOBASE_DB
++extern TYPELIB innodb_read_ahead_typelib;
++#endif /* HAVE_INNOBASE_DB */
++
+ typedef int (*sys_check_func)(THD *,  set_var *);
+ typedef bool (*sys_update_func)(THD *, set_var *);
+ typedef void (*sys_after_update_func)(THD *,enum_var_type);
+@@ -1114,6 +1118,9 @@
+ int sql_set_variables(THD *thd, List<set_var_base> *var_list);
+ bool not_all_support_one_shot(List<set_var_base> *var_list);
+ void fix_delay_key_write(THD *thd, enum_var_type type);
++#ifdef HAVE_INNOBASE_DB
++void fix_innodb_read_ahead(THD *thd, enum_var_type type);
++#endif /* HAVE_INNOBASE_DB */
+ ulong fix_sql_mode(ulong sql_mode);
+ extern sys_var_const_str sys_charset_system;
+ extern sys_var_str sys_init_connect;

================================================================
Index: SOURCES/mysql-innodb_locks_held.patch
diff -u SOURCES/mysql-innodb_locks_held.patch:1.1.2.1 
SOURCES/mysql-innodb_locks_held.patch:1.1.2.2
--- SOURCES/mysql-innodb_locks_held.patch:1.1.2.1       Fri Jan  9 12:04:52 2009
+++ SOURCES/mysql-innodb_locks_held.patch       Tue Feb  3 17:46:09 2009
@@ -62,6 +62,57 @@
  
  byte  srv_latin1_ordering[256]        /* The sort order table of the latin1
                                        character set. The following table is
+@@ -1694,24 +1696,6 @@
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-innodb_io_patches.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.1&r2=1.1.2.2&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-microsec_process.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.3&r2=1.1.2.4&f=u
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mysql-userstatv2.patch?r1=1.1.2.3&r2=1.1.2.4&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to