]> git.pld-linux.org Git - packages/mysql.git/commitdiff
- up to 5.5.10 auto/th/mysql-5_5_10-1
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Thu, 31 Mar 2011 16:54:15 +0000 (16:54 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    control_online_alter_index.patch -> 1.3
    innodb_adaptive_hash_index_partitions.patch -> 1.4
    innodb_admin_command_base.patch -> 1.3
    innodb_buffer_pool_pages_i_s.patch -> 1.4
    innodb_buffer_pool_shm.patch -> 1.4
    innodb_deadlock_count.patch -> 1.4
    innodb_dict_size_limit.patch -> 1.3
    innodb_expand_import.patch -> 1.4
    innodb_extend_slow.patch -> 1.3
    innodb_extra_rseg.patch -> 1.3
    innodb_fast_checksum.patch -> 1.4
    innodb_files_extend.patch -> 1.4
    innodb_fix_misc.patch -> 1.4
    innodb_io_patches.patch -> 1.3
    innodb_lru_dump_restore.patch -> 1.4
    innodb_opt_lru_count.patch -> 1.3
    innodb_overwrite_relay_log_info.patch -> 1.4
    innodb_pass_corrupt_table.patch -> 1.4
    innodb_recovery_patches.patch -> 1.4
    innodb_separate_doublewrite.patch -> 1.4
    innodb_show_lock_name.patch -> 1.3
    innodb_show_status.patch -> 1.3
    innodb_show_status_extend.patch -> 1.4
    innodb_show_sys_tables.patch -> 1.3
    innodb_split_buf_pool_mutex.patch -> 1.3
    innodb_stats.patch -> 1.4
    innodb_thread_concurrency_timer_based.patch -> 1.3
    log_connection_error.patch -> 1.3
    log_warnings_suppress.patch -> 1.2
    microsec_process.patch -> 1.3
    mysql.spec -> 1.545
    mysql_remove_eol_carret.patch -> 1.2
    mysql_syslog.patch -> 1.3
    optimizer_fix.patch -> 1.3
    processlist_row_stats.patch -> 1.1
    query_cache_enhance.patch -> 1.4
    response_time_distribution.patch -> 1.3
    show_slave_status_nolock.patch -> 1.3
    show_temp.patch -> 1.3
    slow_extended.patch -> 1.4
    sql_no_fcache.patch -> 1.3
    userstat.patch -> 1.4

42 files changed:
control_online_alter_index.patch
innodb_adaptive_hash_index_partitions.patch
innodb_admin_command_base.patch
innodb_buffer_pool_pages_i_s.patch
innodb_buffer_pool_shm.patch
innodb_deadlock_count.patch
innodb_dict_size_limit.patch
innodb_expand_import.patch
innodb_extend_slow.patch
innodb_extra_rseg.patch
innodb_fast_checksum.patch
innodb_files_extend.patch
innodb_fix_misc.patch
innodb_io_patches.patch
innodb_lru_dump_restore.patch
innodb_opt_lru_count.patch
innodb_overwrite_relay_log_info.patch
innodb_pass_corrupt_table.patch
innodb_recovery_patches.patch
innodb_separate_doublewrite.patch
innodb_show_lock_name.patch
innodb_show_status.patch
innodb_show_status_extend.patch
innodb_show_sys_tables.patch
innodb_split_buf_pool_mutex.patch
innodb_stats.patch
innodb_thread_concurrency_timer_based.patch
log_connection_error.patch
log_warnings_suppress.patch
microsec_process.patch
mysql.spec
mysql_remove_eol_carret.patch
mysql_syslog.patch
optimizer_fix.patch
processlist_row_stats.patch [new file with mode: 0644]
query_cache_enhance.patch
response_time_distribution.patch
show_slave_status_nolock.patch
show_temp.patch
slow_extended.patch
sql_no_fcache.patch
userstat.patch

index 4ec210914e396ec0288d88251e8b524a185d93aa..794bc418144a854e8b04615044e3d26ed4632ebd 100644 (file)
@@ -8,23 +8,12 @@
 diff -ruN a/sql/handler.h b/sql/handler.h
 --- a/sql/handler.h    2010-11-03 07:01:14.000000000 +0900
 +++ b/sql/handler.h    2010-12-03 13:51:04.727293058 +0900
-@@ -194,6 +194,19 @@
- #define HA_ONLINE_DROP_UNIQUE_INDEX             (1L << 9) /*drop uniq. online*/
- #define HA_ONLINE_ADD_PK_INDEX                  (1L << 10)/*add prim. online*/
- #define HA_ONLINE_DROP_PK_INDEX                 (1L << 11)/*drop prim. online*/
+@@ -197,6 +197,8 @@
+ #define HA_INPLACE_DROP_UNIQUE_INDEX_NO_WRITE      (1L << 9)
+ #define HA_INPLACE_ADD_PK_INDEX_NO_WRITE           (1L << 10)
+ #define HA_INPLACE_DROP_PK_INDEX_NO_WRITE          (1L << 11)
 +
-+#define HA_ONLINE_ALTER_INDEX_MASK    (HA_ONLINE_ADD_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_DROP_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_ADD_UNIQUE_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_DROP_UNIQUE_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_ADD_PK_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_DROP_PK_INDEX_NO_WRITES \
-+                                              | HA_ONLINE_ADD_INDEX \
-+                                              | HA_ONLINE_DROP_INDEX \
-+                                              | HA_ONLINE_ADD_UNIQUE_INDEX \
-+                                              | HA_ONLINE_DROP_UNIQUE_INDEX \
-+                                              | HA_ONLINE_ADD_PK_INDEX \
-+                                              | HA_ONLINE_DROP_PK_INDEX)
++#define HA_INPLACE_ALTER_INDEX_MASK                ((1L << 12) - 1)
  /*
    HA_PARTITION_FUNCTION_SUPPORTED indicates that the function is
    supported at all.
@@ -51,7 +40,7 @@ diff -ruN a/sql/sql_partition.cc b/sql/sql_partition.cc
 +    flags= new_table->file->alter_table_flags(alter_info->flags);
 +    if (!thd->variables.online_alter_index)
 +    {
-+      flags&= ~((uint)HA_ONLINE_ALTER_INDEX_MASK);
++      flags&= ~((uint)HA_INPLACE_ALTER_INDEX_MASK);
 +    }
 +    if (!flags)
      {
@@ -66,7 +55,7 @@ diff -ruN a/sql/sql_table.cc b/sql/sql_table.cc
      alter_flags= table->file->alter_table_flags(alter_info->flags);
 +    if (!thd->variables.online_alter_index)
 +    {
-+      alter_flags&= ~((ulong)HA_ONLINE_ALTER_INDEX_MASK);
++      alter_flags&= ~((ulong)HA_INPLACE_ALTER_INDEX_MASK);
 +    }
      DBUG_PRINT("info", ("alter_flags: %lu", alter_flags));
      /* Check dropped indexes. */
index 67cc64093fc6f714cf63ab578dd6fd784f9386f0..dcbed93e75a1a8c511e55ac987770e078bcb074b 100644 (file)
@@ -83,7 +83,7 @@ diff -ruN a/storage/innobase/btr/btr0btr.c b/storage/innobase/btr/btr0btr.c
 diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
 --- a/storage/innobase/btr/btr0cur.c   2010-12-04 15:52:23.359513820 +0900
 +++ b/storage/innobase/btr/btr0cur.c   2010-12-04 16:12:48.643551837 +0900
-@@ -486,7 +486,7 @@
+@@ -498,7 +498,7 @@
  #ifdef UNIV_SEARCH_PERF_STAT
        info->n_searches++;
  #endif
@@ -92,7 +92,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
            && latch_mode <= BTR_MODIFY_LEAF
            && info->last_hash_succ
            && !estimate
-@@ -522,7 +522,7 @@
+@@ -534,7 +534,7 @@
  
        if (has_search_latch) {
                /* Release possible search latch to obey latching order */
@@ -101,7 +101,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        }
  
        /* Store the position of the tree latch we push to mtr so that we
-@@ -844,7 +844,7 @@
+@@ -856,7 +856,7 @@
  
        if (has_search_latch) {
  
@@ -110,7 +110,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        }
  }
  
-@@ -2060,7 +2060,7 @@
+@@ -1971,7 +1971,7 @@
                        btr_search_update_hash_on_delete(cursor);
                }
  
@@ -119,7 +119,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        }
  
        if (!(flags & BTR_KEEP_SYS_FLAG)) {
-@@ -2074,7 +2074,7 @@
+@@ -1985,7 +1985,7 @@
        row_upd_rec_in_place(rec, index, offsets, update, page_zip);
  
        if (block->is_hashed) {
@@ -128,7 +128,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        }
  
        if (page_zip && !dict_index_is_clust(index)
-@@ -2852,7 +2852,7 @@
+@@ -2763,7 +2763,7 @@
        }
  
        if (block->is_hashed) {
@@ -137,7 +137,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        }
  
        page_zip = buf_block_get_page_zip(block);
-@@ -2867,7 +2867,7 @@
+@@ -2778,7 +2778,7 @@
        }
  
        if (block->is_hashed) {
@@ -146,7 +146,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        }
  
        btr_cur_del_mark_set_clust_rec_log(flags, rec, index, val, trx,
-@@ -2994,13 +2994,13 @@
+@@ -2905,13 +2905,13 @@
              == dict_table_is_comp(cursor->index->table));
  
        if (block->is_hashed) {
@@ -211,7 +211,7 @@ diff -ruN a/storage/innobase/btr/btr0sea.c b/storage/innobase/btr/btr0sea.c
  
 @@ -153,7 +158,7 @@
        if (heap->free_block == NULL) {
-               buf_block_t*    block = buf_block_alloc(NULL, 0);
+               buf_block_t*    block = buf_block_alloc(NULL);
  
 -              rw_lock_x_lock(&btr_search_latch);
 +              rw_lock_x_lock(btr_search_get_latch(key));
@@ -1006,7 +1006,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  #endif /* UNIV_SYNC_DEBUG */
        ut_ad(!btr_search_enabled);
  
-@@ -2635,6 +2640,7 @@
+@@ -2636,6 +2641,7 @@
  {
        block->check_index_page_at_flush = FALSE;
        block->index            = NULL;
@@ -1017,7 +1017,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
 diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
 --- a/storage/innobase/buf/buf0lru.c   2010-12-04 15:35:29.137347521 +0900
 +++ b/storage/innobase/buf/buf0lru.c   2010-12-04 16:12:48.658550840 +0900
-@@ -1810,7 +1810,7 @@
+@@ -1776,7 +1776,7 @@
  
                UNIV_MEM_VALID(((buf_block_t*) bpage)->frame,
                               UNIV_PAGE_SIZE);
@@ -1029,7 +1029,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
 diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c
 --- a/storage/innobase/dict/dict0dict.c        2010-12-04 15:52:23.398513916 +0900
 +++ b/storage/innobase/dict/dict0dict.c        2010-12-04 16:12:48.662550715 +0900
-@@ -1806,7 +1806,7 @@
+@@ -1812,7 +1812,7 @@
        zero. */
  
        for (;;) {
@@ -1054,7 +1054,7 @@ diff -ruN a/storage/innobase/ha/ha0ha.c b/storage/innobase/ha/ha0ha.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-04 16:12:20.185850734 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-04 16:12:48.674552412 +0900
-@@ -11617,6 +11617,11 @@
+@@ -11671,6 +11671,11 @@
    "Disable with --skip-innodb-adaptive-hash-index.",
    NULL, innodb_adaptive_hash_index_update, TRUE);
  
@@ -1066,14 +1066,14 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_ULONG(replication_delay, srv_replication_delay,
    PLUGIN_VAR_RQCMDARG,
    "Replication thread delay (ms) on the slave server if "
-@@ -11981,6 +11986,7 @@
+@@ -12041,6 +12046,7 @@
    MYSQL_SYSVAR(use_sys_stats_table),
    MYSQL_SYSVAR(stats_sample_pages),
    MYSQL_SYSVAR(adaptive_hash_index),
 +  MYSQL_SYSVAR(adaptive_hash_index_partitions),
+   MYSQL_SYSVAR(stats_method),
    MYSQL_SYSVAR(replication_delay),
    MYSQL_SYSVAR(status_file),
-   MYSQL_SYSVAR(strict_mode),
 diff -ruN a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h
 --- a/storage/innobase/include/btr0sea.h       2010-12-03 15:48:03.070987226 +0900
 +++ b/storage/innobase/include/btr0sea.h       2010-12-04 16:12:48.707551382 +0900
@@ -1318,7 +1318,7 @@ diff -ruN a/storage/innobase/page/page0zip.c b/storage/innobase/page/page0zip.c
 @@ -4445,7 +4445,7 @@
  
  #ifndef UNIV_HOTBACKUP
-       temp_block = buf_block_alloc(buf_pool, 0);
+       temp_block = buf_block_alloc(buf_pool);
 -      btr_search_drop_page_hash_index(block);
 +      btr_search_drop_page_hash_index(block, index);
        block->check_index_page_at_flush = TRUE;
@@ -1469,7 +1469,7 @@ diff -ruN a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-04 16:12:20.231484679 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-04 16:12:48.726551018 +0900
-@@ -2044,7 +2044,9 @@
+@@ -2048,7 +2048,9 @@
              "-------------------------------------\n", file);
        ibuf_print(file);
  
@@ -1480,7 +1480,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
        fprintf(file,
                "%.2f hash searches/s, %.2f non-hash searches/s\n",
-@@ -2069,14 +2071,15 @@
+@@ -2073,14 +2075,15 @@
                        ut_total_allocated_memory,
                        mem_pool_get_reserved(mem_comm_pool));
        /* Calcurate reserved memories */
@@ -1500,7 +1500,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
        lock_sys_subtotal = 0;
        if (trx_sys) {
-@@ -2103,10 +2106,10 @@
+@@ -2107,10 +2110,10 @@
                        "    Threads             %lu \t(%lu + %lu)\n",
  
                        (ulong) (btr_search_sys
@@ -1516,7 +1516,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
 --- a/storage/innobase/sync/sync0sync.c        2010-12-03 17:36:44.300986571 +0900
 +++ b/storage/innobase/sync/sync0sync.c        2010-12-04 16:12:48.729513564 +0900
-@@ -1184,7 +1184,6 @@
+@@ -1177,7 +1177,6 @@
        case SYNC_OUTER_ANY_LATCH:
        case SYNC_FILE_FORMAT_TAG:
        case SYNC_DOUBLEWRITE:
@@ -1524,7 +1524,7 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
        case SYNC_SEARCH_SYS_CONF:
        case SYNC_TRX_LOCK_HEAP:
        case SYNC_KERNEL:
-@@ -1205,6 +1204,7 @@
+@@ -1198,6 +1197,7 @@
                        ut_error;
                }
                break;
index a8fa2f4a9491e3a796ef3c7f15826fcca35c7906..3bc40345850c628a4e7fbbf744727d1740429b50 100644 (file)
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 17:32:15.624039043 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 17:32:35.424957827 +0900
-@@ -11772,7 +11772,8 @@
+@@ -11833,7 +11833,8 @@
  i_s_innodb_sys_foreign_cols,
  i_s_innodb_sys_stats,
  i_s_innodb_table_stats,
index e3fa085a68c8f078fd55e74cb3faff1567a74afd..2059e51ff8fba2f9d191367a1b270dc9078feff6 100644 (file)
@@ -48,7 +48,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-04 20:20:44.614551139 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-06 19:23:47.622195800 +0900
-@@ -12060,6 +12060,9 @@
+@@ -12121,6 +12121,9 @@
  i_s_innodb_sys_stats,
  i_s_innodb_table_stats,
  i_s_innodb_index_stats,
index 8efacadab15d52a53b932f1cc3340eab6a9da85e..088672f71a863f01fc58f686e5055a86aa359282 100644 (file)
@@ -742,7 +742,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  
  static char*  internal_innobase_data_file_path        = NULL;
-@@ -2624,6 +2625,14 @@
+@@ -2643,6 +2644,14 @@
        srv_buf_pool_size = (ulint) innobase_buffer_pool_size;
        srv_buf_pool_instances = (ulint) innobase_buffer_pool_instances;
  
@@ -757,7 +757,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        srv_mem_pool_size = (ulint) innobase_additional_mem_pool_size;
  
        srv_n_file_io_threads = (ulint) innobase_file_io_threads;
-@@ -2640,6 +2649,7 @@
+@@ -2659,6 +2668,7 @@
        srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
        srv_use_checksums = (ibool) innobase_use_checksums;
        srv_fast_checksum = (ibool) innobase_fast_checksum;
@@ -765,7 +765,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  #ifdef HAVE_LARGE_PAGES
          if ((os_use_large_pages = (ibool) my_use_large_pages))
-@@ -11648,6 +11658,16 @@
+@@ -11702,6 +11712,16 @@
    "Number of buffer pool instances, set to higher value on high-end machines to increase scalability",
    NULL, NULL, 1L, 1L, MAX_BUFFER_POOLS, 1L);
  
@@ -782,7 +782,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_ULONG(commit_concurrency, innobase_commit_concurrency,
    PLUGIN_VAR_RQCMDARG,
    "Helps in performance tuning in heavily concurrent environments.",
-@@ -11939,6 +11959,8 @@
+@@ -12000,6 +12020,8 @@
    MYSQL_SYSVAR(autoextend_increment),
    MYSQL_SYSVAR(buffer_pool_size),
    MYSQL_SYSVAR(buffer_pool_instances),
@@ -1219,7 +1219,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
 --- a/storage/innobase/srv/srv0start.c 2010-12-04 20:19:29.806482628 +0900
 +++ b/storage/innobase/srv/srv0start.c 2010-12-07 16:10:14.964785346 +0900
-@@ -1835,6 +1835,8 @@
+@@ -1838,6 +1838,8 @@
                Note that this is not as heavy weight as it seems. At
                this point there will be only ONE page in the buf_LRU
                and there must be no page in the buf_flush list. */
index 6a8864968052898a594c7b109c07237349605101..cc1a6c0805f17222dac4364cc7b69b3c86dc728e 100644 (file)
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-04 16:09:53.145500265 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-04 16:10:24.605515894 +0900
-@@ -668,6 +668,8 @@
+@@ -687,6 +687,8 @@
    (char*) &export_vars.innodb_dblwr_pages_written,      SHOW_LONG},
    {"dblwr_writes",
    (char*) &export_vars.innodb_dblwr_writes,             SHOW_LONG},
@@ -31,7 +31,7 @@ diff -ruN a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2010-12-04 15:55:21.378480843 +0900
 +++ b/storage/innobase/include/srv0srv.h       2010-12-04 16:10:24.606550983 +0900
-@@ -760,6 +760,7 @@
+@@ -774,6 +774,7 @@
        ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/
        ulint innodb_dblwr_pages_written;       /*!< srv_dblwr_pages_written */
        ulint innodb_dblwr_writes;              /*!< srv_dblwr_writes */
@@ -53,7 +53,7 @@ diff -ruN a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-04 15:57:13.069513371 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-04 16:10:24.610593039 +0900
-@@ -469,6 +469,7 @@
+@@ -473,6 +473,7 @@
  static ulint  srv_n_rows_deleted_old          = 0;
  static ulint  srv_n_rows_read_old             = 0;
  
@@ -61,7 +61,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  UNIV_INTERN ulint             srv_n_lock_wait_count           = 0;
  UNIV_INTERN ulint             srv_n_lock_wait_current_count   = 0;
  UNIV_INTERN ib_int64_t        srv_n_lock_wait_time            = 0;
-@@ -2287,6 +2288,7 @@
+@@ -2291,6 +2292,7 @@
        export_vars.innodb_buffer_pool_pages_data = LRU_len;
        export_vars.innodb_buffer_pool_pages_dirty = flush_list_len;
        export_vars.innodb_buffer_pool_pages_free = free_len;
index c1ccf99eb6395bae3cefbcefc46f3a03ba4b9cd1..99c26095a292a6406c8d297bd29c9a69311af18c 100644 (file)
@@ -360,7 +360,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
  /****************************************************************//**
  If the given column name is reserved for InnoDB system columns, return
  TRUE.
-@@ -1723,6 +1785,11 @@
+@@ -1729,6 +1791,11 @@
        ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
        ut_ad(mutex_own(&(dict_sys->mutex)));
  
@@ -375,7 +375,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:43:57.294986852 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:45:47.534959966 +0900
-@@ -656,6 +656,8 @@
+@@ -675,6 +675,8 @@
    (char*) &export_vars.innodb_dblwr_pages_written,      SHOW_LONG},
    {"dblwr_writes",
    (char*) &export_vars.innodb_dblwr_writes,             SHOW_LONG},
@@ -384,7 +384,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    {"have_atomic_builtins",
    (char*) &export_vars.innodb_have_atomic_builtins,     SHOW_BOOL},
    {"log_waits",
-@@ -11536,6 +11538,11 @@
+@@ -11616,6 +11618,11 @@
    "Number of extra user rollback segments which are used in a round-robin fashion.",
    NULL, NULL, 127, 0, 127, 0);
  
@@ -396,7 +396,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(additional_mem_pool_size),
    MYSQL_SYSVAR(autoextend_increment),
-@@ -11603,6 +11610,7 @@
+@@ -11684,6 +11691,7 @@
    MYSQL_SYSVAR(read_ahead),
    MYSQL_SYSVAR(adaptive_flushing_method),
    MYSQL_SYSVAR(extra_rsegments),
@@ -500,7 +500,7 @@ diff -ruN a/storage/innobase/include/dict0dict.ic b/storage/innobase/include/dic
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2010-12-03 15:43:57.297067100 +0900
 +++ b/storage/innobase/include/srv0srv.h       2010-12-03 15:45:47.562024404 +0900
-@@ -228,7 +228,7 @@
+@@ -233,7 +233,7 @@
  extern ulint  srv_adaptive_flushing_method;
  
  extern ulint  srv_extra_rsegments;
@@ -509,7 +509,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  /*-------------------------------------------*/
  
  extern ulint  srv_n_rows_inserted;
-@@ -708,6 +708,7 @@
+@@ -726,6 +726,7 @@
        ulint innodb_data_writes;               /*!< I/O write requests */
        ulint innodb_data_written;              /*!< Data bytes written */
        ulint innodb_data_reads;                /*!< I/O read requests */
@@ -520,7 +520,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-03 15:43:57.301024390 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-03 15:45:47.565023830 +0900
-@@ -416,6 +416,7 @@
+@@ -421,6 +421,7 @@
  UNIV_INTERN ulint     srv_adaptive_flushing_method = 0; /* 0: native  1: estimate  2: keep_average */
  
  UNIV_INTERN ulint     srv_extra_rsegments = 127; /* extra rseg for users */
@@ -528,7 +528,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  /*-------------------------------------------*/
  UNIV_INTERN ulong     srv_n_spin_wait_rounds  = 30;
  UNIV_INTERN ulong     srv_n_free_tickets_to_enter = 500;
-@@ -2226,6 +2227,7 @@
+@@ -2231,6 +2232,7 @@
        export_vars.innodb_data_reads = os_n_file_reads;
        export_vars.innodb_data_writes = os_n_file_writes;
        export_vars.innodb_data_written = srv_data_written;
index 2d7a12c1958f66fbab521add2305601fa4753464..69f42086a991190d2f9a68cbc36931ea04aa03e8 100644 (file)
@@ -500,7 +500,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:49:59.195023983 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:52:23.555957062 +0900
-@@ -7337,6 +7337,14 @@
+@@ -7356,6 +7356,14 @@
                err = row_discard_tablespace_for_mysql(dict_table->name, trx);
        } else {
                err = row_import_tablespace_for_mysql(dict_table->name, trx);
@@ -515,7 +515,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        }
  
        err = convert_error_code_to_mysql(err, dict_table->flags, NULL);
-@@ -11538,6 +11546,11 @@
+@@ -11618,6 +11626,11 @@
    "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)",
    NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib);
  
@@ -527,7 +527,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_ULONG(extra_rsegments, srv_extra_rsegments,
    PLUGIN_VAR_RQCMDARG,
    "Number of extra user rollback segments which are used in a round-robin fashion.",
-@@ -11614,6 +11627,7 @@
+@@ -11695,6 +11708,7 @@
    MYSQL_SYSVAR(flush_neighbor_pages),
    MYSQL_SYSVAR(read_ahead),
    MYSQL_SYSVAR(adaptive_flushing_method),
@@ -538,7 +538,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2010-12-03 15:48:03.077954270 +0900
 +++ b/storage/innobase/include/srv0srv.h       2010-12-03 15:52:23.561986996 +0900
-@@ -227,6 +227,8 @@
+@@ -232,6 +232,8 @@
  extern ulint  srv_read_ahead;
  extern ulint  srv_adaptive_flushing_method;
  
@@ -550,7 +550,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-03 15:49:59.230956118 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-03 15:52:23.562954411 +0900
-@@ -415,6 +415,8 @@
+@@ -420,6 +420,8 @@
  UNIV_INTERN ulint     srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
  UNIV_INTERN ulint     srv_adaptive_flushing_method = 0; /* 0: native  1: estimate  2: keep_average */
  
index ac655a0b6352b823c5ba5f9f09b1a03cf623486a..be09a5b8870e3421c260f9c0bb890aae9825a7e0 100644 (file)
@@ -49,7 +49,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
  /*
                IMPLEMENTATION OF THE BUFFER POOL
-@@ -2397,11 +2431,19 @@
+@@ -2399,11 +2433,19 @@
        mutex_t*        block_mutex;
        ibool           must_read;
        unsigned        access_time;
@@ -69,7 +69,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        buf_pool->stat.n_page_gets++;
  
        for (;;) {
-@@ -2419,7 +2461,7 @@
+@@ -2421,7 +2463,7 @@
                //buf_pool_mutex_exit(buf_pool);
                rw_lock_s_unlock(&buf_pool->page_hash_latch);
  
@@ -78,7 +78,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
  #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
                ut_a(++buf_dbg_counter % 37 || buf_validate());
-@@ -2497,6 +2539,13 @@
+@@ -2498,6 +2540,13 @@
                /* Let us wait until the read operation
                completes */
  
@@ -92,7 +92,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                for (;;) {
                        enum buf_io_fix io_fix;
  
-@@ -2511,6 +2560,12 @@
+@@ -2512,6 +2561,12 @@
                                break;
                        }
                }
@@ -105,7 +105,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        }
  
  #ifdef UNIV_IBUF_COUNT_DEBUG
-@@ -2823,6 +2878,11 @@
+@@ -2824,6 +2879,11 @@
        ibool           must_read;
        ulint           retries = 0;
        mutex_t*        block_mutex = NULL;
@@ -117,7 +117,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        buf_pool_t*     buf_pool = buf_pool_get(space, offset);
  
        ut_ad(mtr);
-@@ -2841,6 +2901,9 @@
+@@ -2842,6 +2902,9 @@
        ut_ad(!ibuf_inside() || ibuf_page_low(space, zip_size, offset,
                                              FALSE, file, line, NULL));
  #endif
@@ -127,7 +127,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        buf_pool->stat.n_page_gets++;
        fold = buf_page_address_fold(space, offset);
  loop:
-@@ -2914,7 +2977,7 @@
+@@ -2915,7 +2978,7 @@
                        return(NULL);
                }
  
@@ -191,7 +191,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        ut_ad(block);
        ut_ad(mtr);
 @@ -3363,13 +3444,17 @@
- #ifdef UNIV_DEBUG_FILE_ACCESSES
+ #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
        ut_a(block->page.file_page_was_freed == FALSE);
  #endif
 +      if (innobase_get_slow_log()) {
@@ -379,7 +379,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 17:36:44.293955189 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 17:42:42.090024586 +0900
-@@ -1527,6 +1527,16 @@
+@@ -1546,6 +1546,16 @@
        trx->check_unique_secondary = !thd_test_options(
                thd, OPTION_RELAXED_UNIQUE_CHECKS);
  
@@ -396,7 +396,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        DBUG_VOID_RETURN;
  }
  
-@@ -1581,6 +1591,32 @@
+@@ -1600,6 +1610,32 @@
        return(trx);
  }
  
@@ -429,7 +429,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  /*********************************************************************//**
  Note that a transaction has been registered with MySQL.
  @return true if transaction is registered with MySQL 2PC coordinator */
-@@ -9207,6 +9243,25 @@
+@@ -9280,6 +9316,25 @@
        statement has ended */
  
        if (trx->n_mysql_tables_in_use == 0) {
@@ -872,7 +872,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  /* This is set to the MySQL server value for this variable.  It is only
  needed for FOREIGN KEY definition parsing since FOREIGN KEY names are not
  stored in the server metadata. The server stores and enforces it for
-@@ -1253,6 +1256,10 @@
+@@ -1257,6 +1260,10 @@
        ibool                   has_slept = FALSE;
        srv_conc_slot_t*        slot      = NULL;
        ulint                   i;
@@ -883,7 +883,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
        if (trx->mysql_thd != NULL
            && thd_is_replication_slave_thread(trx->mysql_thd)) {
-@@ -1329,6 +1336,7 @@
+@@ -1333,6 +1340,7 @@
                switches. */
                if (SRV_THREAD_SLEEP_DELAY > 0) {
                        os_thread_sleep(SRV_THREAD_SLEEP_DELAY);
@@ -891,7 +891,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
                }
  
                trx->op_info = "";
-@@ -1384,6 +1392,13 @@
+@@ -1388,6 +1396,13 @@
        /* Go to wait for the event; when a thread leaves InnoDB it will
        release this thread */
  
@@ -905,7 +905,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        trx->op_info = "waiting in InnoDB queue";
  
        thd_wait_begin(trx->mysql_thd, THD_WAIT_ROW_TABLE_LOCK);
-@@ -1392,6 +1407,12 @@
+@@ -1396,6 +1411,12 @@
  
        trx->op_info = "";
  
index 03d728a754beb6b6994a4ec10b40d8a2b8fe036c..966baff27397bb61fab1e19e0e1e7a5c5feb420f 100644 (file)
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:18:48.879955903 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:22:53.779955671 +0900
-@@ -11323,6 +11323,11 @@
+@@ -11403,6 +11403,11 @@
    "Choose method of innodb_adaptive_flushing. (native, [estimate], keep_average)",
    NULL, innodb_adaptive_flushing_method_update, 1, &adaptive_flushing_method_typelib);
  
@@ -20,7 +20,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(additional_mem_pool_size),
    MYSQL_SYSVAR(autoextend_increment),
-@@ -11387,6 +11392,7 @@
+@@ -11468,6 +11473,7 @@
    MYSQL_SYSVAR(flush_neighbor_pages),
    MYSQL_SYSVAR(read_ahead),
    MYSQL_SYSVAR(adaptive_flushing_method),
@@ -28,7 +28,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    MYSQL_SYSVAR(use_sys_malloc),
    MYSQL_SYSVAR(use_native_aio),
    MYSQL_SYSVAR(change_buffering),
-@@ -11415,6 +11421,7 @@
+@@ -11496,6 +11502,7 @@
    innobase_system_variables, /* system variables */
    NULL /* reserved */
  },
@@ -228,7 +228,7 @@ diff -ruN a/storage/innobase/handler/i_s.h b/storage/innobase/handler/i_s.h
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2010-12-03 15:18:48.894029379 +0900
 +++ b/storage/innobase/include/srv0srv.h       2010-12-03 15:22:53.786986025 +0900
-@@ -225,6 +225,8 @@
+@@ -230,6 +230,8 @@
  extern ulint  srv_read_ahead;
  extern ulint  srv_adaptive_flushing_method;
  
@@ -240,7 +240,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-03 15:18:48.913956140 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-03 15:22:53.789987037 +0900
-@@ -413,6 +413,8 @@
+@@ -418,6 +418,8 @@
  UNIV_INTERN ulint     srv_enable_unsafe_group_commit = 0; /* 0:disable 1:enable */
  UNIV_INTERN ulint     srv_read_ahead = 3; /* 1: random  2: linear  3: Both */
  UNIV_INTERN ulint     srv_adaptive_flushing_method = 0; /* 0: native  1: estimate  2: keep_average */
index a7b7f76b4bfa941dae77a850cd8bfb4e5a5791b0..432267e472d01746d66a7dfcd2ea2ee81ea0cd9a 100644 (file)
@@ -170,7 +170,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static my_bool        innobase_recovery_stats                 = TRUE;
  static my_bool        innobase_locks_unsafe_for_binlog        = FALSE;
  static my_bool        innobase_overwrite_relay_log_info       = FALSE;
-@@ -2574,6 +2575,7 @@
+@@ -2593,6 +2594,7 @@
  
        srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
        srv_use_checksums = (ibool) innobase_use_checksums;
@@ -178,7 +178,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  #ifdef HAVE_LARGE_PAGES
          if ((os_use_large_pages = (ibool) my_use_large_pages))
-@@ -11324,6 +11326,15 @@
+@@ -11397,6 +11399,15 @@
    "Disable with --skip-innodb-checksums.",
    NULL, NULL, TRUE);
  
@@ -194,7 +194,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
    PLUGIN_VAR_READONLY,
    "The common part for InnoDB table spaces.",
-@@ -11842,6 +11853,7 @@
+@@ -11903,6 +11914,7 @@
    MYSQL_SYSVAR(buffer_pool_size),
    MYSQL_SYSVAR(buffer_pool_instances),
    MYSQL_SYSVAR(checksums),
@@ -231,7 +231,7 @@ diff -ruN a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fi
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2010-12-04 15:52:23.474482590 +0900
 +++ b/storage/innobase/include/srv0srv.h       2010-12-04 15:53:45.048512100 +0900
-@@ -226,6 +226,7 @@
+@@ -227,6 +227,7 @@
  
  extern ibool  srv_use_doublewrite_buf;
  extern ibool  srv_use_checksums;
@@ -291,7 +291,7 @@ diff -ruN a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-04 15:52:23.498513634 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-04 15:53:45.053550283 +0900
-@@ -414,6 +414,7 @@
+@@ -418,6 +418,7 @@
  
  UNIV_INTERN ibool     srv_use_doublewrite_buf = TRUE;
  UNIV_INTERN ibool     srv_use_checksums = TRUE;
index d6bbf206397f16c64bb4dfdb9361da1f35c7ad80..56e31b7147fd3c543b0fe17b6385096cc76de0de 100644 (file)
@@ -121,7 +121,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static my_bool innobase_thread_concurrency_timer_based;
  static long long innobase_buffer_pool_size, innobase_log_file_size;
  
-@@ -2270,6 +2273,65 @@
+@@ -2289,6 +2292,65 @@
        }
  #endif /* DBUG_OFF */
  
@@ -187,7 +187,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  #ifndef MYSQL_SERVER
        innodb_overwrite_relay_log_info = FALSE;
  #endif
-@@ -7222,9 +7284,9 @@
+@@ -7241,9 +7303,9 @@
                                | DICT_TF_COMPACT
                                | DICT_TF_FORMAT_ZIP
                                << DICT_TF_FORMAT_SHIFT;
@@ -200,7 +200,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                }
        }
  
-@@ -11335,6 +11397,16 @@
+@@ -11408,6 +11470,16 @@
    "#### Attention: The checksum is not compatible for normal or disabled version! ####",
    NULL, NULL, FALSE);
  
@@ -217,7 +217,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_STR(data_home_dir, innobase_data_home_dir,
    PLUGIN_VAR_READONLY,
    "The common part for InnoDB table spaces.",
-@@ -11848,6 +11920,8 @@
+@@ -11909,6 +11981,8 @@
    NULL, NULL, 0, &corrupt_table_action_typelib);
  
  static struct st_mysql_sys_var* innobase_system_variables[]= {
@@ -379,7 +379,7 @@ diff -ruN a/storage/innobase/include/trx0sys.h b/storage/innobase/include/trx0sy
 diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
 --- a/storage/innobase/include/univ.i  2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/include/univ.i  2010-12-04 15:55:58.263549721 +0900
-@@ -295,9 +295,13 @@
+@@ -296,9 +296,13 @@
  */
  
  /* The 2-logarithm of UNIV_PAGE_SIZE: */
@@ -395,7 +395,7 @@ diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
  
  /* Maximum number of parallel threads in a parallelized operation */
  #define UNIV_MAX_PARALLELISM  32
-@@ -416,7 +420,7 @@
+@@ -417,7 +421,7 @@
  stored part of the field in the tablespace. The length field then
  contains the sum of the following flag and the locally stored len. */
  
@@ -404,7 +404,7 @@ diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
  
  /* Some macros to improve branch prediction and reduce cache misses */
  #if defined(__GNUC__) && (__GNUC__ > 2) && ! defined(__INTEL_COMPILER)
-@@ -519,4 +523,6 @@
+@@ -520,4 +524,6 @@
        UNIV_MEM_ALLOC(addr, size);                     \
  } while (0)
  
@@ -564,7 +564,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
 --- a/storage/innobase/srv/srv0start.c 2010-12-04 15:52:23.502513556 +0900
 +++ b/storage/innobase/srv/srv0start.c 2010-12-04 15:55:58.285550583 +0900
-@@ -1553,11 +1553,13 @@
+@@ -1556,11 +1556,13 @@
        }
  #endif /* UNIV_LOG_ARCHIVE */
  
@@ -580,7 +580,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
  
                return(DB_ERROR);
        }
-@@ -1566,7 +1568,7 @@
+@@ -1569,7 +1571,7 @@
  
        for (i = 0; i < srv_n_data_files; i++) {
  #ifndef __WIN__
index 089a0c0f02b6fc0f1defd334de677919a49f2994..18245c374914621981afe5e6ef47dedec5a2336a 100644 (file)
@@ -91,7 +91,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  /********************************************************************//**
  Insert a compressed block into buf_pool->zip_clean in the LRU order. */
  UNIV_INTERN
-@@ -1568,6 +1599,10 @@
+@@ -1538,6 +1569,10 @@
                return(BUF_LRU_NOT_FREED);
        }
  
@@ -357,7 +357,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-04 15:57:13.035513990 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-04 15:57:53.084513775 +0900
-@@ -11919,6 +11919,12 @@
+@@ -11980,6 +11980,12 @@
    "except for the deletion.",
    NULL, NULL, 0, &corrupt_table_action_typelib);
  
@@ -370,7 +370,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(page_size),
    MYSQL_SYSVAR(log_block_size),
-@@ -12009,6 +12015,7 @@
+@@ -12070,6 +12076,7 @@
    MYSQL_SYSVAR(purge_threads),
    MYSQL_SYSVAR(purge_batch_size),
    MYSQL_SYSVAR(corrupt_table_action),
@@ -378,7 +378,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    NULL
  };
  
-@@ -12018,7 +12025,7 @@
+@@ -12079,7 +12086,7 @@
    &innobase_storage_engine,
    innobase_hton_name,
    "Innobase Oy",
@@ -396,7 +396,7 @@ diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0bu
        /* @} */
 +      ibool           space_was_being_deleted;
        ibool           is_corrupt;
- # ifdef UNIV_DEBUG_FILE_ACCESSES
+ # if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
        ibool           file_page_was_freed;
 diff -ruN a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic
 --- a/storage/innobase/include/buf0buf.ic      2011-02-23 19:00:48.130659154 +0900
@@ -522,7 +522,7 @@ diff -ruN a/storage/innobase/include/os0file.ic b/storage/innobase/include/os0fi
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2011-02-23 19:00:48.212625715 +0900
 +++ b/storage/innobase/include/srv0srv.h       2011-02-23 19:01:19.193655990 +0900
-@@ -247,6 +247,8 @@
+@@ -248,6 +248,8 @@
  
  extern ulint  srv_extra_rsegments;
  extern ulint  srv_dict_size_limit;
@@ -567,18 +567,6 @@ diff -ruN a/storage/innobase/include/univ.i b/storage/innobase/include/univ.i
  
  #define REFMAN "http://dev.mysql.com/doc/refman/"     \
        IB_TO_STR(MYSQL_MAJOR_VERSION) "."              \
-diff -ruN a/storage/innobase/mtr/mtr0log.c b/storage/innobase/mtr/mtr0log.c
---- a/storage/innobase/mtr/mtr0log.c   2010-12-04 02:58:26.000000000 +0900
-+++ b/storage/innobase/mtr/mtr0log.c   2011-02-03 15:17:14.000000000 +0900
-@@ -408,7 +408,7 @@
-       ptr += 2;
-       if (UNIV_UNLIKELY(offset >= UNIV_PAGE_SIZE)
--                      || UNIV_UNLIKELY(len + offset) > UNIV_PAGE_SIZE) {
-+                      || UNIV_UNLIKELY(len + offset > UNIV_PAGE_SIZE)) {
-               recv_sys->found_corrupt_log = TRUE;
-               return(NULL);
 diff -ruN a/storage/innobase/os/os0file.c b/storage/innobase/os/os0file.c
 --- a/storage/innobase/os/os0file.c    2011-02-23 19:00:47.928696481 +0900
 +++ b/storage/innobase/os/os0file.c    2011-02-23 19:01:19.200696353 +0900
@@ -755,7 +743,7 @@ diff -ruN a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2011-02-23 19:00:48.283695497 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2011-02-23 19:01:19.204696643 +0900
-@@ -442,6 +442,8 @@
+@@ -446,6 +446,8 @@
  
  UNIV_INTERN ulint     srv_extra_rsegments = 127; /* extra rseg for users */
  UNIV_INTERN ulint     srv_dict_size_limit = 0;
@@ -767,7 +755,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
 --- a/storage/innobase/srv/srv0start.c 2010-12-04 15:57:13.073495392 +0900
 +++ b/storage/innobase/srv/srv0start.c 2010-12-04 16:02:50.704884053 +0900
-@@ -2153,7 +2153,7 @@
+@@ -2156,7 +2156,7 @@
        if (srv_print_verbose_log) {
                ut_print_timestamp(stderr);
                fprintf(stderr,
@@ -779,7 +767,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
 diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
 --- a/storage/innobase/sync/sync0sync.c        2011-02-25 14:18:55.817202060 +0900
 +++ b/storage/innobase/sync/sync0sync.c        2011-02-25 14:19:44.596202017 +0900
-@@ -1181,6 +1181,7 @@
+@@ -1174,6 +1174,7 @@
        case SYNC_LOG_FLUSH_ORDER:
        case SYNC_THR_LOCAL:
        case SYNC_ANY_LATCH:
index 482273180aaa5b918f1a48d47b987e3c449f6d24..0fc40795d3233f63b3cc67c08b636e4d3614ed41 100644 (file)
@@ -53,7 +53,7 @@ diff -ruN a/storage/innobase/buf/buf0rea.c b/storage/innobase/buf/buf0rea.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:09:51.283956391 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:10:08.963980444 +0900
-@@ -426,6 +426,12 @@
+@@ -445,6 +445,12 @@
    "Timeout in seconds an InnoDB transaction may wait for a lock before being rolled back. Values above 100000000 disable the timeout.",
    NULL, NULL, 50, 1, 1024 * 1024 * 1024, 0);
  
@@ -66,7 +66,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  static handler *innobase_create_handler(handlerton *hton,
                                          TABLE_SHARE *table,
-@@ -820,6 +826,17 @@
+@@ -839,6 +845,17 @@
        }
  }
  
@@ -84,7 +84,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  /********************************************************************//**
  Obtain the InnoDB transaction of a MySQL thread.
  @return       reference to transaction pointer */
-@@ -2391,6 +2408,9 @@
+@@ -2410,6 +2427,9 @@
        srv_n_read_io_threads = (ulint) innobase_read_io_threads;
        srv_n_write_io_threads = (ulint) innobase_write_io_threads;
  
@@ -94,7 +94,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        srv_force_recovery = (ulint) innobase_force_recovery;
  
        srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
-@@ -10919,9 +10939,9 @@
+@@ -10992,9 +11012,9 @@
  
  static MYSQL_SYSVAR_ULONG(purge_threads, srv_n_purge_threads,
    PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY,
@@ -106,7 +106,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    0,                  /* Minimum value */
    1, 0);              /* Maximum value */
  
-@@ -10963,12 +10983,18 @@
+@@ -11036,12 +11056,18 @@
    innodb_file_format_max_validate,
    innodb_file_format_max_update, "Antelope");
  
@@ -131,7 +131,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  static MYSQL_SYSVAR_STR(flush_method, innobase_file_flush_method,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
-@@ -11063,7 +11089,7 @@
+@@ -11136,7 +11162,7 @@
  static MYSQL_SYSVAR_LONGLONG(buffer_pool_size, innobase_buffer_pool_size,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
    "The size of the memory buffer InnoDB uses to cache data and indexes of its tables.",
@@ -140,7 +140,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  static MYSQL_SYSVAR_LONG(buffer_pool_instances, innobase_buffer_pool_instances,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
-@@ -11208,6 +11234,95 @@
+@@ -11288,6 +11314,95 @@
    "trigger a readahead.",
    NULL, NULL, 56, 0, 64, 0);
  
@@ -236,7 +236,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(additional_mem_pool_size),
    MYSQL_SYSVAR(autoextend_increment),
-@@ -11228,6 +11343,7 @@
+@@ -11308,6 +11423,7 @@
    MYSQL_SYSVAR(file_format_check),
    MYSQL_SYSVAR(file_format_max),
    MYSQL_SYSVAR(flush_log_at_trx_commit),
@@ -244,7 +244,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    MYSQL_SYSVAR(flush_method),
    MYSQL_SYSVAR(force_recovery),
    MYSQL_SYSVAR(locks_unsafe_for_binlog),
-@@ -11264,6 +11380,13 @@
+@@ -11345,6 +11461,13 @@
    MYSQL_SYSVAR(show_verbose_locks),
    MYSQL_SYSVAR(show_locks_held),
    MYSQL_SYSVAR(version),
@@ -274,7 +274,7 @@ diff -ruN a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.
  
        mutex_create(ibuf_pessimistic_insert_mutex_key,
                     &ibuf_pessimistic_insert_mutex,
-@@ -2729,9 +2731,11 @@
+@@ -2712,9 +2714,11 @@
        size = ibuf->size;
        max_size = ibuf->max_size;
  
@@ -328,7 +328,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  extern char   srv_adaptive_flushing;
  
  
-@@ -214,6 +215,16 @@
+@@ -219,6 +220,16 @@
  extern ulong  srv_max_purge_lag;
  
  extern ulong  srv_replication_delay;
@@ -345,7 +345,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  /*-------------------------------------------*/
  
  extern ulint  srv_n_rows_inserted;
-@@ -389,8 +400,9 @@
+@@ -394,8 +405,9 @@
                                when writing data files, but do flush
                                after writing to log files */
        SRV_UNIX_NOSYNC,        /*!< do not flush after writing */
@@ -553,7 +553,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
  /* Try to flush dirty pages so as to avoid IO bursts at
  the checkpoints. */
-@@ -401,6 +402,17 @@
+@@ -406,6 +407,17 @@
  
  UNIV_INTERN ulong     srv_replication_delay           = 0;
  
@@ -571,7 +571,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  /*-------------------------------------------*/
  UNIV_INTERN ulong     srv_n_spin_wait_rounds  = 30;
  UNIV_INTERN ulong     srv_n_free_tickets_to_enter = 500;
-@@ -2737,6 +2749,7 @@
+@@ -2742,6 +2754,7 @@
        ulint           n_pages_purged  = 0;
        ulint           n_bytes_merged;
        ulint           n_pages_flushed;
@@ -579,7 +579,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        ulint           n_bytes_archived;
        ulint           n_tables_to_drop;
        ulint           n_ios;
-@@ -2744,7 +2757,20 @@
+@@ -2749,7 +2762,20 @@
        ulint           n_ios_very_old;
        ulint           n_pend_ios;
        ulint           next_itr_time;
@@ -600,7 +600,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
  #ifdef UNIV_DEBUG_THREAD_CREATION
        fprintf(stderr, "Master thread starts, id %lu\n",
-@@ -2766,6 +2792,9 @@
+@@ -2771,6 +2797,9 @@
  
        mutex_exit(&kernel_mutex);
  
@@ -610,7 +610,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  loop:
        /*****************************************************************/
        /* ---- When there is database activity by users, we cycle in this
-@@ -2796,9 +2825,13 @@
+@@ -2801,9 +2830,13 @@
        /* Sleep for 1 second on entrying the for loop below the first time. */
        next_itr_time = ut_time_ms() + 1000;
  
@@ -624,7 +624,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
                /* ALTER TABLE in MySQL requires on Unix that the table handler
                can drop tables lazily after there no longer are SELECT
                queries to them. */
-@@ -2822,6 +2855,7 @@
+@@ -2827,6 +2860,7 @@
                srv_main_thread_op_info = "sleeping";
                srv_main_1_second_loops++;
  
@@ -632,7 +632,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
                if (next_itr_time > cur_time
                    && srv_shutdown_state == SRV_SHUTDOWN_NONE) {
  
-@@ -2832,10 +2866,26 @@
+@@ -2837,10 +2871,26 @@
                                        (next_itr_time - cur_time)
                                         * 1000));
                        srv_main_sleeps++;
@@ -659,7 +659,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
                /* Flush logs if needed */
                srv_sync_log_buffer_in_background();
-@@ -2855,7 +2905,7 @@
+@@ -2860,7 +2910,7 @@
                if (n_pend_ios < SRV_PEND_IO_THRESHOLD
                    && (n_ios - n_ios_old < SRV_RECENT_IO_ACTIVITY)) {
                        srv_main_thread_op_info = "doing insert buffer merge";
@@ -668,7 +668,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
                        /* Flush logs if needed */
                        srv_sync_log_buffer_in_background();
-@@ -2872,7 +2922,11 @@
+@@ -2877,7 +2927,11 @@
                        n_pages_flushed = buf_flush_list(
                                PCT_IO(100), IB_ULONGLONG_MAX);
  
@@ -681,7 +681,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
                        /* Try to keep the rate of flushing of dirty
                        pages such that redo log generation does not
-@@ -2888,6 +2942,224 @@
+@@ -2893,6 +2947,224 @@
                                                n_flush,
                                                IB_ULONGLONG_MAX);
                        }
@@ -906,7 +906,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
                }
  
                if (srv_activity_count == old_activity_count) {
-@@ -2936,7 +3208,7 @@
+@@ -2941,7 +3213,7 @@
        even if the server were active */
  
        srv_main_thread_op_info = "doing insert buffer merge";
@@ -915,7 +915,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
        /* Flush logs if needed */
        srv_sync_log_buffer_in_background();
-@@ -3044,7 +3316,7 @@
+@@ -3049,7 +3321,7 @@
                buf_flush_list below. Otherwise, the system favors
                clean pages over cleanup throughput. */
                n_bytes_merged = ibuf_contract_for_n_pages(FALSE,
@@ -924,7 +924,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        }
  
        srv_main_thread_op_info = "reserving kernel mutex";
-@@ -3190,6 +3462,7 @@
+@@ -3195,6 +3467,7 @@
        srv_slot_t*     slot;
        ulint           slot_no = ULINT_UNDEFINED;
        ulint           n_total_purged = ULINT_UNDEFINED;
@@ -932,7 +932,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
        ut_a(srv_n_purge_threads == 1);
  
-@@ -3212,9 +3485,12 @@
+@@ -3217,9 +3490,12 @@
  
        mutex_exit(&kernel_mutex);
  
@@ -945,7 +945,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
                /* If there are very few records to purge or the last
                purge didn't purge any records then wait for activity.
-@@ -3255,6 +3531,16 @@
+@@ -3260,6 +3536,16 @@
                } while (n_pages_purged > 0 && !srv_fast_shutdown);
  
                srv_sync_log_buffer_in_background();
index 353cc19f7525acbace325895d6d5903e8c009f70..1947c7d5809d06e3fb90e10340e4bc2e4f4663e8 100644 (file)
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
 --- a/storage/innobase/buf/buf0lru.c   2010-12-03 15:49:59.185023424 +0900
 +++ b/storage/innobase/buf/buf0lru.c   2010-12-04 15:33:37.626482350 +0900
-@@ -2258,6 +2258,284 @@
+@@ -2224,6 +2224,284 @@
        memset(&buf_LRU_stat_cur, 0, sizeof buf_LRU_stat_cur);
  }
  
@@ -382,7 +382,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 17:49:11.589956135 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-04 15:33:37.645555490 +0900
-@@ -11706,6 +11706,12 @@
+@@ -11767,6 +11767,12 @@
    "Limit the allocated memory for dictionary cache. (0: unlimited)",
    NULL, NULL, 0, 0, LONG_MAX, 0);
  
@@ -395,7 +395,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(additional_mem_pool_size),
    MYSQL_SYSVAR(autoextend_increment),
-@@ -11788,6 +11794,7 @@
+@@ -11849,6 +11855,7 @@
  #endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
    MYSQL_SYSVAR(read_ahead_threshold),
    MYSQL_SYSVAR(io_capacity),
@@ -454,7 +454,7 @@ diff -ruN a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
 diff -ruN a/storage/innobase/include/buf0lru.h b/storage/innobase/include/buf0lru.h
 --- a/storage/innobase/include/buf0lru.h       2010-12-03 15:49:59.223956070 +0900
 +++ b/storage/innobase/include/buf0lru.h       2010-12-04 15:33:37.681481467 +0900
-@@ -219,6 +219,18 @@
+@@ -215,6 +215,18 @@
  void
  buf_LRU_stat_update(void);
  /*=====================*/
@@ -535,7 +535,7 @@ diff -ruN a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fi
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2010-12-03 17:49:11.603969747 +0900
 +++ b/storage/innobase/include/srv0srv.h       2010-12-04 15:33:37.685550816 +0900
-@@ -356,6 +356,9 @@
+@@ -357,6 +357,9 @@
  reading of a disk page */
  extern ulint srv_buf_pool_reads;
  
@@ -545,7 +545,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  /** Status variables to be passed to MySQL */
  typedef struct export_var_struct export_struc;
  
-@@ -663,6 +666,16 @@
+@@ -677,6 +680,16 @@
  /*=====================*/
        void*   arg);   /*!< in: a dummy parameter required by
                        os_thread_create */
@@ -565,7 +565,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-03 17:49:11.620986661 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-04 15:33:37.708550811 +0900
-@@ -329,6 +329,9 @@
+@@ -334,6 +334,9 @@
  reading of a disk page */
  UNIV_INTERN ulint srv_buf_pool_reads = 0;
  
@@ -575,7 +575,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  /* structure to pass status variables to MySQL */
  UNIV_INTERN export_struc export_vars;
  
-@@ -2697,6 +2700,56 @@
+@@ -2701,6 +2704,56 @@
        /* We count the number of threads in os_thread_exit(). A created
        thread should always use that to exit and not use return() to exit. */
  
@@ -647,7 +647,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
  
  /** We use this mutex to test the return value of pthread_mutex_trylock
     on successful locking. HP-UX does NOT return 0, though Linux et al do. */
-@@ -1813,6 +1813,10 @@
+@@ -1816,6 +1816,10 @@
        os_thread_create(&srv_monitor_thread, NULL,
                         thread_ids + 4 + SRV_MAX_N_IO_THREADS);
  
index 3e1714b4522b0d288b990429b863cb30d30df515..01559ebf6f564eaf16c10333be0315e2b30c750f 100644 (file)
@@ -190,7 +190,7 @@ diff -ruN a/storage/innobase/buf/buf0flu.c b/storage/innobase/buf/buf0flu.c
 diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
 --- a/storage/innobase/buf/buf0lru.c   2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/buf/buf0lru.c   2010-12-03 15:20:49.602952786 +0900
-@@ -1016,7 +1016,7 @@
+@@ -992,7 +992,7 @@
  
        /* No free block was found: try to flush the LRU list */
  
@@ -199,7 +199,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        ++srv_buf_pool_wait_free;
  
        os_aio_simulated_wake_handler_threads();
-@@ -1213,7 +1213,7 @@
+@@ -1189,7 +1189,7 @@
  
        /* Remove the block from the LRU list */
        UT_LIST_REMOVE(LRU, buf_pool->LRU, bpage);
@@ -208,7 +208,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        buf_unzip_LRU_remove_block_if_needed(bpage);
  
-@@ -1292,7 +1292,7 @@
+@@ -1268,7 +1268,7 @@
  
        ut_ad(!bpage->in_LRU_list);
        UT_LIST_ADD_LAST(LRU, buf_pool->LRU, bpage);
@@ -217,7 +217,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        if (UT_LIST_GET_LEN(buf_pool->LRU) > BUF_LRU_OLD_MIN_LEN) {
  
-@@ -1362,7 +1362,7 @@
+@@ -1338,7 +1338,7 @@
                buf_pool->LRU_old_len++;
        }
  
@@ -226,7 +226,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        if (UT_LIST_GET_LEN(buf_pool->LRU) > BUF_LRU_OLD_MIN_LEN) {
  
-@@ -1617,7 +1617,7 @@
+@@ -1589,7 +1589,7 @@
                                buf_page_set_old(b, buf_page_is_old(b));
  #endif /* UNIV_LRU_DEBUG */
                        } else {
index 4fb18200035523ddcc3a7f281790a5102870d6cc..8946e804b3095be0b1e2e8951627fe7ebc3048d5 100644 (file)
@@ -56,7 +56,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static my_bool        innobase_rollback_on_timeout            = FALSE;
  static my_bool        innobase_create_status_file             = FALSE;
  static my_bool        innobase_stats_on_metadata              = TRUE;
-@@ -2202,6 +2222,89 @@
+@@ -2221,6 +2241,89 @@
        }
  #endif /* DBUG_OFF */
  
@@ -146,7 +146,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        /* Check that values don't overflow on 32-bit systems. */
        if (sizeof(ulint) == 4) {
                if (innobase_buffer_pool_size > UINT_MAX32) {
-@@ -2500,6 +2603,76 @@
+@@ -2519,6 +2622,76 @@
                goto mem_free_and_error;
        }
  
@@ -223,7 +223,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        innobase_old_blocks_pct = buf_LRU_old_ratio_update(
                innobase_old_blocks_pct, TRUE);
  
-@@ -2612,6 +2785,25 @@
+@@ -2631,6 +2804,25 @@
        trx_t*  trx)    /*!< in: transaction handle */
  {
        if (trx_is_started(trx)) {
@@ -249,7 +249,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
                trx_commit_for_mysql(trx);
        }
-@@ -10917,6 +11109,12 @@
+@@ -10990,6 +11182,12 @@
    "The common part for InnoDB table spaces.",
    NULL, NULL, NULL);
  
@@ -262,7 +262,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_BOOL(doublewrite, innobase_use_doublewrite,
    PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
    "Enable InnoDB doublewrite buffer (enabled by default). "
-@@ -11368,6 +11566,7 @@
+@@ -11448,6 +11646,7 @@
    MYSQL_SYSVAR(old_blocks_pct),
    MYSQL_SYSVAR(old_blocks_time),
    MYSQL_SYSVAR(open_files),
index 74867b4a2bb96afc6d488b6887f605130a42e6d5..76fe92bc74caf03127fc8bfbb6f0bc4d0a28116c 100644 (file)
@@ -76,7 +76,7 @@ diff -ruN a/storage/innobase/btr/btr0btr.c b/storage/innobase/btr/btr0btr.c
 diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
 --- a/storage/innobase/btr/btr0cur.c   2010-12-03 17:30:16.239038936 +0900
 +++ b/storage/innobase/btr/btr0cur.c   2010-12-04 15:38:18.114551906 +0900
-@@ -238,6 +238,11 @@
+@@ -250,6 +250,11 @@
        case BTR_MODIFY_LEAF:
                mode = latch_mode == BTR_SEARCH_LEAF ? RW_S_LATCH : RW_X_LATCH;
                get_block = btr_block_get(space, zip_size, page_no, mode, mtr);
@@ -88,7 +88,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
  #ifdef UNIV_BTR_DEBUG
                ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
  #endif /* UNIV_BTR_DEBUG */
-@@ -251,6 +256,11 @@
+@@ -263,6 +268,11 @@
                        get_block = btr_block_get(space, zip_size,
                                                  left_page_no,
                                                  RW_X_LATCH, mtr);
@@ -100,7 +100,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
  #ifdef UNIV_BTR_DEBUG
                        ut_a(page_is_comp(get_block->frame)
                             == page_is_comp(page));
-@@ -262,6 +272,11 @@
+@@ -274,6 +284,11 @@
  
                get_block = btr_block_get(space, zip_size, page_no,
                                          RW_X_LATCH, mtr);
@@ -112,7 +112,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
  #ifdef UNIV_BTR_DEBUG
                ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
  #endif /* UNIV_BTR_DEBUG */
-@@ -273,6 +288,11 @@
+@@ -285,6 +300,11 @@
                        get_block = btr_block_get(space, zip_size,
                                                  right_page_no,
                                                  RW_X_LATCH, mtr);
@@ -124,7 +124,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
  #ifdef UNIV_BTR_DEBUG
                        ut_a(page_is_comp(get_block->frame)
                             == page_is_comp(page));
-@@ -294,6 +314,11 @@
+@@ -306,6 +326,11 @@
                        get_block = btr_block_get(space, zip_size,
                                                  left_page_no, mode, mtr);
                        cursor->left_block = get_block;
@@ -136,7 +136,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
  #ifdef UNIV_BTR_DEBUG
                        ut_a(page_is_comp(get_block->frame)
                             == page_is_comp(page));
-@@ -304,6 +329,11 @@
+@@ -316,6 +341,11 @@
                }
  
                get_block = btr_block_get(space, zip_size, page_no, mode, mtr);
@@ -148,7 +148,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
  #ifdef UNIV_BTR_DEBUG
                ut_a(page_is_comp(get_block->frame) == page_is_comp(page));
  #endif /* UNIV_BTR_DEBUG */
-@@ -576,6 +606,19 @@
+@@ -588,6 +618,19 @@
                file, line, mtr);
  
        if (block == NULL) {
@@ -168,7 +168,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
                /* This must be a search to perform an insert/delete
                mark/ delete; try using the insert/delete buffer */
  
-@@ -650,6 +693,16 @@
+@@ -662,6 +705,16 @@
        block->check_index_page_at_flush = TRUE;
        page = buf_block_get_frame(block);
  
@@ -185,7 +185,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        if (rw_latch != RW_NO_LATCH) {
  #ifdef UNIV_ZIP_DEBUG
                const page_zip_des_t*   page_zip
-@@ -854,6 +907,17 @@
+@@ -866,6 +919,17 @@
                                         RW_NO_LATCH, NULL, BUF_GET,
                                         file, line, mtr);
                page = buf_block_get_frame(block);
@@ -203,7 +203,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
                ut_ad(index->id == btr_page_get_index_id(page));
  
                block->check_index_page_at_flush = TRUE;
-@@ -974,6 +1038,14 @@
+@@ -986,6 +1050,14 @@
                                         RW_NO_LATCH, NULL, BUF_GET,
                                         file, line, mtr);
                page = buf_block_get_frame(block);
@@ -218,7 +218,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
                ut_ad(index->id == btr_page_get_index_id(page));
  
                if (height == ULINT_UNDEFINED) {
-@@ -1288,6 +1360,12 @@
+@@ -1199,6 +1271,12 @@
        *big_rec = NULL;
  
        block = btr_cur_get_block(cursor);
@@ -231,7 +231,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        page = buf_block_get_frame(block);
        index = cursor->index;
        zip_size = buf_block_get_zip_size(block);
-@@ -3013,6 +3091,11 @@
+@@ -2924,6 +3002,11 @@
  
        block = btr_cur_get_block(cursor);
  
@@ -243,7 +243,7 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        ut_ad(page_is_leaf(buf_block_get_frame(block)));
  
        rec = btr_cur_get_rec(cursor);
-@@ -3817,6 +3900,11 @@
+@@ -3627,6 +3710,11 @@
  
                page = btr_cur_get_page(&cursor);
  
@@ -252,9 +252,9 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
 +              }
 +              ut_a(page);
 +
-               supremum = page_get_supremum_rec(page);
-               if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS && is_first_page) {
-                       /* the cursor should be the first record of the page. */
+               rec = page_rec_get_next(page_get_infimum_rec(page));
+               if (!page_rec_is_supremum(rec)) {
 diff -ruN a/storage/innobase/btr/btr0pcur.c b/storage/innobase/btr/btr0pcur.c
 --- a/storage/innobase/btr/btr0pcur.c  2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/btr/btr0pcur.c  2010-12-04 15:38:18.116563877 +0900
@@ -343,7 +343,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                        if (!ready) {
  
                                return(block);
-@@ -2476,6 +2482,14 @@
+@@ -2478,6 +2484,14 @@
                return(NULL);
        }
  
@@ -358,7 +358,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        block_mutex = buf_page_get_mutex_enter(bpage);
  
        rw_lock_s_unlock(&buf_pool->page_hash_latch);
-@@ -3023,6 +3037,14 @@
+@@ -3024,6 +3038,14 @@
                return(NULL);
        }
  
@@ -378,9 +378,9 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        bpage->oldest_modification = 0;
        HASH_INVALIDATE(bpage, hash);
 +      bpage->is_corrupt = FALSE;
- #ifdef UNIV_DEBUG_FILE_ACCESSES
+ #if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
        bpage->file_page_was_freed = FALSE;
- #endif /* UNIV_DEBUG_FILE_ACCESSES */
+ #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
 @@ -4200,7 +4223,8 @@
  void
  buf_page_io_complete(
@@ -492,7 +492,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
                        goto next_loop;
  
                cached_foreign_tables = 0;
-@@ -4327,6 +4328,12 @@
+@@ -4333,6 +4334,12 @@
        heap = mem_heap_create(1000);
  
        while (index) {
@@ -505,7 +505,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
                size = btr_get_size(index, BTR_TOTAL_SIZE);
  
                index->stat_index_size = size;
-@@ -4446,6 +4453,12 @@
+@@ -4452,6 +4459,12 @@
        heap = mem_heap_create(1000);
  
        while (index) {
@@ -518,7 +518,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
  /*===========================================*/
  {
        dict_table_t*   sys_stats;
-@@ -4611,6 +4624,12 @@
+@@ -4617,6 +4630,12 @@
                     || (srv_force_recovery < SRV_FORCE_NO_LOG_REDO
                         && dict_index_is_clust(index)))) {
                        ulint   size;
@@ -531,7 +531,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
                        size = btr_get_size(index, BTR_TOTAL_SIZE);
  
                        index->stat_index_size = size;
-@@ -5331,4 +5350,42 @@
+@@ -5341,4 +5360,42 @@
                rw_lock_free(&dict_table_stats_latches[i]);
        }
  }
@@ -808,7 +808,7 @@ diff -ruN a/storage/innobase/fsp/fsp0fsp.c b/storage/innobase/fsp/fsp0fsp.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-04 15:37:50.578486593 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-04 15:38:18.137549396 +0900
-@@ -3928,6 +3928,12 @@
+@@ -3947,6 +3947,12 @@
                DBUG_RETURN(1);
        }
  
@@ -821,7 +821,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        /* Create buffers for packing the fields of a record. Why
        table->reclength did not work here? Obviously, because char
        fields when packed actually became 1 byte longer, when we also
-@@ -3955,6 +3961,19 @@
+@@ -3974,6 +3980,19 @@
        /* Get pointer to a table object in InnoDB dictionary cache */
        ib_table = dict_table_get(norm_name, TRUE);
        
@@ -841,7 +841,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        if (NULL == ib_table) {
                if (is_part && retries < 10) {
                        ++retries;
-@@ -5119,6 +5138,10 @@
+@@ -5138,6 +5157,10 @@
  
        ha_statistic_increment(&SSV::ha_write_count);
  
@@ -852,7 +852,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_INSERT)
                table->timestamp_field->set_time();
  
-@@ -5336,6 +5359,10 @@
+@@ -5355,6 +5378,10 @@
  func_exit:
        innobase_active_small();
  
@@ -863,7 +863,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        DBUG_RETURN(error_result);
  }
  
-@@ -5512,6 +5539,10 @@
+@@ -5531,6 +5558,10 @@
  
        ha_statistic_increment(&SSV::ha_update_count);
  
@@ -874,7 +874,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        if (table->timestamp_field_type & TIMESTAMP_AUTO_SET_ON_UPDATE)
                table->timestamp_field->set_time();
  
-@@ -5601,6 +5632,10 @@
+@@ -5620,6 +5651,10 @@
  
        innobase_active_small();
  
@@ -885,7 +885,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        DBUG_RETURN(error);
  }
  
-@@ -5622,6 +5657,10 @@
+@@ -5641,6 +5676,10 @@
  
        ha_statistic_increment(&SSV::ha_delete_count);
  
@@ -896,7 +896,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        if (!prebuilt->upd_node) {
                row_get_prebuilt_update_vector(prebuilt);
        }
-@@ -5648,6 +5687,10 @@
+@@ -5667,6 +5706,10 @@
  
        innobase_active_small();
  
@@ -907,7 +907,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        DBUG_RETURN(error);
  }
  
-@@ -5887,6 +5930,10 @@
+@@ -5906,6 +5949,10 @@
  
        ha_statistic_increment(&SSV::ha_read_key_count);
  
@@ -918,7 +918,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        index = prebuilt->index;
  
        if (UNIV_UNLIKELY(index == NULL)) {
-@@ -5952,6 +5999,10 @@
+@@ -5971,6 +6018,10 @@
                ret = DB_UNSUPPORTED;
        }
  
@@ -929,7 +929,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        switch (ret) {
        case DB_SUCCESS:
                error = 0;
-@@ -6067,6 +6118,10 @@
+@@ -6086,6 +6137,10 @@
  {
        DBUG_ENTER("change_active_index");
  
@@ -940,7 +940,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        ut_ad(user_thd == ha_thd());
        ut_a(prebuilt->trx == thd_to_trx(user_thd));
  
-@@ -6157,6 +6212,10 @@
+@@ -6176,6 +6231,10 @@
  
        DBUG_ENTER("general_fetch");
  
@@ -951,7 +951,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        ut_a(prebuilt->trx == thd_to_trx(user_thd));
  
        innodb_srv_conc_enter_innodb(prebuilt->trx);
-@@ -6166,6 +6225,10 @@
+@@ -6185,6 +6244,10 @@
  
        innodb_srv_conc_exit_innodb(prebuilt->trx);
  
@@ -962,7 +962,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        switch (ret) {
        case DB_SUCCESS:
                error = 0;
-@@ -7436,10 +7499,18 @@
+@@ -7455,10 +7518,18 @@
  
        update_thd(ha_thd());
  
@@ -981,7 +981,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        error = convert_error_code_to_mysql(error, prebuilt->table->flags,
                                            NULL);
  
-@@ -7944,6 +8015,16 @@
+@@ -7963,6 +8034,16 @@
        return(ranges + (double) rows / (double) total_rows * time_for_scan);
  }
  
@@ -998,7 +998,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  /*********************************************************************//**
  Calculates the key number used inside MySQL for an Innobase index. We will
  first check the "index translation table" for a match of the index to get
-@@ -8062,7 +8143,7 @@
+@@ -8140,7 +8221,7 @@
        ib_table = prebuilt->table;
  
        if (flag & HA_STATUS_TIME) {
@@ -1007,7 +1007,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                        /* In sql_show we call with this flag: update
                        then statistics so that they are up-to-date */
  
-@@ -8356,10 +8437,18 @@
+@@ -8429,10 +8510,18 @@
        THD*            thd,            /*!< in: connection thread handle */
        HA_CHECK_OPT*   check_opt)      /*!< in: currently ignored */
  {
@@ -1026,7 +1026,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        return(0);
  }
  
-@@ -8541,6 +8630,10 @@
+@@ -8614,6 +8703,10 @@
                my_error(ER_QUERY_INTERRUPTED, MYF(0));
        }
  
@@ -1037,7 +1037,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        DBUG_RETURN(is_ok ? HA_ADMIN_OK : HA_ADMIN_CORRUPT);
  }
  
-@@ -9311,6 +9404,10 @@
+@@ -9384,6 +9477,10 @@
  
        update_thd(thd);
  
@@ -1048,7 +1048,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        if (prebuilt->table->ibd_file_missing && !thd_tablespace_op(thd)) {
                ut_print_timestamp(stderr);
                fprintf(stderr,
-@@ -11720,6 +11817,25 @@
+@@ -11781,6 +11878,25 @@
    "0 (the default) disables automatic dumps.",
    NULL, NULL, 0, 0, UINT_MAX32, 0);
  
@@ -1074,7 +1074,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(additional_mem_pool_size),
    MYSQL_SYSVAR(autoextend_increment),
-@@ -11806,6 +11922,7 @@
+@@ -11867,6 +11983,7 @@
    MYSQL_SYSVAR(buffer_pool_restore_at_startup),
    MYSQL_SYSVAR(purge_threads),
    MYSQL_SYSVAR(purge_batch_size),
@@ -1151,7 +1151,7 @@ diff -ruN a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0bu
                                        in the buffer pool */
        /* @} */
 +      ibool           is_corrupt;
- # ifdef UNIV_DEBUG_FILE_ACCESSES
+ # if defined UNIV_DEBUG_FILE_ACCESSES || defined UNIV_DEBUG
        ibool           file_page_was_freed;
                                        /*!< this is set to TRUE when fsp
 diff -ruN a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic
@@ -1201,7 +1201,7 @@ diff -ruN a/storage/innobase/include/dict0dict.h b/storage/innobase/include/dict
 diff -ruN a/storage/innobase/include/dict0mem.h b/storage/innobase/include/dict0mem.h
 --- a/storage/innobase/include/dict0mem.h      2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/include/dict0mem.h      2010-12-04 15:38:18.171513956 +0900
-@@ -619,6 +619,7 @@
+@@ -625,6 +625,7 @@
                                the AUTOINC lock on this table. */
                                /* @} */
        /*----------------------*/
@@ -1296,7 +1296,7 @@ diff -ruN a/storage/innobase/include/page0zip.h b/storage/innobase/include/page0
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2010-12-04 15:37:50.591516341 +0900
 +++ b/storage/innobase/include/srv0srv.h       2010-12-04 15:38:18.180563749 +0900
-@@ -242,6 +242,7 @@
+@@ -243,6 +243,7 @@
  extern ulint  srv_adaptive_flushing_method;
  
  extern ulint  srv_expand_import;
@@ -1371,7 +1371,7 @@ diff -ruN a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-04 15:37:50.602481253 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-04 15:38:18.209513823 +0900
-@@ -430,6 +430,7 @@
+@@ -434,6 +434,7 @@
  UNIV_INTERN ulint     srv_adaptive_flushing_method = 0; /* 0: native  1: estimate  2: keep_average */
  
  UNIV_INTERN ulint     srv_expand_import = 0; /* 0:disable 1:enable */
@@ -1382,7 +1382,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
 --- a/storage/innobase/srv/srv0start.c 2010-12-04 15:37:50.605491300 +0900
 +++ b/storage/innobase/srv/srv0start.c 2010-12-04 15:38:18.212513722 +0900
-@@ -2141,6 +2141,13 @@
+@@ -2144,6 +2144,13 @@
  
        os_fast_mutex_free(&srv_os_test_mutex);
  
index f6ac467c592109da11bfe0b2f191f3e690c460fd..f7c849eba0f1033e42aacc9e7a4a49cc52d893fc 100644 (file)
@@ -117,7 +117,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static my_bool        innobase_locks_unsafe_for_binlog        = FALSE;
  static my_bool        innobase_overwrite_relay_log_info       = FALSE;
  static my_bool        innobase_rollback_on_timeout            = FALSE;
-@@ -2530,6 +2531,8 @@
+@@ -2549,6 +2550,8 @@
  
        srv_force_recovery = (ulint) innobase_force_recovery;
  
@@ -126,7 +126,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        srv_use_doublewrite_buf = (ibool) innobase_use_doublewrite;
        srv_use_checksums = (ibool) innobase_use_checksums;
  
-@@ -11173,6 +11176,11 @@
+@@ -11246,6 +11249,11 @@
    "The common part for InnoDB table spaces.",
    NULL, NULL, NULL);
  
@@ -138,7 +138,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_BOOL(recovery_update_relay_log, innobase_overwrite_relay_log_info,
    PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
    "During InnoDB crash recovery on slave overwrite relay-log.info "
-@@ -11656,6 +11664,7 @@
+@@ -11717,6 +11725,7 @@
    MYSQL_SYSVAR(data_file_path),
    MYSQL_SYSVAR(data_home_dir),
    MYSQL_SYSVAR(doublewrite),
index 7dc779b8adb350084f0ef3ab01a5791289425bf2..3b63f09f4c83ff00bc766d69d13e150bdf12c78c 100644 (file)
@@ -348,7 +348,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  /* The highest file format being used in the database. The value can be
  set by user, however, it will be adjusted to the newer file format if
-@@ -2426,6 +2427,8 @@
+@@ -2445,6 +2446,8 @@
                goto error;
        }
  
@@ -357,7 +357,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        srv_use_sys_stats_table = (ibool) innobase_use_sys_stats_table;
  
        /* -------------- Log files ---------------------------*/
-@@ -11556,6 +11559,11 @@
+@@ -11610,6 +11613,11 @@
    "Path to individual files and their sizes.",
    NULL, NULL, NULL);
  
@@ -369,7 +369,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_LONG(autoinc_lock_mode, innobase_autoinc_lock_mode,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
    "The AUTOINC lock modes supported by InnoDB:               "
-@@ -11721,6 +11729,7 @@
+@@ -11782,6 +11790,7 @@
    MYSQL_SYSVAR(commit_concurrency),
    MYSQL_SYSVAR(concurrency_tickets),
    MYSQL_SYSVAR(data_file_path),
@@ -519,7 +519,7 @@ diff -ruN a/storage/innobase/include/trx0sys.ic b/storage/innobase/include/trx0s
 diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
 --- a/storage/innobase/row/row0mysql.c 2010-12-03 17:30:16.334989510 +0900
 +++ b/storage/innobase/row/row0mysql.c 2010-12-04 15:35:58.652496484 +0900
-@@ -3421,7 +3421,7 @@
+@@ -3423,7 +3423,7 @@
                /* Do not drop possible .ibd tablespace if something went
                wrong: we do not want to delete valuable data of the user */
  
@@ -710,7 +710,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
        ibool           log_file_created;
        ibool           log_created     = FALSE;
        ibool           log_opened      = FALSE;
-@@ -1453,6 +1592,7 @@
+@@ -1456,6 +1595,7 @@
        }
  
        err = open_or_create_data_files(&create_new_db,
@@ -718,7 +718,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
  #ifdef UNIV_LOG_ARCHIVE
                                        &min_arch_log_no, &max_arch_log_no,
  #endif /* UNIV_LOG_ARCHIVE */
-@@ -1620,6 +1760,14 @@
+@@ -1623,6 +1763,14 @@
                after the double write buffer has been created. */
                trx_sys_create();
  
@@ -733,7 +733,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
                dict_create();
  
                srv_startup_is_before_trx_rollback_phase = FALSE;
-@@ -1653,6 +1801,13 @@
+@@ -1656,6 +1804,13 @@
                recv_recovery_from_archive_finish();
  #endif /* UNIV_LOG_ARCHIVE */
        } else {
@@ -747,7 +747,7 @@ diff -ruN a/storage/innobase/srv/srv0start.c b/storage/innobase/srv/srv0start.c
  
                /* Check if we support the max format that is stamped
                on the system tablespace. 
-@@ -1739,6 +1894,17 @@
+@@ -1742,6 +1897,17 @@
                we have finished the recovery process so that the
                image of TRX_SYS_PAGE_NO is not stale. */
                trx_sys_file_format_tag_init();
index 83ccf90beaf8ad50f59f3aa877ed945e760188c1..c9a8a47d2ee0a80c39d6cc6c51b8cdb9ea1988f8 100644 (file)
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 17:34:35.285040381 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 17:35:12.974975252 +0900
-@@ -9498,8 +9498,8 @@
+@@ -9571,8 +9571,8 @@
                        rw_lock_wait_time += mutex->lspent_time;
                }
  #else /* UNIV_DEBUG */
@@ -19,7 +19,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu",
                                     (ulong) mutex->count_os_wait);
  
-@@ -9514,9 +9514,8 @@
+@@ -9587,9 +9587,8 @@
  
        if (block_mutex) {
                buf1len = (uint) my_snprintf(buf1, sizeof buf1,
@@ -31,7 +31,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                buf2len = (uint) my_snprintf(buf2, sizeof buf2,
                                             "os_waits=%lu",
                                             (ulong) block_mutex_oswait_count);
-@@ -9545,8 +9544,8 @@
+@@ -9618,8 +9617,8 @@
                        continue;
                }
  
@@ -42,7 +42,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu",
                                      (ulong) lock->count_os_wait);
  
-@@ -9560,9 +9559,8 @@
+@@ -9633,9 +9632,8 @@
  
        if (block_lock) {
                buf1len = (uint) my_snprintf(buf1, sizeof buf1,
@@ -107,7 +107,7 @@ diff -ruN a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0r
  /******************************************************************//**
  Calling this function is obligatory only if the memory buffer containing
  the rw-lock is freed. Removes an rw-lock object from the global list. The
-@@ -610,7 +610,8 @@
+@@ -611,7 +611,8 @@
        struct PSI_rwlock *pfs_psi;/*!< The instrumentation hook */
  #endif
        ulint count_os_wait;    /*!< Count of os_waits. May not be accurate */
@@ -117,7 +117,7 @@ diff -ruN a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0r
          /* last s-lock file/line is not guaranteed to be correct */
        const char*     last_s_file_name;/*!< File name where last s-locked */
        const char*     last_x_file_name;/*!< File name where last x-locked */
-@@ -621,7 +622,7 @@
+@@ -622,7 +623,7 @@
                                are at the start of this struct, thus we can
                                peek this field without causing much memory
                                bus traffic */
@@ -126,7 +126,7 @@ diff -ruN a/storage/innobase/include/sync0rw.h b/storage/innobase/include/sync0r
        unsigned        last_s_line:14; /*!< Line number where last time s-locked */
        unsigned        last_x_line:14; /*!< Line number where last time x-locked */
  #ifdef UNIV_DEBUG
-@@ -691,10 +692,10 @@
+@@ -692,10 +693,10 @@
  # ifdef UNIV_SYNC_DEBUG
        ulint           level,          /*!< in: level */
  # endif /* UNIV_SYNC_DEBUG */
@@ -433,7 +433,7 @@ diff -ruN a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c
 diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
 --- a/storage/innobase/sync/sync0sync.c        2010-12-03 15:49:59.233955565 +0900
 +++ b/storage/innobase/sync/sync0sync.c        2010-12-03 17:35:12.989024400 +0900
-@@ -250,13 +250,13 @@
+@@ -269,13 +269,13 @@
  /*==============*/
        mutex_t*        mutex,          /*!< in: pointer to memory */
  #ifdef UNIV_DEBUG
@@ -450,7 +450,7 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
  {
  #if defined(HAVE_ATOMIC_BUILTINS)
        mutex_reset_lock_word(mutex);
-@@ -274,11 +274,13 @@
+@@ -293,11 +293,13 @@
        mutex->file_name = "not yet reserved";
        mutex->level = level;
  #endif /* UNIV_SYNC_DEBUG */
@@ -465,7 +465,7 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
        mutex->count_using=       0;
        mutex->mutex_type=        0;
        mutex->lspent_time=       0;
-@@ -532,9 +534,9 @@
+@@ -551,9 +553,9 @@
  #ifdef UNIV_SRV_PRINT_LATCH_WAITS
        fprintf(stderr,
                "Thread %lu spin wait mutex at %p"
@@ -477,7 +477,7 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
  #endif
  
        mutex_spin_round_count += i;
-@@ -609,9 +611,9 @@
+@@ -628,9 +630,9 @@
  
  #ifdef UNIV_SRV_PRINT_LATCH_WAITS
        fprintf(stderr,
@@ -489,15 +489,14 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
  #endif
  
        mutex_os_wait_count++;
-@@ -913,9 +915,8 @@
+@@ -878,8 +880,8 @@
  
-                               if (mutex->magic_n == MUTEX_MAGIC_N) {
-                                       fprintf(stderr,
--                                              "Mutex created at %s %lu\n",
--                                              mutex->cfile_name,
--                                              (ulong) mutex->cline);
-+                                              "Mutex '%s'\n",
-+                                              mutex->cmutex_name);
+       if (mutex->magic_n == MUTEX_MAGIC_N) {
+               fprintf(stderr,
+-                      "Mutex created at %s %lu\n",
+-                      mutex->cfile_name, (ulong) mutex->cline);
++                      "Mutex '%s'\n",
++                      mutex->cmutex_name);
  
-                                       if (mutex_get_lock_word(mutex) != 0) {
-                                               const char*     file_name;
+               if (mutex_get_lock_word(mutex) != 0) {
+                       ulint           line;
index 8bcf017338960d77b5d69ab88b53790ee41ee8d2..64463e64024610825e6337078ae448946ba9f85f 100644 (file)
@@ -96,7 +96,7 @@ diff -ruN a/storage/innobase/fil/fil0fil.c b/storage/innobase/fil/fil0fil.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:06:58.727955654 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:07:31.799376984 +0900
-@@ -585,6 +585,8 @@
+@@ -604,6 +604,8 @@
    (char*) &export_vars.innodb_buffer_pool_pages_dirty,          SHOW_LONG},
    {"buffer_pool_pages_flushed",
    (char*) &export_vars.innodb_buffer_pool_pages_flushed,  SHOW_LONG},
@@ -105,7 +105,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    {"buffer_pool_pages_free",
    (char*) &export_vars.innodb_buffer_pool_pages_free,   SHOW_LONG},
  #ifdef UNIV_DEBUG
-@@ -10977,6 +10979,16 @@
+@@ -11050,6 +11052,16 @@
    "Force InnoDB to not use next-key locking, to use only row-level locking.",
    NULL, NULL, FALSE);
  
@@ -122,7 +122,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  #ifdef UNIV_LOG_ARCHIVE
  static MYSQL_SYSVAR_STR(log_arch_dir, innobase_log_arch_dir,
    PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
-@@ -11164,7 +11176,7 @@
+@@ -11237,7 +11249,7 @@
  
  static MYSQL_SYSVAR_STR(version, innodb_version_str,
    PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_READONLY,
@@ -131,7 +131,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  static MYSQL_SYSVAR_BOOL(use_sys_malloc, srv_use_sys_malloc,
    PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
-@@ -11249,6 +11261,8 @@
+@@ -11330,6 +11342,8 @@
    MYSQL_SYSVAR(thread_concurrency),
    MYSQL_SYSVAR(thread_sleep_delay),
    MYSQL_SYSVAR(autoinc_lock_mode),
@@ -196,7 +196,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  /* The sort order table of the MySQL latin1_swedish_ci character set
  collation */
  extern const byte*    srv_latin1_ordering;
-@@ -318,6 +321,8 @@
+@@ -323,6 +326,8 @@
  buffer pool to disk */
  extern ulint srv_buf_pool_flushed;
  
@@ -205,7 +205,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
  /** Number of buffer pool reads that led to the
  reading of a disk page */
  extern ulint srv_buf_pool_reads;
-@@ -699,6 +704,7 @@
+@@ -717,6 +722,7 @@
        ulint innodb_buffer_pool_reads;         /*!< srv_buf_pool_reads */
        ulint innodb_buffer_pool_wait_free;     /*!< srv_buf_pool_wait_free */
        ulint innodb_buffer_pool_pages_flushed; /*!< srv_buf_pool_flushed */
@@ -340,7 +340,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  /** Maximum number of times allowed to conditionally acquire
  mutex before switching to blocking wait on the mutex */
  #define MAX_MUTEX_NOWAIT      20
-@@ -313,6 +317,7 @@
+@@ -318,6 +322,7 @@
  /* variable to count the number of pages that were written from buffer
  pool to the disk */
  UNIV_INTERN ulint srv_buf_pool_flushed = 0;
@@ -348,7 +348,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
  /** Number of buffer pool reads that led to the
  reading of a disk page */
-@@ -1821,6 +1826,13 @@
+@@ -1826,6 +1831,13 @@
        ulint   n_reserved;
        ibool   ret;
  
@@ -362,7 +362,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        mutex_enter(&srv_innodb_monitor_mutex);
  
        current_time = time(NULL);
-@@ -1869,31 +1881,6 @@
+@@ -1874,31 +1886,6 @@
  
        mutex_exit(&dict_foreign_err_mutex);
  
@@ -394,7 +394,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        fputs("--------\n"
              "FILE I/O\n"
              "--------\n", file);
-@@ -1924,10 +1911,84 @@
+@@ -1929,10 +1916,84 @@
              "BUFFER POOL AND MEMORY\n"
              "----------------------\n", file);
        fprintf(file,
@@ -483,7 +483,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        fprintf(file, "Dictionary memory allocated " ULINTPF "\n",
                dict_sys->size);
  
-@@ -1943,6 +2004,16 @@
+@@ -1948,6 +2009,16 @@
        fprintf(file, "%lu read views open inside InnoDB\n",
                UT_LIST_GET_LEN(trx_sys->view_list));
  
@@ -500,7 +500,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        n_reserved = fil_space_get_n_reserved_extents(0);
        if (n_reserved > 0) {
                fprintf(file,
-@@ -1986,6 +2057,31 @@
+@@ -1991,6 +2062,31 @@
        srv_n_rows_deleted_old = srv_n_rows_deleted;
        srv_n_rows_read_old = srv_n_rows_read;
  
@@ -532,7 +532,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        fputs("----------------------------\n"
              "END OF INNODB MONITOR OUTPUT\n"
              "============================\n", file);
-@@ -2029,6 +2125,7 @@
+@@ -2034,6 +2130,7 @@
                = srv_buf_pool_write_requests;
        export_vars.innodb_buffer_pool_wait_free = srv_buf_pool_wait_free;
        export_vars.innodb_buffer_pool_pages_flushed = srv_buf_pool_flushed;
index d35813d9010c90ad4130d0b2a26b033a8ad86d69..286905a41e3fd5fed074e31a61daa7f96c4bd9e7 100644 (file)
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2011-01-21 19:53:42.369599743 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2011-01-21 19:54:44.659599699 +0900
-@@ -619,6 +619,16 @@
+@@ -638,6 +638,16 @@
        trx_t*  trx);   /*!< in: transaction handle */
  
  static SHOW_VAR innodb_status_variables[]= {
@@ -25,7 +25,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    {"buffer_pool_pages_data",
    (char*) &export_vars.innodb_buffer_pool_pages_data,   SHOW_LONG},
    {"buffer_pool_pages_dirty",
-@@ -633,8 +643,14 @@
+@@ -652,8 +662,14 @@
    {"buffer_pool_pages_latched",
    (char*) &export_vars.innodb_buffer_pool_pages_latched,  SHOW_LONG},
  #endif /* UNIV_DEBUG */
@@ -40,7 +40,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    {"buffer_pool_pages_total",
    (char*) &export_vars.innodb_buffer_pool_pages_total,          SHOW_LONG},
    {"buffer_pool_read_ahead",
-@@ -649,6 +665,12 @@
+@@ -668,6 +684,12 @@
    (char*) &export_vars.innodb_buffer_pool_wait_free,    SHOW_LONG},
    {"buffer_pool_write_requests",
    (char*) &export_vars.innodb_buffer_pool_write_requests, SHOW_LONG},
@@ -53,7 +53,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    {"data_fsyncs",
    (char*) &export_vars.innodb_data_fsyncs,              SHOW_LONG},
    {"data_pending_fsyncs",
-@@ -675,12 +697,66 @@
+@@ -694,12 +716,66 @@
    (char*) &export_vars.innodb_dict_tables,              SHOW_LONG},
    {"have_atomic_builtins",
    (char*) &export_vars.innodb_have_atomic_builtins,     SHOW_BOOL},
@@ -120,7 +120,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    {"os_log_fsyncs",
    (char*) &export_vars.innodb_os_log_fsyncs,            SHOW_LONG},
    {"os_log_pending_fsyncs",
-@@ -697,8 +773,14 @@
+@@ -716,8 +792,14 @@
    (char*) &export_vars.innodb_pages_read,               SHOW_LONG},
    {"pages_written",
    (char*) &export_vars.innodb_pages_written,            SHOW_LONG},
@@ -135,7 +135,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
    {"row_lock_time",
    (char*) &export_vars.innodb_row_lock_time,            SHOW_LONGLONG},
    {"row_lock_time_avg",
-@@ -715,8 +797,20 @@
+@@ -734,8 +816,20 @@
    (char*) &export_vars.innodb_rows_read,                SHOW_LONG},
    {"rows_updated",
    (char*) &export_vars.innodb_rows_updated,             SHOW_LONG},
@@ -245,7 +245,7 @@ diff -ruN a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2011-01-21 19:53:42.380638228 +0900
 +++ b/storage/innobase/include/srv0srv.h       2011-01-21 19:54:44.662600032 +0900
-@@ -737,6 +737,11 @@
+@@ -751,6 +751,11 @@
  
  /** Status variables to be passed to MySQL */
  struct export_var_struct{
@@ -257,7 +257,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
        ulint innodb_data_pending_reads;        /*!< Pending reads */
        ulint innodb_data_pending_writes;       /*!< Pending writes */
        ulint innodb_data_pending_fsyncs;       /*!< Pending fsyncs */
-@@ -754,6 +759,9 @@
+@@ -768,6 +773,9 @@
  #ifdef UNIV_DEBUG
        ulint innodb_buffer_pool_pages_latched; /*!< Latched pages */
  #endif /* UNIV_DEBUG */
@@ -267,7 +267,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
        ulint innodb_buffer_pool_read_requests; /*!< buf_pool->stat.n_page_gets */
        ulint innodb_buffer_pool_reads;         /*!< srv_buf_pool_reads */
        ulint innodb_buffer_pool_wait_free;     /*!< srv_buf_pool_wait_free */
-@@ -762,13 +770,43 @@
+@@ -776,13 +784,43 @@
        ulint innodb_buffer_pool_write_requests;/*!< srv_buf_pool_write_requests */
        ulint innodb_buffer_pool_read_ahead;    /*!< srv_read_ahead */
        ulint innodb_buffer_pool_read_ahead_evicted;/*!< srv_read_ahead evicted*/
@@ -311,7 +311,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
        ulint innodb_os_log_written;            /*!< srv_os_log_written */
        ulint innodb_os_log_fsyncs;             /*!< fil_n_log_flushes */
        ulint innodb_os_log_pending_writes;     /*!< srv_os_log_pending_writes */
-@@ -777,6 +815,8 @@
+@@ -791,6 +829,8 @@
        ulint innodb_pages_created;             /*!< buf_pool->stat.n_pages_created */
        ulint innodb_pages_read;                /*!< buf_pool->stat.n_pages_read */
        ulint innodb_pages_written;             /*!< buf_pool->stat.n_pages_written */
@@ -320,7 +320,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
        ulint innodb_row_lock_waits;            /*!< srv_n_lock_wait_count */
        ulint innodb_row_lock_current_waits;    /*!< srv_n_lock_wait_current_count */
        ib_int64_t innodb_row_lock_time;        /*!< srv_n_lock_wait_time
-@@ -786,11 +826,18 @@
+@@ -800,11 +840,18 @@
                                                / srv_n_lock_wait_count */
        ulint innodb_row_lock_time_max;         /*!< srv_n_lock_max_wait_time
                                                / 1000 */
@@ -391,7 +391,7 @@ diff -ruN a/storage/innobase/lock/lock0lock.c b/storage/innobase/lock/lock0lock.
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2011-01-21 19:53:42.390637840 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2011-01-21 19:54:44.673637084 +0900
-@@ -2263,12 +2263,49 @@
+@@ -2267,12 +2267,49 @@
        ulint           LRU_len;
        ulint           free_len;
        ulint           flush_list_len;
@@ -441,7 +441,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        export_vars.innodb_data_pending_reads
                = os_n_pending_reads;
        export_vars.innodb_data_pending_writes
-@@ -2305,6 +2342,92 @@
+@@ -2309,6 +2346,92 @@
  
        export_vars.innodb_buffer_pool_pages_misc
                = buf_pool_get_n_pages() - LRU_len - free_len;
index 1cb8dfcbb07e996a25ad6ab4e94130874df6a6f9..d066de931fc46507590eb0d292584bcdac48f668 100644 (file)
@@ -41,7 +41,7 @@ diff -ruN a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:53:54.615040167 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 16:07:26.851357007 +0900
-@@ -11665,7 +11665,14 @@
+@@ -11746,7 +11746,14 @@
  i_s_innodb_cmp,
  i_s_innodb_cmp_reset,
  i_s_innodb_cmpmem,
index d2a872750352bc277f70b85e56cacff28a3a2daf..2cc9399290814e4561fca42ae92ae0508a4aa860 100644 (file)
@@ -8,7 +8,7 @@
 diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
 --- a/storage/innobase/btr/btr0cur.c   2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/btr/btr0cur.c   2010-12-03 15:48:29.268957148 +0900
-@@ -3935,7 +3935,8 @@
+@@ -4066,7 +4066,8 @@
  
        mtr_commit(mtr);
  
@@ -18,14 +18,13 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
        mutex_enter(&block->mutex);
  
        /* Only free the block if it is still allocated to
-@@ -3946,17 +3947,22 @@
+@@ -4077,16 +4078,21 @@
            && buf_block_get_space(block) == space
            && buf_block_get_page_no(block) == page_no) {
  
--              if (buf_LRU_free_block(&block->page, all, NULL)
-+              if (buf_LRU_free_block(&block->page, all, NULL, TRUE)
-                   != BUF_LRU_FREED
+-              if (buf_LRU_free_block(&block->page, all) != BUF_LRU_FREED
 -                  && all && block->page.zip.data) {
++              if (buf_LRU_free_block(&block->page, all, TRUE) != BUF_LRU_FREED
 +                  && all && block->page.zip.data
 +                  /* Now, buf_LRU_free_block() may release mutex temporarily */
 +                  && buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE
@@ -34,8 +33,8 @@ diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
                        /* Attempt to deallocate the uncompressed page
                        if the whole block cannot be deallocted. */
  
--                      buf_LRU_free_block(&block->page, FALSE, NULL);
-+                      buf_LRU_free_block(&block->page, FALSE, NULL, TRUE);
+-                      buf_LRU_free_block(&block->page, FALSE);
++                      buf_LRU_free_block(&block->page, FALSE, TRUE);
                }
        }
  
@@ -260,7 +259,7 @@ diff -ruN a/storage/innobase/buf/buf0buddy.c b/storage/innobase/buf/buf0buddy.c
 +      if (have_page_hash_mutex) {
 +              rw_lock_x_unlock(&buf_pool->page_hash_latch);
 +      }
-       block = buf_LRU_get_free_block(buf_pool, 0);
+       block = buf_LRU_get_free_block(buf_pool);
        *lru = TRUE;
 -      buf_pool_mutex_enter(buf_pool);
 +      //buf_pool_mutex_enter(buf_pool);
@@ -715,8 +714,8 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
                                buf_LRU_make_block_old(&block->page);
                                dirty++;
--                      } else if (buf_LRU_free_block(&block->page, TRUE, NULL)
-+                      } else if (buf_LRU_free_block(&block->page, TRUE, NULL, TRUE)
+-                      } else if (buf_LRU_free_block(&block->page, TRUE)
++                      } else if (buf_LRU_free_block(&block->page, TRUE, TRUE)
                                   != BUF_LRU_FREED) {
                                nonfree++;
                        }
@@ -1022,7 +1021,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        bpage = buf_page_hash_get(buf_pool, space, offset);
  
-@@ -2257,7 +2337,8 @@
+@@ -2259,7 +2339,8 @@
                bpage->file_page_was_freed = TRUE;
        }
  
@@ -1032,7 +1031,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        return(bpage);
  }
-@@ -2278,7 +2359,8 @@
+@@ -2280,7 +2361,8 @@
        buf_page_t*     bpage;
        buf_pool_t*     buf_pool = buf_pool_get(space, offset);
  
@@ -1042,7 +1041,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        bpage = buf_page_hash_get(buf_pool, space, offset);
  
-@@ -2287,7 +2369,8 @@
+@@ -2289,7 +2371,8 @@
                bpage->file_page_was_freed = FALSE;
        }
  
@@ -1052,7 +1051,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        return(bpage);
  }
-@@ -2322,8 +2405,9 @@
+@@ -2324,8 +2407,9 @@
        buf_pool->stat.n_page_gets++;
  
        for (;;) {
@@ -1063,7 +1062,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                bpage = buf_page_hash_get(buf_pool, space, offset);
                if (bpage) {
                        ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage));
-@@ -2332,7 +2416,8 @@
+@@ -2334,7 +2418,8 @@
  
                /* Page not in buf_pool: needs to be read from file */
  
@@ -1073,7 +1072,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
                buf_read_page(space, zip_size, offset);
  
-@@ -2344,10 +2429,15 @@
+@@ -2346,10 +2431,15 @@
        if (UNIV_UNLIKELY(!bpage->zip.data)) {
                /* There is no compressed page. */
  err_exit:
@@ -1090,7 +1089,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        ut_ad(!buf_pool_watch_is_sentinel(buf_pool, bpage));
  
        switch (buf_page_get_state(bpage)) {
-@@ -2356,19 +2446,19 @@
+@@ -2358,19 +2448,19 @@
        case BUF_BLOCK_MEMORY:
        case BUF_BLOCK_REMOVE_HASH:
        case BUF_BLOCK_ZIP_FREE:
@@ -1110,12 +1109,12 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
 +              ut_a(block_mutex == &((buf_block_t*) bpage)->mutex);
  
                /* Discard the uncompressed page frame if possible. */
--              if (buf_LRU_free_block(bpage, FALSE, NULL)
-+              if (buf_LRU_free_block(bpage, FALSE, NULL, FALSE)
-                   == BUF_LRU_FREED) {
+-              if (buf_LRU_free_block(bpage, FALSE) == BUF_LRU_FREED) {
++              if (buf_LRU_free_block(bpage, FALSE, FALSE) == BUF_LRU_FREED) {
  
                        mutex_exit(block_mutex);
-@@ -2387,7 +2477,7 @@
+                       goto lookup;
+@@ -2388,7 +2478,7 @@
        must_read = buf_page_get_io_fix(bpage) == BUF_IO_READ;
        access_time = buf_page_is_accessed(bpage);
  
@@ -1124,7 +1123,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        mutex_exit(block_mutex);
  
-@@ -2696,7 +2786,7 @@
+@@ -2697,7 +2787,7 @@
        const buf_block_t*      block)          /*!< in: pointer to block,
                                                not dereferenced */
  {
@@ -1133,7 +1132,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
        if (UNIV_UNLIKELY((((ulint) block) % sizeof *block) != 0)) {
                /* The pointer should be aligned. */
-@@ -2732,6 +2822,7 @@
+@@ -2733,6 +2823,7 @@
        ulint           fix_type;
        ibool           must_read;
        ulint           retries = 0;
@@ -1141,7 +1140,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        buf_pool_t*     buf_pool = buf_pool_get(space, offset);
  
        ut_ad(mtr);
-@@ -2754,9 +2845,11 @@
+@@ -2755,9 +2846,11 @@
        fold = buf_page_address_fold(space, offset);
  loop:
        block = guess;
@@ -1154,7 +1153,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                /* If the guess is a compressed page descriptor that
                has been allocated by buf_buddy_alloc(), it may have
                been invalidated by buf_buddy_relocate().  In that
-@@ -2765,11 +2858,15 @@
+@@ -2766,11 +2859,15 @@
                the guess may be pointing to a buffer pool chunk that
                has been released when resizing the buffer pool. */
  
@@ -1171,7 +1170,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                        block = guess = NULL;
                } else {
                        ut_ad(!block->page.in_zip_hash);
-@@ -2778,12 +2875,19 @@
+@@ -2779,12 +2876,19 @@
        }
  
        if (block == NULL) {
@@ -1191,7 +1190,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                block = NULL;
        }
  
-@@ -2795,12 +2899,14 @@
+@@ -2796,12 +2900,14 @@
                                space, offset, fold);
  
                        if (UNIV_LIKELY_NULL(block)) {
@@ -1208,7 +1207,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
                if (mode == BUF_GET_IF_IN_POOL
                    || mode == BUF_GET_IF_IN_POOL_OR_WATCH) {
-@@ -2848,7 +2954,8 @@
+@@ -2849,7 +2955,8 @@
                /* The page is being read to buffer pool,
                but we cannot wait around for the read to
                complete. */
@@ -1218,7 +1217,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
                return(NULL);
        }
-@@ -2858,38 +2965,49 @@
+@@ -2859,38 +2966,49 @@
                ibool           success;
  
        case BUF_BLOCK_FILE_PAGE:
@@ -1262,7 +1261,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
 +              //mutex_exit(&buf_pool->zip_mutex);
 +              mutex_exit(block_mutex);
  
-               block = buf_LRU_get_free_block(buf_pool, 0);
+               block = buf_LRU_get_free_block(buf_pool);
                ut_a(block);
 +              block_mutex = &block->mutex;
  
@@ -1275,7 +1274,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
                {
                        buf_page_t*     hash_bpage;
-@@ -2902,35 +3020,47 @@
+@@ -2903,35 +3021,47 @@
                                while buf_pool->mutex was released.
                                Free the block that was allocated. */
  
@@ -1329,7 +1328,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                buf_block_init_low(block);
                block->lock_hash_val = lock_rec_hash(space, offset);
  
-@@ -2939,7 +3069,7 @@
+@@ -2940,7 +3070,7 @@
  
                if (buf_page_get_state(&block->page)
                    == BUF_BLOCK_ZIP_PAGE) {
@@ -1338,7 +1337,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                                       &block->page);
                        ut_ad(!block->page.in_flush_list);
                } else {
-@@ -2956,19 +3086,24 @@
+@@ -2957,19 +3087,24 @@
                /* Insert at the front of unzip_LRU list */
                buf_unzip_LRU_add_block(block, FALSE);
  
@@ -1366,7 +1365,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  
                /* Decompress the page and apply buffered operations
                while not holding buf_pool->mutex or block->mutex. */
-@@ -2981,12 +3116,15 @@
+@@ -2982,12 +3117,15 @@
                }
  
                /* Unfix and unlatch the block. */
@@ -1385,7 +1384,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
                rw_lock_x_unlock(&block->lock);
  
                break;
-@@ -3002,7 +3140,7 @@
+@@ -3003,7 +3141,7 @@
  
        ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
  
@@ -1394,15 +1393,15 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
  #if UNIV_WORD_SIZE == 4
        /* On 32-bit systems, there is no padding in buf_page_t.  On
        other systems, Valgrind could complain about uninitialized pad
-@@ -3015,7 +3153,7 @@
+@@ -3016,7 +3154,7 @@
                /* Try to evict the block from the buffer pool, to use the
                insert buffer (change buffer) as much as possible. */
  
--              if (buf_LRU_free_block(&block->page, TRUE, NULL)
-+              if (buf_LRU_free_block(&block->page, TRUE, NULL, FALSE)
-                   == BUF_LRU_FREED) {
+-              if (buf_LRU_free_block(&block->page, TRUE) == BUF_LRU_FREED) {
++              if (buf_LRU_free_block(&block->page, TRUE, FALSE) == BUF_LRU_FREED) {
                        mutex_exit(&block->mutex);
                        if (mode == BUF_GET_IF_IN_POOL_OR_WATCH) {
+                               /* Set the watch, as it would have
 @@ -3052,13 +3190,14 @@
  
        buf_block_buf_fix_inc(block, file, line);
@@ -1628,7 +1627,7 @@ diff -ruN a/storage/innobase/buf/buf0buf.c b/storage/innobase/buf/buf0buf.c
        block = (buf_block_t*) buf_page_hash_get_low(
                buf_pool, space, offset, fold);
 @@ -3816,7 +3991,9 @@
- #endif /* UNIV_DEBUG_FILE_ACCESSES */
+ #endif /* UNIV_DEBUG_FILE_ACCESSES || UNIV_DEBUG */
  
                /* Page can be found in buf_pool */
 -              buf_pool_mutex_exit(buf_pool);
@@ -2584,8 +2583,8 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
                ut_ad(block->page.in_LRU_list);
  
 -              mutex_enter(&block->mutex);
--              freed = buf_LRU_free_block(&block->page, FALSE, NULL);
-+              freed = buf_LRU_free_block(&block->page, FALSE, NULL, have_LRU_mutex);
+-              freed = buf_LRU_free_block(&block->page, FALSE);
++              freed = buf_LRU_free_block(&block->page, FALSE, have_LRU_mutex);
                mutex_exit(&block->mutex);
  
                switch (freed) {
@@ -2637,8 +2636,8 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
 -              mutex_enter(block_mutex);
                accessed = buf_page_is_accessed(bpage);
--              freed = buf_LRU_free_block(bpage, TRUE, NULL);
-+              freed = buf_LRU_free_block(bpage, TRUE, NULL, have_LRU_mutex);
+-              freed = buf_LRU_free_block(bpage, TRUE);
++              freed = buf_LRU_free_block(bpage, TRUE, have_LRU_mutex);
                mutex_exit(block_mutex);
  
                switch (freed) {
@@ -2733,7 +2732,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        }
  
        return(block);
-@@ -868,7 +940,7 @@
+@@ -866,7 +938,7 @@
        ibool           mon_value_was   = FALSE;
        ibool           started_monitor = FALSE;
  loop:
@@ -2742,37 +2741,16 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free)
            + UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->curr_size / 20) {
-@@ -951,8 +1023,10 @@
-                       ibool   lru;
-                       page_zip_set_size(&block->page.zip, zip_size);
-+                      mutex_enter(&buf_pool->LRU_list_mutex);
-                       block->page.zip.data = buf_buddy_alloc(
--                              buf_pool, zip_size, &lru);
-+                              buf_pool, zip_size, &lru, FALSE);
-+                      mutex_exit(&buf_pool->LRU_list_mutex);
-                       UNIV_MEM_DESC(block->page.zip.data, zip_size, block);
-               } else {
-@@ -960,7 +1034,7 @@
-                       block->page.zip.data = NULL;
-               }
--              buf_pool_mutex_exit(buf_pool);
-+              //buf_pool_mutex_exit(buf_pool);
-               if (started_monitor) {
-                       srv_print_innodb_monitor = mon_value_was;
-@@ -972,7 +1046,7 @@
-       /* If no block was in the free list, search from the end of the LRU
-       list and try to free a block there */
+@@ -934,7 +1006,7 @@
  
+       /* If there is a block in the free list, take it */
+       block = buf_LRU_get_free_only(buf_pool);
 -      buf_pool_mutex_exit(buf_pool);
 +      //buf_pool_mutex_exit(buf_pool);
  
-       freed = buf_LRU_search_and_free_block(buf_pool, n_iterations);
-@@ -1058,7 +1132,8 @@
+       if (block) {
+               ut_ad(buf_pool_from_block(block) == buf_pool);
+@@ -1034,7 +1106,8 @@
        ulint   new_len;
  
        ut_a(buf_pool->LRU_old);
@@ -2782,7 +2760,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        ut_ad(buf_pool->LRU_old_ratio >= BUF_LRU_OLD_RATIO_MIN);
        ut_ad(buf_pool->LRU_old_ratio <= BUF_LRU_OLD_RATIO_MAX);
  #if BUF_LRU_OLD_RATIO_MIN * BUF_LRU_OLD_MIN_LEN <= BUF_LRU_OLD_RATIO_DIV * (BUF_LRU_OLD_TOLERANCE + 5)
-@@ -1124,7 +1199,8 @@
+@@ -1100,7 +1173,8 @@
  {
        buf_page_t*     bpage;
  
@@ -2792,7 +2770,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == BUF_LRU_OLD_MIN_LEN);
  
        /* We first initialize all blocks in the LRU list as old and then use
-@@ -1159,13 +1235,14 @@
+@@ -1135,13 +1209,14 @@
        ut_ad(buf_pool);
        ut_ad(bpage);
        ut_ad(buf_page_in_file(bpage));
@@ -2809,7 +2787,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
                UT_LIST_REMOVE(unzip_LRU, buf_pool->unzip_LRU, block);
        }
-@@ -1183,7 +1260,8 @@
+@@ -1159,7 +1234,8 @@
  
        ut_ad(buf_pool);
        ut_ad(bpage);
@@ -2819,7 +2797,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        ut_a(buf_page_in_file(bpage));
  
-@@ -1260,12 +1338,13 @@
+@@ -1236,12 +1312,13 @@
  
        ut_ad(buf_pool);
        ut_ad(block);
@@ -2835,7 +2813,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        if (old) {
                UT_LIST_ADD_LAST(unzip_LRU, buf_pool->unzip_LRU, block);
-@@ -1286,7 +1365,8 @@
+@@ -1262,7 +1339,8 @@
  
        ut_ad(buf_pool);
        ut_ad(bpage);
@@ -2845,7 +2823,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        ut_a(buf_page_in_file(bpage));
  
-@@ -1337,7 +1417,8 @@
+@@ -1313,7 +1391,8 @@
  
        ut_ad(buf_pool);
        ut_ad(bpage);
@@ -2855,7 +2833,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        ut_a(buf_page_in_file(bpage));
        ut_ad(!bpage->in_LRU_list);
-@@ -1416,7 +1497,8 @@
+@@ -1392,7 +1471,8 @@
  {
        buf_pool_t*     buf_pool = buf_pool_from_bpage(bpage);
  
@@ -2865,15 +2843,13 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        if (bpage->old) {
                buf_pool->stat.n_pages_made_young++;
-@@ -1458,19 +1540,20 @@
+@@ -1432,17 +1512,18 @@
+ buf_LRU_free_block(
+ /*===============*/
        buf_page_t*     bpage,  /*!< in: block to be freed */
-       ibool           zip,    /*!< in: TRUE if should remove also the
+-      ibool           zip)    /*!< in: TRUE if should remove also the
++      ibool           zip,    /*!< in: TRUE if should remove also the
                                compressed page of an uncompressed page */
--      ibool*          buf_pool_mutex_released)
-+      ibool*          buf_pool_mutex_released,
-                               /*!< in: pointer to a variable that will
-                               be assigned TRUE if buf_pool_mutex
-                               was temporarily released, or NULL */
 +      ibool           have_LRU_mutex)
  {
        buf_page_t*     b = NULL;
@@ -2889,7 +2865,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        ut_ad(!bpage->in_flush_list == !bpage->oldest_modification);
  #if UNIV_WORD_SIZE == 4
        /* On 32-bit systems, there is no padding in buf_page_t.  On
-@@ -1479,7 +1562,7 @@
+@@ -1451,7 +1532,7 @@
        UNIV_MEM_ASSERT_RW(bpage, sizeof *bpage);
  #endif
  
@@ -2898,7 +2874,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
                /* Do not free buffer-fixed or I/O-fixed blocks. */
                return(BUF_LRU_NOT_FREED);
-@@ -1511,15 +1594,15 @@
+@@ -1483,15 +1564,15 @@
                If it cannot be allocated (without freeing a block
                from the LRU list), refuse to free bpage. */
  alloc:
@@ -2918,7 +2894,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        }
  
  #ifdef UNIV_DEBUG
-@@ -1530,6 +1613,39 @@
+@@ -1502,6 +1583,39 @@
        }
  #endif /* UNIV_DEBUG */
  
@@ -2958,7 +2934,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        if (buf_LRU_block_remove_hashed_page(bpage, zip)
            != BUF_BLOCK_ZIP_FREE) {
                ut_a(bpage->buf_fix_count == 0);
-@@ -1546,6 +1662,10 @@
+@@ -1518,6 +1632,10 @@
  
                        ut_a(!hash_b);
  
@@ -2969,8 +2945,8 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
                        b->state = b->oldest_modification
                                ? BUF_BLOCK_ZIP_DIRTY
                                : BUF_BLOCK_ZIP_PAGE;
-@@ -1642,7 +1762,9 @@
-                       *buf_pool_mutex_released = TRUE;
+@@ -1610,7 +1728,9 @@
+                       b->io_fix = BUF_IO_READ;
                }
  
 -              buf_pool_mutex_exit(buf_pool);
@@ -2980,7 +2956,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
                mutex_exit(block_mutex);
  
                /* Remove possible adaptive hash index on the page.
-@@ -1674,7 +1796,9 @@
+@@ -1642,7 +1762,9 @@
                                : BUF_NO_CHECKSUM_MAGIC);
                }
  
@@ -2991,7 +2967,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
                mutex_enter(block_mutex);
  
                if (b) {
-@@ -1684,13 +1808,17 @@
+@@ -1652,13 +1774,17 @@
                        mutex_exit(&buf_pool->zip_mutex);
                }
  
@@ -3010,7 +2986,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        }
  
        return(BUF_LRU_FREED);
-@@ -1702,13 +1830,14 @@
+@@ -1670,13 +1796,14 @@
  void
  buf_LRU_block_free_non_file_page(
  /*=============================*/
@@ -3027,7 +3003,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        ut_ad(mutex_own(&block->mutex));
  
        switch (buf_block_get_state(block)) {
-@@ -1742,18 +1871,21 @@
+@@ -1710,18 +1837,21 @@
        if (data) {
                block->page.zip.data = NULL;
                mutex_exit(&block->mutex);
@@ -3053,7 +3029,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        UNIV_MEM_ASSERT_AND_FREE(block->frame, UNIV_PAGE_SIZE);
  }
-@@ -1783,7 +1915,11 @@
+@@ -1751,7 +1881,11 @@
        buf_pool_t*             buf_pool = buf_pool_from_bpage(bpage);
  
        ut_ad(bpage);
@@ -3066,7 +3042,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        ut_ad(mutex_own(buf_page_get_mutex(bpage)));
  
        ut_a(buf_page_get_io_fix(bpage) == BUF_IO_NONE);
-@@ -1891,7 +2027,9 @@
+@@ -1859,7 +1993,9 @@
  
  #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
                mutex_exit(buf_page_get_mutex(bpage));
@@ -3077,7 +3053,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
                buf_print();
                buf_LRU_print();
                buf_validate();
-@@ -1912,17 +2050,17 @@
+@@ -1880,17 +2016,17 @@
                ut_a(bpage->zip.data);
                ut_a(buf_page_get_zip_size(bpage));
  
@@ -3100,7 +3076,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
                UNIV_MEM_UNDESC(bpage);
                return(BUF_BLOCK_ZIP_FREE);
-@@ -1945,13 +2083,13 @@
+@@ -1913,13 +2049,13 @@
                        ut_ad(!bpage->in_flush_list);
                        ut_ad(!bpage->in_LRU_list);
                        mutex_exit(&((buf_block_t*) bpage)->mutex);
@@ -3117,7 +3093,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
                        mutex_enter(&((buf_block_t*) bpage)->mutex);
                        page_zip_set_size(&bpage->zip, 0);
                }
-@@ -1977,18 +2115,19 @@
+@@ -1945,18 +2081,19 @@
  void
  buf_LRU_block_free_hashed_page(
  /*===========================*/
@@ -3141,7 +3117,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  }
  
  /**********************************************************************//**
-@@ -2015,7 +2154,8 @@
+@@ -1983,7 +2120,8 @@
        }
  
        if (adjust) {
@@ -3151,7 +3127,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
                if (ratio != buf_pool->LRU_old_ratio) {
                        buf_pool->LRU_old_ratio = ratio;
-@@ -2027,7 +2167,8 @@
+@@ -1995,7 +2133,8 @@
                        }
                }
  
@@ -3161,7 +3137,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        } else {
                buf_pool->LRU_old_ratio = ratio;
        }
-@@ -2132,7 +2273,8 @@
+@@ -2100,7 +2239,8 @@
        ulint           new_len;
  
        ut_ad(buf_pool);
@@ -3171,7 +3147,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        if (UT_LIST_GET_LEN(buf_pool->LRU) >= BUF_LRU_OLD_MIN_LEN) {
  
-@@ -2193,16 +2335,22 @@
+@@ -2161,16 +2301,22 @@
  
        ut_a(buf_pool->LRU_old_len == old_len);
  
@@ -3196,7 +3172,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
        UT_LIST_VALIDATE(unzip_LRU, buf_block_t, buf_pool->unzip_LRU,
                         ut_ad(ut_list_node_313->in_unzip_LRU_list
                               && ut_list_node_313->page.in_LRU_list));
-@@ -2216,7 +2364,8 @@
+@@ -2184,7 +2330,8 @@
                ut_a(buf_page_belongs_to_unzip_LRU(&block->page));
        }
  
@@ -3206,7 +3182,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  }
  
  /**********************************************************************//**
-@@ -2252,7 +2401,8 @@
+@@ -2220,7 +2367,8 @@
        const buf_page_t*       bpage;
  
        ut_ad(buf_pool);
@@ -3216,7 +3192,7 @@ diff -ruN a/storage/innobase/buf/buf0lru.c b/storage/innobase/buf/buf0lru.c
  
        bpage = UT_LIST_GET_FIRST(buf_pool->LRU);
  
-@@ -2309,7 +2459,8 @@
+@@ -2277,7 +2425,8 @@
                bpage = UT_LIST_GET_NEXT(LRU, bpage);
        }
  
@@ -3278,7 +3254,7 @@ diff -ruN a/storage/innobase/buf/buf0rea.c b/storage/innobase/buf/buf0rea.c
 diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
 --- a/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:48:03.048955897 +0900
 +++ b/storage/innobase/handler/ha_innodb.cc    2010-12-03 15:48:29.304024564 +0900
-@@ -245,6 +245,10 @@
+@@ -264,6 +264,10 @@
  #  endif /* !PFS_SKIP_BUFFER_MUTEX_RWLOCK */
        {&buf_pool_mutex_key, "buf_pool_mutex", 0},
        {&buf_pool_zip_mutex_key, "buf_pool_zip_mutex", 0},
@@ -3289,7 +3265,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        {&cache_last_read_mutex_key, "cache_last_read_mutex", 0},
        {&dict_foreign_err_mutex_key, "dict_foreign_err_mutex", 0},
        {&dict_sys_mutex_key, "dict_sys_mutex", 0},
-@@ -295,6 +299,7 @@
+@@ -314,6 +318,7 @@
        {&archive_lock_key, "archive_lock", 0},
  #  endif /* UNIV_LOG_ARCHIVE */
        {&btr_search_latch_key, "btr_search_latch", 0},
@@ -3323,7 +3299,7 @@ diff -ruN a/storage/innobase/handler/i_s.cc b/storage/innobase/handler/i_s.cc
 diff -ruN a/storage/innobase/ibuf/ibuf0ibuf.c b/storage/innobase/ibuf/ibuf0ibuf.c
 --- a/storage/innobase/ibuf/ibuf0ibuf.c        2010-12-03 15:48:03.068954202 +0900
 +++ b/storage/innobase/ibuf/ibuf0ibuf.c        2010-12-03 15:48:29.335988682 +0900
-@@ -3783,9 +3783,11 @@
+@@ -3766,9 +3766,11 @@
                ulint           fold = buf_page_address_fold(space, page_no);
                buf_pool_t*     buf_pool = buf_pool_get(space, page_no);
  
@@ -3774,20 +3750,18 @@ diff -ruN a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0b
 diff -ruN a/storage/innobase/include/buf0lru.h b/storage/innobase/include/buf0lru.h
 --- a/storage/innobase/include/buf0lru.h       2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/include/buf0lru.h       2010-12-03 15:48:29.349024701 +0900
-@@ -113,10 +113,11 @@
+@@ -111,8 +111,9 @@
+ buf_LRU_free_block(
+ /*===============*/
        buf_page_t*     bpage,  /*!< in: block to be freed */
-       ibool           zip,    /*!< in: TRUE if should remove also the
+-      ibool           zip)    /*!< in: TRUE if should remove also the
++      ibool           zip,    /*!< in: TRUE if should remove also the
                                compressed page of an uncompressed page */
--      ibool*          buf_pool_mutex_released);
-+      ibool*          buf_pool_mutex_released,
-                               /*!< in: pointer to a variable that will
-                               be assigned TRUE if buf_pool->mutex
-                               was temporarily released, or NULL */
-+      ibool           have_LRU_mutex);
++      ibool           have_LRU_mutex)
+       __attribute__((nonnull));
  /******************************************************************//**
  Try to free a replaceable block.
- @return       TRUE if found and freed */
-@@ -163,7 +164,8 @@
+@@ -159,7 +160,8 @@
  void
  buf_LRU_block_free_non_file_page(
  /*=============================*/
@@ -3858,7 +3832,7 @@ diff -ruN a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-03 15:48:03.080956216 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-03 15:48:29.355023766 +0900
-@@ -3094,7 +3094,7 @@
+@@ -3099,7 +3099,7 @@
                                                                level += log_sys->max_checkpoint_age
                                                                         - (lsn - oldest_modification);
                                                        }
@@ -3867,7 +3841,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
                                                        n_blocks++;
                                                }
  
-@@ -3180,7 +3180,7 @@
+@@ -3185,7 +3185,7 @@
                                                        found = TRUE;
                                                        break;
                                                }
@@ -3879,7 +3853,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
 --- a/storage/innobase/sync/sync0sync.c        2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/sync/sync0sync.c        2010-12-03 15:48:29.358023890 +0900
-@@ -265,7 +265,7 @@
+@@ -284,7 +284,7 @@
        mutex->lock_word = 0;
  #endif
        mutex->event = os_event_create(NULL);
@@ -3888,7 +3862,7 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
  #ifdef UNIV_DEBUG
        mutex->magic_n = MUTEX_MAGIC_N;
  #endif /* UNIV_DEBUG */
-@@ -444,6 +444,15 @@
+@@ -463,6 +463,15 @@
        mutex_t*        mutex,  /*!< in: mutex */
        ulint           n)      /*!< in: value to set */
  {
@@ -3904,7 +3878,7 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
        volatile ulint* ptr;            /* declared volatile to ensure that
                                        the value is stored to memory */
        ut_ad(mutex);
-@@ -452,6 +461,7 @@
+@@ -471,6 +480,7 @@
  
        *ptr = n;               /* Here we assume that the write of a single
                                word in memory is atomic */
@@ -3912,7 +3886,7 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
  }
  
  /******************************************************************//**
-@@ -1193,7 +1203,12 @@
+@@ -1185,7 +1195,12 @@
                        ut_error;
                }
                break;
@@ -3925,7 +3899,7 @@ diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.
        case SYNC_BUF_POOL:
                /* We can have multiple mutexes of this type therefore we
                can only check whether the greater than condition holds. */
-@@ -1211,7 +1226,8 @@
+@@ -1203,7 +1218,8 @@
                buffer block (block->mutex or buf_pool->zip_mutex). */
                if (!sync_thread_levels_g(array, level, FALSE)) {
                        ut_a(sync_thread_levels_g(array, level - 1, TRUE));
index 70af576ce0cf2a25fba1f70f5d6e944bfc462866..5192d11d8ed29317c2b56e8d4ecfa66b23b4ec60 100644 (file)
@@ -5,400 +5,6 @@
 #!!! notice !!!
 # Any small change to this file in the main branch
 # should be done or reviewed by the maintainer!
-diff -ruN a/storage/innobase/btr/btr0cur.c b/storage/innobase/btr/btr0cur.c
---- a/storage/innobase/btr/btr0cur.c   2010-12-03 15:49:59.165212710 +0900
-+++ b/storage/innobase/btr/btr0cur.c   2010-12-03 17:19:24.834126874 +0900
-@@ -1010,6 +1010,107 @@
-       }
- }
-+/**********************************************************************//**
-+Positions a cursor at a randomly chosen position within a B-tree
-+after the given path
-+@return TRUE if the position is at the first page, and cursor must point
-+        the first record for used by the caller.*/
-+UNIV_INTERN
-+ibool
-+btr_cur_open_at_rnd_pos_after_path(
-+/*====================*/
-+      dict_index_t*   index,          /*!< in: index */
-+      ulint           latch_mode,     /*!< in: BTR_SEARCH_LEAF, ... */
-+      btr_path_t*     first_rec_path,
-+      btr_cur_t*      cursor,         /*!< in/out: B-tree cursor */
-+      mtr_t*          mtr)            /*!< in: mtr */
-+{
-+      page_cur_t*     page_cursor;
-+      btr_path_t*     slot;
-+      ibool           is_first_rec    = TRUE;
-+      ulint           page_no;
-+      ulint           space;
-+      ulint           zip_size;
-+      ulint           height;
-+      rec_t*          node_ptr;
-+      mem_heap_t*     heap            = NULL;
-+      ulint           offsets_[REC_OFFS_NORMAL_SIZE];
-+      ulint*          offsets         = offsets_;
-+      rec_offs_init(offsets_);
-+
-+      if (latch_mode == BTR_MODIFY_TREE) {
-+              mtr_x_lock(dict_index_get_lock(index), mtr);
-+      } else {
-+              mtr_s_lock(dict_index_get_lock(index), mtr);
-+      }
-+
-+      page_cursor = btr_cur_get_page_cur(cursor);
-+      cursor->index = index;
-+
-+      space = dict_index_get_space(index);
-+      zip_size = dict_table_zip_size(index->table);
-+      page_no = dict_index_get_page(index);
-+
-+      height = ULINT_UNDEFINED;
-+      slot = first_rec_path;
-+
-+      for (;;) {
-+              buf_block_t*    block;
-+              page_t*         page;
-+
-+              block = buf_page_get_gen(space, zip_size, page_no,
-+                                       RW_NO_LATCH, NULL, BUF_GET,
-+                                       __FILE__, __LINE__, mtr);
-+              page = buf_block_get_frame(block);
-+              ut_ad(index->id == btr_page_get_index_id(page));
-+
-+              if (height == ULINT_UNDEFINED) {
-+                      /* We are in the root node */
-+
-+                      height = btr_page_get_level(page, mtr);
-+              }
-+
-+              if (height == 0) {
-+                      btr_cur_latch_leaves(page, space, zip_size, page_no,
-+                                           latch_mode, cursor, mtr);
-+              }
-+
-+              if (is_first_rec && slot->nth_rec != ULINT_UNDEFINED) {
-+                      if (height == 0) {
-+                              /* must open the first rec */
-+                              page_cur_open_on_nth_user_rec(block, page_cursor, slot->nth_rec);
-+                      } else {
-+                              is_first_rec = page_cur_open_on_rnd_user_rec_after_nth(block,
-+                                                              page_cursor, slot->nth_rec);
-+                      }
-+              } else {
-+                      is_first_rec = FALSE;
-+                      page_cur_open_on_rnd_user_rec(block, page_cursor);
-+              }
-+
-+              if (height == 0) {
-+                      break;
-+              }
-+
-+              ut_ad(height > 0);
-+
-+              height--;
-+              slot++;
-+
-+              node_ptr = page_cur_get_rec(page_cursor);
-+              offsets = rec_get_offsets(node_ptr, cursor->index, offsets,
-+                                        ULINT_UNDEFINED, &heap);
-+              /* Go to the child node */
-+              page_no = btr_node_ptr_get_child_page_no(node_ptr, offsets);
-+      }
-+
-+      if (UNIV_LIKELY_NULL(heap)) {
-+              mem_heap_free(heap);
-+      }
-+
-+      return (is_first_rec);
-+}
-+
- /*==================== B-TREE INSERT =========================*/
- /*************************************************************//**
-@@ -3479,6 +3580,154 @@
- }
- /*******************************************************************//**
-+Estimates the number of pages which have not null value of the key of n_cols.
-+@return       estimated number of pages */
-+UNIV_INTERN
-+ulint
-+btr_estimate_n_pages_not_null(
-+/*=========================*/
-+      dict_index_t*   index,  /*!< in: index */
-+      ulint           n_cols, /*!< in: The cols should be not null */
-+      btr_path_t*     path1)  /*!< in: path1[BTR_PATH_ARRAY_N_SLOTS] */
-+{
-+      dtuple_t*       tuple1;
-+      btr_path_t      path2[BTR_PATH_ARRAY_N_SLOTS];
-+      btr_cur_t       cursor;
-+      btr_path_t*     slot1;
-+      btr_path_t*     slot2;
-+      ibool           diverged;
-+      ibool           diverged_lot;
-+      ulint           divergence_level;
-+      ulint           n_pages;
-+      ulint           i;
-+      mtr_t           mtr;
-+      mem_heap_t*     heap;
-+
-+      heap = mem_heap_create(n_cols * sizeof(dfield_t)
-+                              + sizeof(dtuple_t));
-+
-+      /* make tuple1 (NULL,NULL,,,) from n_cols */
-+      tuple1 = dtuple_create(heap, n_cols);
-+      dict_index_copy_types(tuple1, index, n_cols);
-+
-+      for (i = 0; i < n_cols; i++) {
-+              dfield_set_null(dtuple_get_nth_field(tuple1, i));
-+      }
-+
-+      mtr_start(&mtr);
-+
-+      cursor.path_arr = path1;
-+
-+      btr_cur_search_to_nth_level(index, 0, tuple1, PAGE_CUR_G,
-+                                  BTR_SEARCH_LEAF | BTR_ESTIMATE,
-+                                  &cursor, 0, __FILE__, __LINE__, &mtr);
-+
-+      mtr_commit(&mtr);
-+
-+
-+
-+      mtr_start(&mtr);
-+
-+      cursor.path_arr = path2;
-+
-+      btr_cur_open_at_index_side(FALSE, index,
-+                                 BTR_SEARCH_LEAF | BTR_ESTIMATE,
-+                                 &cursor, &mtr);
-+
-+      mtr_commit(&mtr);
-+
-+      mem_heap_free(heap);
-+
-+      /* We have the path information for the range in path1 and path2 */
-+
-+      n_pages = 1;
-+      diverged = FALSE;           /* This becomes true when the path is not
-+                                  the same any more */
-+      diverged_lot = FALSE;       /* This becomes true when the paths are
-+                                  not the same or adjacent any more */
-+      divergence_level = 1000000; /* This is the level where paths diverged
-+                                  a lot */
-+      for (i = 0; ; i++) {
-+              ut_ad(i < BTR_PATH_ARRAY_N_SLOTS);
-+
-+              slot1 = path1 + i;
-+              slot2 = path2 + i;
-+
-+              if ((slot1 + 1)->nth_rec == ULINT_UNDEFINED
-+                  || (slot2 + 1)->nth_rec == ULINT_UNDEFINED) {
-+
-+                      if (i > divergence_level + 1) {
-+                              /* In trees whose height is > 1 our algorithm
-+                              tends to underestimate: multiply the estimate
-+                              by 2: */
-+
-+                              n_pages = n_pages * 2;
-+                      }
-+
-+                      /* Do not estimate the number of rows in the range
-+                      to over 1 / 2 of the estimated rows in the whole
-+                      table */
-+
-+                      if (n_pages > index->stat_n_leaf_pages / 2) {
-+                              n_pages = index->stat_n_leaf_pages / 2;
-+
-+                              /* If there are just 0 or 1 rows in the table,
-+                              then we estimate all rows are in the range */
-+
-+                              if (n_pages == 0) {
-+                                      n_pages = index->stat_n_leaf_pages;
-+                              }
-+                      }
-+
-+                      return(n_pages);
-+              }
-+
-+              if (!diverged && slot1->nth_rec != slot2->nth_rec) {
-+
-+                      diverged = TRUE;
-+
-+                      if (slot1->nth_rec < slot2->nth_rec) {
-+                              n_pages = slot2->nth_rec - slot1->nth_rec;
-+
-+                              if (n_pages > 1) {
-+                                      diverged_lot = TRUE;
-+                                      divergence_level = i;
-+                              }
-+                      } else {
-+                              /* Maybe the tree has changed between
-+                              searches */
-+
-+                              return(10);
-+                      }
-+
-+              } else if (diverged && !diverged_lot) {
-+
-+                      if (slot1->nth_rec < slot1->n_recs
-+                          || slot2->nth_rec > 1) {
-+
-+                              diverged_lot = TRUE;
-+                              divergence_level = i;
-+
-+                              n_pages = 0;
-+
-+                              if (slot1->nth_rec < slot1->n_recs) {
-+                                      n_pages += slot1->n_recs
-+                                              - slot1->nth_rec;
-+                              }
-+
-+                              if (slot2->nth_rec > 1) {
-+                                      n_pages += slot2->nth_rec - 1;
-+                              }
-+                      }
-+              } else if (diverged_lot) {
-+
-+                      n_pages = (n_pages * (slot1->n_recs + slot2->n_recs))
-+                              / 2;
-+              }
-+      }
-+}
-+
-+/*******************************************************************//**
- Estimates the number of different key values in a given index, for
- each n-column prefix of the index where n <= dict_index_get_n_unique(index).
- The estimates are stored in the array index->stat_n_diff_key_vals. */
-@@ -3507,18 +3756,38 @@
-       ulint           offsets_next_rec_[REC_OFFS_NORMAL_SIZE];
-       ulint*          offsets_rec     = offsets_rec_;
-       ulint*          offsets_next_rec= offsets_next_rec_;
-+      ulint           stats_method    = srv_stats_method;
-+      btr_path_t      first_rec_path[BTR_PATH_ARRAY_N_SLOTS];
-+      ulint           effective_pages; /* effective leaf pages */
-       rec_offs_init(offsets_rec_);
-       rec_offs_init(offsets_next_rec_);
-       n_cols = dict_index_get_n_unique(index);
-+      if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS) {
-+              /* estimate effective pages and path for the first effective record */
-+              /* TODO: make it work also for n_cols > 1. */
-+              effective_pages = btr_estimate_n_pages_not_null(index, 1 /*k*/, first_rec_path);
-+
-+              if (!effective_pages) {
-+                      for (j = 0; j <= n_cols; j++) {
-+                              index->stat_n_diff_key_vals[j] = (ib_int64_t)index->stat_n_leaf_pages;
-+                      }
-+                      return;
-+              } else if (effective_pages > index->stat_n_leaf_pages) {
-+                      effective_pages = index->stat_n_leaf_pages;
-+              }
-+      } else {
-+              effective_pages = index->stat_n_leaf_pages;
-+      }
-+
-       n_diff = mem_zalloc((n_cols + 1) * sizeof(ib_int64_t));
-       /* It makes no sense to test more pages than are contained
-       in the index, thus we lower the number if it is too high */
--      if (srv_stats_sample_pages > index->stat_index_size) {
--              if (index->stat_index_size > 0) {
--                      n_sample_pages = index->stat_index_size;
-+      if (srv_stats_sample_pages > effective_pages) {
-+              if (effective_pages > 0) {
-+                      n_sample_pages = effective_pages;
-               } else {
-                       n_sample_pages = 1;
-               }
-@@ -3530,9 +3799,15 @@
-       for (i = 0; i < n_sample_pages; i++) {
-               rec_t*  supremum;
-+              ibool   is_first_page = TRUE;
-               mtr_start(&mtr);
-+              if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS) {
-+                      is_first_page = btr_cur_open_at_rnd_pos_after_path(index, BTR_SEARCH_LEAF,
-+                                                                      first_rec_path, &cursor, &mtr);
-+              } else {
-               btr_cur_open_at_rnd_pos(index, BTR_SEARCH_LEAF, &cursor, &mtr);
-+              }
-               /* Count the number of different key values for each prefix of
-               the key on this index page. If the prefix does not determine
-@@ -3543,7 +3818,13 @@
-               page = btr_cur_get_page(&cursor);
-               supremum = page_get_supremum_rec(page);
-+              if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS && is_first_page) {
-+                      /* the cursor should be the first record of the page. */
-+                      /* Counting should be started from here. */
-+                      rec = btr_cur_get_rec(&cursor);
-+              } else {
-               rec = page_rec_get_next(page_get_infimum_rec(page));
-+              }
-               if (rec != supremum) {
-                       not_empty_flag = 1;
-@@ -3552,7 +3833,8 @@
-               }
-               while (rec != supremum) {
--                      rec_t*  next_rec = page_rec_get_next(rec);
-+                      rec_t*  next_rec;
-+                      next_rec = page_rec_get_next(rec);
-                       if (next_rec == supremum) {
-                               break;
-                       }
-@@ -3566,7 +3848,10 @@
-                       cmp_rec_rec_with_match(rec, next_rec,
-                                              offsets_rec, offsets_next_rec,
-                                              index, &matched_fields,
--                                             &matched_bytes);
-+                                             &matched_bytes,
-+                              (stats_method==SRV_STATS_METHOD_NULLS_NOT_EQUAL) ?
-+                              SRV_STATS_METHOD_NULLS_NOT_EQUAL :
-+                              SRV_STATS_METHOD_NULLS_EQUAL);
-                       for (j = matched_fields + 1; j <= n_cols; j++) {
-                               /* We add one if this index record has
-@@ -3627,7 +3912,7 @@
-       for (j = 0; j <= n_cols; j++) {
-               index->stat_n_diff_key_vals[j]
-                       = ((n_diff[j]
--                          * (ib_int64_t)index->stat_n_leaf_pages
-+                          * (ib_int64_t)effective_pages
-                           + n_sample_pages - 1
-                           + total_external_size
-                           + not_empty_flag)
-@@ -3642,7 +3927,7 @@
-               different key values, or even more. Let us try to approximate
-               that: */
--              add_on = index->stat_n_leaf_pages
-+              add_on = effective_pages
-                       / (10 * (n_sample_pages
-                                + total_external_size));
-@@ -3651,6 +3936,15 @@
-               }
-               index->stat_n_diff_key_vals[j] += add_on;
-+
-+              if (stats_method == SRV_STATS_METHOD_IGNORE_NULLS) {
-+                      /* index->stat_n_diff_key_vals[k] is used for calc rec_per_key,
-+                      as "stats.records / index->stat_n_diff_key_vals[x]".
-+                      So it should be adjusted to the value which is based on whole of the index. */
-+                      index->stat_n_diff_key_vals[j] =
-+                              index->stat_n_diff_key_vals[j] * (ib_int64_t)index->stat_n_leaf_pages
-+                                      / (ib_int64_t)effective_pages;
-+              }
-       }
-       mem_free(n_diff);
 diff -ruN a/storage/innobase/dict/dict0boot.c b/storage/innobase/dict/dict0boot.c
 --- a/storage/innobase/dict/dict0boot.c        2010-12-03 15:48:03.034036843 +0900
 +++ b/storage/innobase/dict/dict0boot.c        2010-12-03 17:19:24.835112632 +0900
@@ -744,7 +350,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
        }
  
        return(table);
-@@ -4304,6 +4304,240 @@
+@@ -4310,6 +4310,240 @@
  }
  
  /*********************************************************************//**
@@ -985,7 +591,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
  Calculates new estimates for table and index statistics. The statistics
  are used in query optimization. */
  UNIV_INTERN
-@@ -4311,10 +4545,11 @@
+@@ -4317,10 +4551,11 @@
  dict_update_statistics(
  /*===================*/
        dict_table_t*   table,          /*!< in/out: table */
@@ -998,7 +604,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
  {
        dict_index_t*   index;
        ulint           sum_of_index_sizes      = 0;
-@@ -4331,6 +4566,27 @@
+@@ -4337,6 +4572,27 @@
                return;
        }
  
@@ -1026,7 +632,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
        /* Find out the sizes of the indexes and how many different values
        for the key they approximately have */
  
-@@ -4391,6 +4647,11 @@
+@@ -4401,6 +4657,11 @@
                index = dict_table_get_next_index(index);
        } while (index);
  
@@ -1038,7 +644,7 @@ diff -ruN a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.
        index = dict_table_get_first_index(table);
  
        table->stat_n_rows = index->stat_n_diff_key_vals[
-@@ -4485,7 +4746,8 @@
+@@ -4495,7 +4756,8 @@
  
        ut_ad(mutex_own(&(dict_sys->mutex)));
  
@@ -1149,7 +755,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
  
  static char*  internal_innobase_data_file_path        = NULL;
-@@ -2388,6 +2389,8 @@
+@@ -2407,6 +2408,8 @@
                goto error;
        }
  
@@ -1158,7 +764,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        /* -------------- Log files ---------------------------*/
  
        /* The default dir for log files is the datadir of MySQL */
-@@ -5192,6 +5195,10 @@
+@@ -5211,6 +5214,10 @@
  
        error = row_insert_for_mysql((byte*) record, prebuilt);
  
@@ -1169,7 +775,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        /* Handle duplicate key errors */
        if (auto_inc_used) {
                ulint           err;
-@@ -5528,6 +5535,10 @@
+@@ -5547,6 +5554,10 @@
                }
        }
  
@@ -1180,7 +786,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        innodb_srv_conc_exit_innodb(trx);
  
        error = convert_error_code_to_mysql(error,
-@@ -5581,6 +5592,10 @@
+@@ -5600,6 +5611,10 @@
  
        error = row_update_for_mysql((byte*) record, prebuilt);
  
@@ -1191,7 +797,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
        innodb_srv_conc_exit_innodb(trx);
  
        error = convert_error_code_to_mysql(
-@@ -5899,6 +5914,11 @@
+@@ -5918,6 +5933,11 @@
        case DB_SUCCESS:
                error = 0;
                table->status = 0;
@@ -1203,7 +809,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                break;
        case DB_RECORD_NOT_FOUND:
                error = HA_ERR_KEY_NOT_FOUND;
-@@ -6108,6 +6128,11 @@
+@@ -6127,6 +6147,11 @@
        case DB_SUCCESS:
                error = 0;
                table->status = 0;
@@ -1215,7 +821,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                break;
        case DB_RECORD_NOT_FOUND:
                error = HA_ERR_END_OF_FILE;
-@@ -7999,11 +8024,31 @@
+@@ -8077,11 +8102,31 @@
                        /* In sql_show we call with this flag: update
                        then statistics so that they are up-to-date */
  
@@ -1248,7 +854,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  
                        prebuilt->trx->op_info = "returning various info to MySQL";
                }
-@@ -8081,7 +8126,7 @@
+@@ -8159,7 +8204,7 @@
                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. */
@@ -1257,29 +863,10 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
                    || !(flag & HA_STATUS_VARIABLE_EXTRA)) {
                        /* We do not update delete_length if no
                        locking is requested so the "old" value can
-@@ -11281,6 +11326,45 @@
+@@ -11354,6 +11399,26 @@
    "The number of index pages to sample when calculating statistics (default 8)",
    NULL, NULL, 8, 1, ~0ULL, 0);
  
-+const char *innobase_stats_method_names[]=
-+{
-+  "nulls_equal",
-+  "nulls_unequal",
-+  "nulls_ignored",
-+  NullS
-+};
-+TYPELIB innobase_stats_method_typelib=
-+{
-+  array_elements(innobase_stats_method_names) - 1, "innobase_stats_method_typelib",
-+  innobase_stats_method_names, NULL
-+};
-+static MYSQL_SYSVAR_ENUM(stats_method, srv_stats_method,
-+  PLUGIN_VAR_RQCMDARG,
-+  "Specifies how InnoDB index statistics collection code should threat NULLs. "
-+  "Possible values of name are same to for 'myisam_stats_method'. "
-+  "This is startup parameter.",
-+  NULL, NULL, 0, &innobase_stats_method_typelib);
-+
 +static MYSQL_SYSVAR_ULONG(stats_auto_update, srv_stats_auto_update,
 +  PLUGIN_VAR_RQCMDARG,
 +  "Enable/Disable InnoDB's auto update statistics of indexes. "
@@ -1303,18 +890,17 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_BOOL(adaptive_hash_index, btr_search_enabled,
    PLUGIN_VAR_OPCMDARG,
    "Enable InnoDB adaptive hash index (enabled by default).  "
-@@ -11604,6 +11688,10 @@
+@@ -11684,6 +11749,9 @@
    MYSQL_SYSVAR(recovery_update_relay_log),
    MYSQL_SYSVAR(rollback_on_timeout),
    MYSQL_SYSVAR(stats_on_metadata),
-+  MYSQL_SYSVAR(stats_method),
 +  MYSQL_SYSVAR(stats_auto_update),
 +  MYSQL_SYSVAR(stats_update_need_lock),
 +  MYSQL_SYSVAR(use_sys_stats_table),
    MYSQL_SYSVAR(stats_sample_pages),
    MYSQL_SYSVAR(adaptive_hash_index),
-   MYSQL_SYSVAR(replication_delay),
-@@ -11672,7 +11760,10 @@
+   MYSQL_SYSVAR(stats_method),
+@@ -11753,7 +11821,10 @@
  i_s_innodb_sys_columns,
  i_s_innodb_sys_fields,
  i_s_innodb_sys_foreign,
@@ -2053,32 +1639,6 @@ diff -ruN a/storage/innobase/include/dict0load.h b/storage/innobase/include/dict
  #ifndef UNIV_NONINL
  #include "dict0load.ic"
  #endif
-diff -ruN a/storage/innobase/include/page0cur.h b/storage/innobase/include/page0cur.h
---- a/storage/innobase/include/page0cur.h      2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/include/page0cur.h      2010-12-03 17:19:24.891954511 +0900
-@@ -293,6 +293,22 @@
- /*==========================*/
-       buf_block_t*    block,  /*!< in: page */
-       page_cur_t*     cursor);/*!< out: page cursor */
-+
-+UNIV_INTERN
-+void
-+page_cur_open_on_nth_user_rec(
-+/*==========================*/
-+      buf_block_t*    block,  /*!< in: page */
-+      page_cur_t*     cursor, /*!< out: page cursor */
-+      ulint           nth);
-+
-+UNIV_INTERN
-+ibool
-+page_cur_open_on_rnd_user_rec_after_nth(
-+/*==========================*/
-+      buf_block_t*    block,  /*!< in: page */
-+      page_cur_t*     cursor, /*!< out: page cursor */
-+      ulint           nth);
- #endif /* !UNIV_HOTBACKUP */
- /***********************************************************//**
- Parses a log record of a record insert on a page.
 diff -ruN a/storage/innobase/include/que0que.h b/storage/innobase/include/que0que.h
 --- a/storage/innobase/include/que0que.h       2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/include/que0que.h       2010-12-03 17:19:24.892947946 +0900
@@ -2091,32 +1651,6 @@ diff -ruN a/storage/innobase/include/que0que.h b/storage/innobase/include/que0qu
  /* Query thread states */
  #define QUE_THR_RUNNING               1
  #define QUE_THR_PROCEDURE_WAIT        2
-diff -ruN a/storage/innobase/include/rem0cmp.h b/storage/innobase/include/rem0cmp.h
---- a/storage/innobase/include/rem0cmp.h       2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/include/rem0cmp.h       2010-12-03 17:19:24.893953395 +0900
-@@ -169,10 +169,11 @@
-                               matched fields; when the function returns,
-                               contains the value the for current
-                               comparison */
--      ulint*          matched_bytes);/*!< in/out: number of already matched
-+      ulint*          matched_bytes, /*!< in/out: number of already matched
-                               bytes within the first field not completely
-                               matched; when the function returns, contains
-                               the value for the current comparison */
-+      ulint           stats_method);
- /*************************************************************//**
- This function is used to compare two physical records. Only the common
- first fields are compared.
-diff -ruN a/storage/innobase/include/rem0cmp.ic b/storage/innobase/include/rem0cmp.ic
---- a/storage/innobase/include/rem0cmp.ic      2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/include/rem0cmp.ic      2010-12-03 17:19:24.902983425 +0900
-@@ -87,5 +87,5 @@
-       ulint   match_b         = 0;
-       return(cmp_rec_rec_with_match(rec1, rec2, offsets1, offsets2, index,
--                                    &match_f, &match_b));
-+                                    &match_f, &match_b, 0));
- }
 diff -ruN a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0mysql.h
 --- a/storage/innobase/include/row0mysql.h     2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/include/row0mysql.h     2010-12-03 17:19:24.904973020 +0900
@@ -2138,98 +1672,16 @@ diff -ruN a/storage/innobase/include/row0mysql.h b/storage/innobase/include/row0
 diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h
 --- a/storage/innobase/include/srv0srv.h       2010-12-03 15:53:54.622036720 +0900
 +++ b/storage/innobase/include/srv0srv.h       2010-12-03 17:19:24.906953188 +0900
-@@ -209,6 +209,13 @@
+@@ -214,6 +214,9 @@
  extern ibool  srv_innodb_status;
  
  extern unsigned long long     srv_stats_sample_pages;
-+extern ulint  srv_stats_method;
-+#define SRV_STATS_METHOD_NULLS_EQUAL     0
-+#define SRV_STATS_METHOD_NULLS_NOT_EQUAL 1
-+#define SRV_STATS_METHOD_IGNORE_NULLS    2
 +extern ulint  srv_stats_auto_update;
 +extern ulint  srv_stats_update_need_lock;
 +extern ibool  srv_use_sys_stats_table;
  
  extern ibool  srv_use_doublewrite_buf;
  extern ibool  srv_use_checksums;
-diff -ruN a/storage/innobase/page/page0cur.c b/storage/innobase/page/page0cur.c
---- a/storage/innobase/page/page0cur.c 2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/page/page0cur.c 2010-12-03 17:19:24.908973357 +0900
-@@ -564,6 +564,74 @@
-       } while (rnd--);
- }
-+UNIV_INTERN
-+void
-+page_cur_open_on_nth_user_rec(
-+/*==========================*/
-+      buf_block_t*    block,  /*!< in: page */
-+      page_cur_t*     cursor, /*!< out: page cursor */
-+      ulint           nth)
-+{
-+      ulint   n_recs = page_get_n_recs(buf_block_get_frame(block));
-+
-+      page_cur_set_before_first(block, cursor);
-+
-+      if (UNIV_UNLIKELY(n_recs == 0)) {
-+
-+              return;
-+      }
-+
-+      nth--;
-+
-+      if (nth >= n_recs) {
-+              nth = n_recs - 1;
-+      }
-+
-+      do {
-+              page_cur_move_to_next(cursor);
-+      } while (nth--);
-+}
-+
-+UNIV_INTERN
-+ibool
-+page_cur_open_on_rnd_user_rec_after_nth(
-+/*==========================*/
-+      buf_block_t*    block,  /*!< in: page */
-+      page_cur_t*     cursor, /*!< out: page cursor */
-+      ulint           nth)
-+{
-+      ulint   rnd;
-+      ulint   n_recs = page_get_n_recs(buf_block_get_frame(block));
-+      ibool   ret;
-+
-+      page_cur_set_before_first(block, cursor);
-+
-+      if (UNIV_UNLIKELY(n_recs == 0)) {
-+
-+              return (FALSE);
-+      }
-+
-+      nth--;
-+
-+      if (nth >= n_recs) {
-+              nth = n_recs - 1;
-+      }
-+
-+      rnd = (ulint) (nth + page_cur_lcg_prng() % (n_recs - nth));
-+
-+      if (rnd == nth) {
-+              ret = TRUE;
-+      } else {
-+              ret = FALSE;
-+      }
-+
-+      do {
-+              page_cur_move_to_next(cursor);
-+      } while (rnd--);
-+
-+      return (ret);
-+}
-+
- /***********************************************************//**
- Writes the log record of a record insert on a page. */
- static
 diff -ruN a/storage/innobase/que/que0que.c b/storage/innobase/que/que0que.c
 --- a/storage/innobase/que/que0que.c   2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/que/que0que.c   2010-12-03 17:19:24.910953422 +0900
@@ -2273,35 +1725,6 @@ diff -ruN a/storage/innobase/que/que0que.c b/storage/innobase/que/que0que.c
        } else if (type == QUE_NODE_ROW_PRINTF) {
                thr = row_printf_step(thr);
        } else {
-diff -ruN a/storage/innobase/rem/rem0cmp.c b/storage/innobase/rem/rem0cmp.c
---- a/storage/innobase/rem/rem0cmp.c   2010-11-03 07:01:13.000000000 +0900
-+++ b/storage/innobase/rem/rem0cmp.c   2010-12-03 17:19:24.911953579 +0900
-@@ -866,10 +866,11 @@
-                               matched fields; when the function returns,
-                               contains the value the for current
-                               comparison */
--      ulint*          matched_bytes) /*!< in/out: number of already matched
-+      ulint*          matched_bytes, /*!< in/out: number of already matched
-                               bytes within the first field not completely
-                               matched; when the function returns, contains
-                               the value for the current comparison */
-+      ulint           stats_method)
- {
-       ulint           rec1_n_fields;  /* the number of fields in rec */
-       ulint           rec1_f_len;     /* length of current field in rec */
-@@ -962,7 +963,11 @@
-                               if (rec1_f_len == rec2_f_len) {
--                                      goto next_field;
-+                                      if (stats_method == SRV_STATS_METHOD_NULLS_EQUAL) {
-+                                              goto next_field;
-+                                      } else {
-+                                              ret = -1;
-+                                      }
-                               } else if (rec2_f_len == UNIV_SQL_NULL) {
 diff -ruN a/storage/innobase/row/row0merge.c b/storage/innobase/row/row0merge.c
 --- a/storage/innobase/row/row0merge.c 2010-11-03 07:01:13.000000000 +0900
 +++ b/storage/innobase/row/row0merge.c 2010-12-03 17:19:24.914955391 +0900
@@ -2336,7 +1759,7 @@ diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
        }
  }
  
-@@ -2103,6 +2106,45 @@
+@@ -2105,6 +2108,45 @@
  }
  
  /*********************************************************************//**
@@ -2382,7 +1805,7 @@ diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
  Scans a table create SQL string and adds to the data dictionary
  the foreign key constraints declared in the string. This function
  should be called after the indexes for a table have been created.
-@@ -3022,7 +3064,7 @@
+@@ -3024,7 +3066,7 @@
        dict_table_autoinc_initialize(table, 1);
        dict_table_autoinc_unlock(table);
        dict_update_statistics(table, FALSE /* update even if stats are
@@ -2391,7 +1814,7 @@ diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
  
        trx_commit_for_mysql(trx);
  
-@@ -3324,6 +3366,8 @@
+@@ -3326,6 +3368,8 @@
                           "       IF (SQL % NOTFOUND) THEN\n"
                           "               found := 0;\n"
                           "       ELSE\n"
@@ -2403,11 +1826,10 @@ diff -ruN a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-03 15:53:54.625288512 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-03 17:19:24.922953561 +0900
-@@ -397,6 +397,10 @@
+@@ -402,6 +402,9 @@
  /* When estimating number of different key values in an index, sample
  this many index pages */
  UNIV_INTERN unsigned long long        srv_stats_sample_pages = 8;
-+UNIV_INTERN ulint     srv_stats_method = 0;
 +UNIV_INTERN ulint     srv_stats_auto_update = 1;
 +UNIV_INTERN ulint     srv_stats_update_need_lock = 1;
 +UNIV_INTERN ibool     srv_use_sys_stats_table = FALSE;
index cac9b21007db694b3a7492c953729713ef77b503..9f06e58d7ba25b8a68b0c2168192cecd0fa50f0c 100644 (file)
@@ -16,7 +16,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static long long innobase_buffer_pool_size, innobase_log_file_size;
  
  /** Percentage of the buffer pool to reserve for 'old' blocks.
-@@ -2497,6 +2498,9 @@
+@@ -2516,6 +2517,9 @@
        srv_n_log_files = (ulint) innobase_log_files_in_group;
        srv_log_file_size = (ulint) innobase_log_file_size;
  
@@ -26,7 +26,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  #ifdef UNIV_LOG_ARCHIVE
        srv_log_archive_on = (ulint) innobase_log_archive;
  #endif /* UNIV_LOG_ARCHIVE */
-@@ -11371,6 +11375,12 @@
+@@ -11444,6 +11448,12 @@
    "Maximum delay between polling for a spin lock (6 by default)",
    NULL, NULL, 6L, 0L, ~0L, 0);
  
@@ -39,7 +39,7 @@ diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_
  static MYSQL_SYSVAR_ULONG(thread_concurrency, srv_thread_concurrency,
    PLUGIN_VAR_RQCMDARG,
    "Helps in performance tuning in heavily concurrent environments. Sets the maximum number of threads allowed inside InnoDB. Value 0 will disable the thread throttling.",
-@@ -11579,6 +11589,7 @@
+@@ -11660,6 +11670,7 @@
    MYSQL_SYSVAR(spin_wait_delay),
    MYSQL_SYSVAR(table_locks),
    MYSQL_SYSVAR(thread_concurrency),
@@ -62,7 +62,7 @@ diff -ruN a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0sr
 diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
 --- a/storage/innobase/srv/srv0srv.c   2010-12-03 15:37:45.546023493 +0900
 +++ b/storage/innobase/srv/srv0srv.c   2010-12-03 15:42:11.574955879 +0900
-@@ -346,6 +346,7 @@
+@@ -351,6 +351,7 @@
  computer. Bigger computers need bigger values. Value 0 will disable the
  concurrency check. */
  
@@ -70,7 +70,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  UNIV_INTERN ulong     srv_thread_concurrency  = 0;
  
  /* this mutex protects srv_conc data structures */
-@@ -1164,6 +1165,75 @@
+@@ -1169,6 +1170,75 @@
  /*********************************************************************//**
  Puts an OS thread to wait if there are too many concurrent threads
  (>= srv_thread_concurrency) inside InnoDB. The threads wait in a FIFO queue. */
@@ -146,7 +146,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  UNIV_INTERN
  void
  srv_conc_enter_innodb(
-@@ -1194,6 +1264,13 @@
+@@ -1199,6 +1269,13 @@
                return;
        }
  
@@ -160,7 +160,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
        os_fast_mutex_lock(&srv_conc_mutex);
  retry:
        if (trx->declared_to_be_inside_innodb) {
-@@ -1339,6 +1416,14 @@
+@@ -1344,6 +1421,14 @@
        }
  
        ut_ad(srv_conc_n_threads >= 0);
@@ -175,7 +175,7 @@ diff -ruN a/storage/innobase/srv/srv0srv.c b/storage/innobase/srv/srv0srv.c
  
        os_fast_mutex_lock(&srv_conc_mutex);
  
-@@ -1372,6 +1457,13 @@
+@@ -1377,6 +1462,13 @@
                return;
        }
  
index 63224d1918905c9379f305827707650241d7a98e..228ff7d244f5e6d6bebaa13ed769baca541dff29 100644 (file)
@@ -18,7 +18,7 @@ diff -ruN a/patch_info/log_connection_error.patch b/patch_info/log_connection_er
 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 --- a/sql/mysqld.cc    2010-07-28 16:47:47.105319218 +0400
 +++ b/sql/mysqld.cc    2010-07-28 16:47:47.644101813 +0400
-@@ -4990,6 +4990,10 @@
+@@ -5011,6 +5011,10 @@
  
      DBUG_PRINT("error",("Too many connections"));
      close_connection(thd, ER_CON_COUNT_ERROR);
@@ -29,7 +29,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
      delete thd;
      DBUG_VOID_RETURN;
    }
-@@ -5370,6 +5374,10 @@
+@@ -5391,6 +5395,10 @@
      if (!(thd->net.vio= vio_new_win32pipe(hConnectedPipe)) ||
        my_net_init(&thd->net, thd->net.vio))
      {
@@ -40,7 +40,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
        close_connection(thd, ER_OUT_OF_RESOURCES);
        delete thd;
        continue;
-@@ -5565,6 +5573,10 @@
+@@ -5586,6 +5594,10 @@
                                                     event_conn_closed)) ||
                          my_net_init(&thd->net, thd->net.vio))
      {
index d55045e43d6de3faa4af620ac6e7aba2f758de47..6c8693b04cf8fd59beff8d876d3bc296a5e061e3 100644 (file)
@@ -21,7 +21,7 @@ diff -ruN a/patch_info/log_warnings_suppress.patch b/patch_info/log_warnings_sup
 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 --- a/sql/mysqld.cc    2011-01-05 20:31:33.000000000 +0300
 +++ b/sql/mysqld.cc    2011-01-05 20:32:34.000000000 +0300
-@@ -620,6 +620,8 @@
+@@ -621,6 +621,8 @@
  SHOW_COMP_OPTION have_crypt, have_compress;
  SHOW_COMP_OPTION have_profiling;
  
@@ -45,7 +45,7 @@ diff -ruN a/sql/mysqld.h b/sql/mysqld.h
 diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
 --- a/sql/sql_class.cc 2011-01-05 20:31:32.000000000 +0300
 +++ b/sql/sql_class.cc 2011-01-05 20:32:34.000000000 +0300
-@@ -4578,7 +4578,7 @@
+@@ -4579,7 +4579,7 @@
                            ER_BINLOG_UNSAFE_STATEMENT,
                            ER(ER_BINLOG_UNSAFE_STATEMENT),
                            ER(LEX::binlog_stmt_unsafe_errcode[unsafe_type]));
index 3f84ffcca0834ae8c4850ac8556115c16ae7726f..3c36315544d99eff018a03d00b8a13a1066305ca 100644 (file)
@@ -20,7 +20,7 @@ diff -ruN /dev/null b/patch_info/microsec_process.info
 diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
 --- a/sql/sql_show.cc  2010-12-02 19:22:40.054024541 +0900
 +++ b/sql/sql_show.cc  2010-12-02 20:41:41.622941425 +0900
-@@ -1882,7 +1882,8 @@
+@@ -1883,7 +1883,8 @@
    TABLE *table= tables->table;
    CHARSET_INFO *cs= system_charset_info;
    char *user;
@@ -30,7 +30,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
    DBUG_ENTER("fill_process_list");
  
    user= thd->security_ctx->master_access & PROCESS_ACL ?
-@@ -1966,6 +1967,10 @@
+@@ -1967,6 +1968,10 @@
        }
        mysql_mutex_unlock(&tmp->LOCK_thd_data);
  
@@ -41,7 +41,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
        if (schema_table_store_record(thd, table))
        {
          mysql_mutex_unlock(&LOCK_thread_count);
-@@ -7267,6 +7272,8 @@
+@@ -7268,6 +7273,8 @@
    {"STATE", 64, MYSQL_TYPE_STRING, 0, 1, "State", SKIP_OPEN_TABLE},
    {"INFO", PROCESS_LIST_INFO_WIDTH, MYSQL_TYPE_STRING, 0, 1, "Info",
     SKIP_OPEN_TABLE},
index 68276146711c99846c0fe9a85e287f22b35dbb72..671d5280bb92e4fa5e2e56c7d7c4bc8f1fd9457e 100644 (file)
@@ -34,13 +34,13 @@ Summary(ru.UTF-8):  MySQL - быстрый SQL-сервер
 Summary(uk.UTF-8):     MySQL - швидкий SQL-сервер
 Summary(zh_CN.UTF-8):  MySQL数据库服务器
 Name:          mysql
-Version:       5.5.9
-Release:       7
+Version:       5.5.10
+Release:       1
 License:       GPL + MySQL FLOSS Exception
 Group:         Applications/Databases
 # Source0Download: http://dev.mysql.com/downloads/mysql/5.5.html#downloads
 Source0:       http://vesta.informatik.rwth-aachen.de/mysql/Downloads/MySQL-5.5/%{name}-%{version}.tar.gz
-# Source0-md5: 701c0c44b7f1c2300adc0dc45729f903
+# Source0-md5: ee604aff531ff85abeb10cf332c1355a
 Source100:     http://www.sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz
 # Source100-md5:       7b9b618cb9b378f949bb1b91ddcc4f54
 Source1:       %{name}.init
@@ -78,7 +78,7 @@ Patch20:      %{name}-dubious-exports.patch
 # <percona patches, updated with percona.sh>
 Patch100:      microsec_process.patch
 Patch101:      optimizer_fix.patch
-Patch102:      %{name}_dump_ignore_ct.patch
+Patch102:      mysql_dump_ignore_ct.patch
 Patch103:      control_online_alter_index.patch
 Patch104:      show_temp.patch
 Patch105:      innodb_show_status.patch
@@ -111,7 +111,7 @@ Patch131:   slow_extended.patch
 Patch132:      percona_support.patch
 Patch133:      query_cache_enhance.patch
 Patch134:      log_connection_error.patch
-Patch135:      %{name}_syslog.patch
+Patch135:      mysql_syslog.patch
 Patch136:      response_time_distribution.patch
 Patch137:      error_pad.patch
 Patch138:      remove_fcntl_excessive_calls.patch
@@ -120,7 +120,8 @@ Patch140:   show_slave_status_nolock.patch
 Patch141:      log_warnings_suppress.patch
 Patch142:      userstat.patch
 Patch143:      bug580324.patch
-Patch144:      %{name}_remove_eol_carret.patch
+Patch144:      mysql_remove_eol_carret.patch
+Patch145:      processlist_row_stats.patch
 # </percona>
 URL:           http://www.mysql.com/products/community/
 BuildRequires: bison
@@ -563,7 +564,7 @@ mv sphinx-*/mysqlse storage/sphinx
 # <percona %patches>
 %patch100 -p1
 %patch101 -p1
-%patch102 -p1
+#%patch102 -p1
 %patch103 -p1
 %patch104 -p1
 %patch105 -p1
@@ -606,6 +607,7 @@ mv sphinx-*/mysqlse storage/sphinx
 %patch142 -p1
 %patch143 -p1
 %patch144 -p1
+%patch145 -p1
 # </percona>
 
 # to get these files rebuild
@@ -706,8 +708,8 @@ cp -a %{SOURCE12} $RPM_BUILD_ROOT/etc/sysconfig/mysql-ndb-cpc
 %endif
 
 # symlinks point to the .so file, fix it
-ln -sf libmysqlclient.so.16 $RPM_BUILD_ROOT%{_libdir}/libmysqlclient_r.so.16
-ln -sf libmysqlclient.so.16.0.0 $RPM_BUILD_ROOT%{_libdir}/libmysqlclient_r.so.16.0.0
+ln -sf libmysqlclient.so.18 $RPM_BUILD_ROOT%{_libdir}/libmysqlclient_r.so.18
+ln -sf libmysqlclient.so.18.0.0 $RPM_BUILD_ROOT%{_libdir}/libmysqlclient_r.so.18.0.0
 
 sed -i -e 's,/usr//usr,%{_prefix},g' $RPM_BUILD_ROOT%{_bindir}/mysql_config
 sed -i -e '/libs/s/$ldflags//' $RPM_BUILD_ROOT%{_bindir}/mysql_config
@@ -1122,9 +1124,9 @@ done
 %attr(751,root,root) %dir %{_sysconfdir}/mysql
 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/mysql-client.conf
 %attr(755,root,root) %{_libdir}/libmysqlclient.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.16
+%attr(755,root,root) %ghost %{_libdir}/libmysqlclient.so.18
 %attr(755,root,root) %{_libdir}/libmysqlclient_r.so.*.*.*
-%attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.16
+%attr(755,root,root) %ghost %{_libdir}/libmysqlclient_r.so.18
 %if %{with ndb}
 %attr(755,root,root) %{_libdir}/libndbclient.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libndbclient.so.3
index 4c3655fdb83e6f7637981558c39c6ec165f7c35a..370441418b41c368801088a743e2dabb7c662bb3 100644 (file)
@@ -13,9 +13,9 @@ diff -ruN a/client/client_priv.h b/client/client_priv.h
  #endif
    OPT_PLUGIN_DIR,
 +  OPT_NO_REMOVE_EOL_CARRET,
+   OPT_DEFAULT_AUTH,
    OPT_DEFAULT_PLUGIN,
    OPT_MAX_CLIENT_OPTION
- };
 diff -ruN a/client/mysql.cc b/client/mysql.cc
 --- a/client/mysql.cc  2010-06-03 08:50:02.000000000 -0700
 +++ b/client/mysql.cc  2010-07-06 15:07:18.000000000 -0700
@@ -28,7 +28,7 @@ diff -ruN a/client/mysql.cc b/client/mysql.cc
  static MYSQL mysql;                   /* The connection */
  static my_bool ignore_errors=0,wait_flag=0,quick=0,
                 connected=0,opt_raw_data=0,unbuffered=0,output_tables=0,
-@@ -1450,6 +1452,10 @@
+@@ -1452,6 +1454,10 @@
     NO_ARG, 1, 0, 0, 0, 0, 0},
    {"skip-line-numbers", 'L', "Don't write line number for errors.", 0, 0, 0, GET_NO_ARG,
     NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -42,8 +42,8 @@ diff -ruN a/client/mysql.cc b/client/mysql.cc
 diff -ruN a/client/readline.cc b/client/readline.cc
 --- a/client/readline.cc       2010-06-03 08:50:23.000000000 -0700
 +++ b/client/readline.cc       2010-07-06 15:07:18.000000000 -0700
-@@ -20,6 +20,8 @@
- #include <m_string.h>
+@@ -21,6 +21,8 @@
+ #include <my_dir.h>
  #include "my_readline.h"
  
 +extern my_bool opt_no_remove_eol_carret;
@@ -51,8 +51,8 @@ diff -ruN a/client/readline.cc b/client/readline.cc
  static bool init_line_buffer(LINE_BUFFER *buffer,File file,ulong size,
                            ulong max_size);
  static bool init_line_buffer_from_string(LINE_BUFFER *buffer,char * str);
-@@ -51,7 +53,7 @@
-   if (!(pos=intern_read_line(line_buff,&out_length, truncated)))
+@@ -60,7 +62,7 @@
+   if (!(pos=intern_read_line(line_buff, &out_length)))
      return 0;
    if (out_length && pos[out_length-1] == '\n')
 -    if (--out_length && pos[out_length-1] == '\r')  /* Remove '\n' */
index 861efddace88b7243d90c0f3974cfd2d22b41043..063d1707b1d887ba15078af311181e92dbc819ba 100644 (file)
@@ -16,8 +16,8 @@ diff -ruN a/client/client_priv.h b/client/client_priv.h
 +  OPT_SYSLOG,
 +#endif
    OPT_PLUGIN_DIR,
+   OPT_DEFAULT_AUTH,
    OPT_DEFAULT_PLUGIN,
-   OPT_MAX_CLIENT_OPTION
 diff -ruN a/client/mysql.cc b/client/mysql.cc
 --- a/client/mysql.cc  2010-12-03 20:58:26.000000000 +0300
 +++ b/client/mysql.cc  2011-01-13 18:38:21.000000000 +0300
@@ -50,7 +50,7 @@ diff -ruN a/client/mysql.cc b/client/mysql.cc
  static void tee_print_sized_data(const char *, unsigned int, unsigned int, bool);
  /* The names of functions that actually do the manipulation. */
  static int get_options(int argc,char **argv);
-@@ -1561,6 +1567,10 @@
+@@ -1563,6 +1569,10 @@
    {"show-warnings", OPT_SHOW_WARNINGS, "Show warnings after every statement.",
      &show_warnings, &show_warnings, 0, GET_BOOL, NO_ARG,
      0, 0, 0, 0, 0, 0},
@@ -61,7 +61,7 @@ diff -ruN a/client/mysql.cc b/client/mysql.cc
    {"plugin_dir", OPT_PLUGIN_DIR, "Directory for client-side plugins.",
     (uchar**) &opt_plugin_dir, (uchar**) &opt_plugin_dir, 0,
     GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
-@@ -1665,6 +1675,11 @@
+@@ -1667,6 +1677,11 @@
                                      opt->name);
  #endif
      break;
@@ -73,7 +73,7 @@ diff -ruN a/client/mysql.cc b/client/mysql.cc
    case OPT_SERVER_ARG:
  #ifdef EMBEDDED_LIBRARY
      /*
-@@ -2014,6 +2029,40 @@
+@@ -2020,6 +2035,40 @@
    DBUG_RETURN((COMMANDS *) 0);
  }
  
@@ -114,7 +114,7 @@ diff -ruN a/client/mysql.cc b/client/mysql.cc
  
  static bool add_line(String &buffer,char *line,char *in_string,
                       bool *ml_comment, bool truncated)
-@@ -2990,6 +3039,11 @@
+@@ -2996,6 +3045,11 @@
      fix_history(buffer);
    }
  #endif
index cdb3dc6eade84925c25bfe6dac372eee500cfe13..95165421c46a7230cbbb53c92e91998998b5ef25 100644 (file)
@@ -20,7 +20,7 @@ diff -ruN /dev/null b/patch_info/optimizer_fix.info
 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 --- a/sql/mysqld.cc    2010-12-02 19:22:40.027024953 +0900
 +++ b/sql/mysqld.cc    2010-12-02 20:51:50.811356434 +0900
-@@ -427,6 +427,7 @@
+@@ -428,6 +428,7 @@
  uint    opt_debug_sync_timeout= 0;
  #endif /* defined(ENABLED_DEBUG_SYNC) */
  my_bool opt_old_style_user_limits= 0, trust_function_creators= 0;
diff --git a/processlist_row_stats.patch b/processlist_row_stats.patch
new file mode 100644 (file)
index 0000000..f34909f
--- /dev/null
@@ -0,0 +1,104 @@
+# name       : processlist_row_stats.patch
+# introduced : 11 or before
+# maintainer : Oleg
+#
+#!!! notice !!!
+# Any small change to this file in the main branch
+# should be done or reviewed by the maintainer!
+diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
+--- a/sql/sql_class.cc 2011-03-09 17:07:26.221709282 +0200
++++ b/sql/sql_class.cc 2011-03-09 17:07:44.900164285 +0200
+@@ -2022,6 +2022,7 @@
+   thd->sent_row_count++;
+   thd->sent_row_count_2++;
++  DEBUG_SYNC(thd, "sent_row");
+   if (thd->vio_ok())
+     DBUG_RETURN(protocol->write());
+diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
+--- a/sql/sql_show.cc  2011-03-09 17:07:26.251706801 +0200
++++ b/sql/sql_show.cc  2011-03-09 17:07:44.904163954 +0200
+@@ -1759,7 +1759,8 @@
+ /****************************************************************************
+   Return info about all processes
+-  returns for each thread: thread id, user, host, db, command, info
++  returns for each thread: thread id, user, host, db, command, info,
++  rows_sent, rows_examined, rows_read
+ ****************************************************************************/
+ class thread_info :public ilink {
+@@ -1777,6 +1778,7 @@
+   uint   command;
+   const char *user,*host,*db,*proc_info,*state_info;
+   CSET_STRING query_string;
++  ulonglong rows_sent, rows_examined, rows_read;
+ };
+ #ifdef HAVE_EXPLICIT_TEMPLATE_INSTANTIATION
+@@ -1829,6 +1831,15 @@
+   field->maybe_null=1;
+   field_list.push_back(field=new Item_empty_string("Info",max_query_length));
+   field->maybe_null=1;
++  field_list.push_back(field= new Item_return_int("Rows_sent",
++                                                  MY_INT64_NUM_DECIMAL_DIGITS,
++                                                  MYSQL_TYPE_LONGLONG));
++  field_list.push_back(field= new Item_return_int("Rows_examined",
++                                                  MY_INT64_NUM_DECIMAL_DIGITS,
++                                                  MYSQL_TYPE_LONGLONG));
++  field_list.push_back(field= new Item_return_int("Rows_read",
++                                                  MY_INT64_NUM_DECIMAL_DIGITS,
++                                                  MYSQL_TYPE_LONGLONG));
+   if (protocol->send_result_set_metadata(&field_list,
+                             Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
+     DBUG_VOID_RETURN;
+@@ -1882,6 +1893,9 @@
+           thd_info->query_string=
+             CSET_STRING(q, q ? length : 0, tmp->query_charset());
+         }
++        thd_info->rows_sent= tmp->sent_row_count;
++        thd_info->rows_examined= tmp->examined_row_count;
++        thd_info->rows_read= tmp->warning_info->current_row_for_warning();
+         mysql_mutex_unlock(&tmp->LOCK_thd_data);
+         thd_info->start_time= tmp->start_time;
+         thread_infos.append(thd_info);
+@@ -1910,6 +1924,9 @@
+     protocol->store(thd_info->state_info, system_charset_info);
+     protocol->store(thd_info->query_string.str(),
+                     thd_info->query_string.charset());
++    protocol->store(thd_info->rows_sent);
++    protocol->store(thd_info->rows_examined);
++    protocol->store(thd_info->rows_read);
+     if (protocol->write())
+       break; /* purecov: inspected */
+   }
+@@ -2020,6 +2037,15 @@
+       table->field[8]->store(((tmp->start_utime ?
+                                now_utime - tmp->start_utime : 0)/ 1000));
++      mysql_mutex_lock(&tmp->LOCK_thd_data);
++      /* ROWS_SENT */
++      table->field[9]->store((ulonglong) tmp->sent_row_count);
++      /* ROWS_EXAMINED */
++      table->field[10]->store((ulonglong) tmp->examined_row_count);
++      /* ROWS_READ */
++      table->field[11]->store((ulonglong) tmp->warning_info->current_row_for_warning());
++      mysql_mutex_unlock(&tmp->LOCK_thd_data);
++
+       if (schema_table_store_record(thd, table))
+       {
+         mysql_mutex_unlock(&LOCK_thread_count);
+@@ -7941,6 +7967,12 @@
+    SKIP_OPEN_TABLE},
+   {"TIME_MS", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG,
+    0, 0, "Time_ms", SKIP_OPEN_TABLE},
++  {"ROWS_SENT", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
++   MY_I_S_UNSIGNED, "Rows_sent", SKIP_OPEN_TABLE},
++  {"ROWS_EXAMINED", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
++   MY_I_S_UNSIGNED, "Rows_examined", SKIP_OPEN_TABLE},
++  {"ROWS_READ", MY_INT64_NUM_DECIMAL_DIGITS, MYSQL_TYPE_LONGLONG, 0,
++   MY_I_S_UNSIGNED, "Rows_read", SKIP_OPEN_TABLE},
+   {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
+ };
index f39c5931a4fe7a0c5db7e67bc6f99a71bc918f8c..144892303c5f680f2697580b36d73a8dbe6dd922 100644 (file)
@@ -27,7 +27,7 @@ diff -ruN a/patch_info/query_cache_enhance.patch b/patch_info/query_cache_enhanc
 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 --- a/sql/mysqld.cc    2010-11-03 03:01:14.000000000 +0500
 +++ b/sql/mysqld.cc    2010-11-13 15:34:40.000000000 +0500
-@@ -896,6 +896,7 @@
+@@ -897,6 +897,7 @@
  #endif
  #ifdef HAVE_QUERY_CACHE
  ulong query_cache_min_res_unit= QUERY_CACHE_MIN_RESULT_DATA_SIZE;
index 94d865cb3097a1049151f9d563d8cb65dd4ecee8..d2c2a5cddd4f01255cdeeef6b2dc2f109edd544e 100644 (file)
@@ -78,7 +78,7 @@ diff -ruN a/sql/CMakeLists.txt b/sql/CMakeLists.txt
 diff -ruN a/sql/handler.h b/sql/handler.h
 --- a/sql/handler.h    2011-01-16 18:53:33.000000000 +0300
 +++ b/sql/handler.h    2011-01-16 18:54:00.000000000 +0300
-@@ -580,6 +580,7 @@
+@@ -572,6 +572,7 @@
    SCH_PROFILES,
    SCH_REFERENTIAL_CONSTRAINTS,
    SCH_PROCEDURES,
@@ -109,7 +109,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  #ifdef WITH_PERFSCHEMA_STORAGE_ENGINE
  #include "../storage/perfschema/pfs_server.h"
  #endif /* WITH_PERFSCHEMA_STORAGE_ENGINE */
-@@ -603,7 +605,7 @@
+@@ -604,7 +606,7 @@
  MY_LOCALE *my_default_lc_messages;
  MY_LOCALE *my_default_lc_time_names;
  
@@ -118,7 +118,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  SHOW_COMP_OPTION have_geometry, have_rtree_keys;
  SHOW_COMP_OPTION have_crypt, have_compress;
  SHOW_COMP_OPTION have_profiling;
-@@ -904,6 +906,10 @@
+@@ -905,6 +907,10 @@
  my_bool opt_enable_shared_memory;
  HANDLE smem_event_connect_request= 0;
  #endif
@@ -129,7 +129,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  
  my_bool opt_use_ssl  = 0;
  char *opt_ssl_ca= NULL, *opt_ssl_capath= NULL, *opt_ssl_cert= NULL,
-@@ -1472,6 +1478,9 @@
+@@ -1473,6 +1479,9 @@
    my_free(opt_bin_logname);
    bitmap_free(&temp_pool);
    free_max_user_conn();
@@ -139,7 +139,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  #ifdef HAVE_REPLICATION
    end_slave_list();
  #endif
-@@ -3925,6 +3934,9 @@
+@@ -3944,6 +3953,9 @@
    if (!DEFAULT_ERRMSGS[0][0])
      unireg_abort(1);  
  
@@ -149,7 +149,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    /* We have to initialize the storage engines before CSV logging */
    if (ha_init())
    {
-@@ -6797,6 +6809,11 @@
+@@ -6819,6 +6831,11 @@
  #else
    have_query_cache=SHOW_OPTION_NO;
  #endif
@@ -741,7 +741,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
  #include "lock.h"                           // MYSQL_OPEN_IGNORE_FLUSH
  #include "debug_sync.h"
  #include "datadict.h"   // dd_frm_type()
-@@ -7688,6 +7689,14 @@
+@@ -7689,6 +7690,14 @@
  
  */
  
@@ -756,7 +756,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
  ST_SCHEMA_TABLE schema_tables[]=
  {
    {"CHARACTER_SETS", charsets_fields_info, create_schema_table, 
-@@ -7741,6 +7750,13 @@
+@@ -7742,6 +7751,13 @@
     1, 9, 0, OPTIMIZE_I_S_TABLE|OPEN_TABLE_ONLY},
    {"ROUTINES", proc_fields_info, create_schema_table, 
     fill_schema_proc, make_proc_old_format, 0, -1, -1, 0, 0},
index a9a8679cb57a9cc8426b5f1609eeddda32da787d..9c76d118033c30a62dc59c91423f9532b7959be5 100644 (file)
@@ -29,7 +29,7 @@ diff -ruN a/sql/lex.h b/sql/lex.h
 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 --- a/sql/mysqld.cc    2010-12-29 20:27:19.000000000 +0300
 +++ b/sql/mysqld.cc    2010-12-29 20:29:19.000000000 +0300
-@@ -3053,6 +3053,7 @@
+@@ -3067,6 +3067,7 @@
    {"show_relaylog_events", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_RELAYLOG_EVENTS]), SHOW_LONG_STATUS},
    {"show_slave_hosts",     (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_HOSTS]), SHOW_LONG_STATUS},
    {"show_slave_status",    (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_STAT]), SHOW_LONG_STATUS},
index 5c5a8338d528d4a5c3130d82f061e5662f4f2ebe..ee8a9b0572072803c5ad6f4b529933d4f5456ab8 100644 (file)
@@ -8,7 +8,7 @@
 diff -ruN a/sql/handler.h b/sql/handler.h
 --- a/sql/handler.h    2010-12-03 14:09:14.406955791 +0900
 +++ b/sql/handler.h    2010-12-03 14:29:16.533356953 +0900
-@@ -569,6 +569,7 @@
+@@ -561,6 +561,7 @@
    SCH_EVENTS,
    SCH_FILES,
    SCH_GLOBAL_STATUS,
@@ -16,7 +16,7 @@ diff -ruN a/sql/handler.h b/sql/handler.h
    SCH_GLOBAL_VARIABLES,
    SCH_KEY_COLUMN_USAGE,
    SCH_OPEN_TABLES,
-@@ -590,6 +591,7 @@
+@@ -582,6 +583,7 @@
    SCH_TABLE_CONSTRAINTS,
    SCH_TABLE_NAMES,
    SCH_TABLE_PRIVILEGES,
@@ -27,7 +27,7 @@ diff -ruN a/sql/handler.h b/sql/handler.h
 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 --- a/sql/mysqld.cc    2010-12-02 21:23:05.495293844 +0900
 +++ b/sql/mysqld.cc    2010-12-03 14:25:40.317039327 +0900
-@@ -3033,6 +3033,7 @@
+@@ -3047,6 +3047,7 @@
    {"show_storage_engines", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STORAGE_ENGINES]), SHOW_LONG_STATUS},
    {"show_table_status",    (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLE_STATUS]), SHOW_LONG_STATUS},
    {"show_tables",          (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_TABLES]), SHOW_LONG_STATUS},
@@ -89,7 +89,7 @@ diff -ruN a/sql/sql_parse.cc b/sql/sql_parse.cc
 diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
 --- a/sql/sql_show.cc  2010-12-03 13:38:47.493070606 +0900
 +++ b/sql/sql_show.cc  2010-12-03 14:27:04.590939717 +0900
-@@ -2685,6 +2685,7 @@
+@@ -2686,6 +2686,7 @@
      break;
    case SQLCOM_SHOW_TABLES:
    case SQLCOM_SHOW_TABLE_STATUS:
@@ -97,7 +97,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
    case SQLCOM_SHOW_TRIGGERS:
    case SQLCOM_SHOW_EVENTS:
      thd->make_lex_string(&lookup_field_values->db_value, 
-@@ -3173,6 +3174,228 @@
+@@ -3174,6 +3175,228 @@
    return (uint) OPEN_FULL_TABLE;
  }
  
@@ -326,7 +326,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
  
  /**
     Try acquire high priority share metadata lock on a table (with
-@@ -6849,6 +7072,25 @@
+@@ -6850,6 +7073,25 @@
    {0, 0, MYSQL_TYPE_STRING, 0, 0, 0, SKIP_OPEN_TABLE}
  };
  
@@ -352,7 +352,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
  
  ST_FIELD_INFO columns_fields_info[]=
  {
-@@ -7463,6 +7705,9 @@
+@@ -7464,6 +7706,9 @@
     hton_fill_schema_table, 0, 0, -1, -1, 0, 0},
    {"GLOBAL_STATUS", variables_fields_info, create_schema_table,
     fill_status, make_old_format, 0, 0, -1, 0, 0},
@@ -362,7 +362,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
    {"GLOBAL_VARIABLES", variables_fields_info, create_schema_table,
     fill_variables, make_old_format, 0, 0, -1, 0, 0},
    {"KEY_COLUMN_USAGE", key_column_usage_fields_info, create_schema_table,
-@@ -7512,6 +7757,9 @@
+@@ -7513,6 +7758,9 @@
     get_all_tables, make_table_names_old_format, 0, 1, 2, 1, 0},
    {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
     fill_schema_table_privileges, 0, 0, -1, -1, 0, 0},
index e31888671674fbe12de2dee3c25d139d6ea8bb29..0341950617294c862bf8bd7c404c4ab260325f91 100644 (file)
@@ -165,7 +165,7 @@ diff -ruN a/sql/filesort.cc b/sql/filesort.cc
      if (table_sort.buffpek && table_sort.buffpek_len < maxbuffer)
      {
        my_free(table_sort.buffpek);
-@@ -1197,6 +1199,7 @@
+@@ -1216,6 +1218,7 @@
    DBUG_ENTER("merge_buffers");
  
    status_var_increment(current_thd->status_var.filesort_merge_passes);
@@ -315,7 +315,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
  
          /* Note that my_b_write() assumes it knows the length for this */
          if (my_b_write(&log_file, (uchar*) buff, buff_len))
-@@ -2711,12 +2752,69 @@
+@@ -2711,12 +2751,69 @@
      sprintf(query_time_buff, "%.6f", ulonglong2double(query_utime)/1000000.0);
      sprintf(lock_time_buff,  "%.6f", ulonglong2double(lock_utime)/1000000.0);
      if (my_b_printf(&log_file,
@@ -430,7 +430,7 @@ diff -ruN a/sql/log.h b/sql/log.h
 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 --- a/sql/mysqld.cc    2011-02-21 22:57:24.442081625 +0200
 +++ b/sql/mysqld.cc    2011-02-21 22:59:30.845699981 +0200
-@@ -418,6 +418,10 @@
+@@ -419,6 +419,10 @@
  char* opt_secure_file_priv;
  my_bool opt_log_slow_admin_statements= 0;
  my_bool opt_log_slow_slave_statements= 0;
@@ -441,7 +441,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  my_bool lower_case_file_system= 0;
  my_bool opt_large_pages= 0;
  my_bool opt_super_large_pages= 0;
-@@ -5784,10 +5788,10 @@
+@@ -5806,10 +5810,10 @@
     "Log slow OPTIMIZE, ANALYZE, ALTER and other administrative statements to "
     "the slow log if it is open.", &opt_log_slow_admin_statements,
     &opt_log_slow_admin_statements, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -454,7 +454,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    {"log-slow-queries", OPT_SLOW_QUERY_LOG,
     "Log slow queries to a table or log file. Defaults logging to table "
     "mysql.slow_log or hostname-slow.log if --log-output=file is used. "
-@@ -7179,6 +7183,10 @@
+@@ -7194,6 +7198,10 @@
  
  C_MODE_END
  
@@ -465,7 +465,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  /**
    Get server options from the command line,
    and perform related server initializations.
-@@ -7318,6 +7326,8 @@
+@@ -7335,6 +7343,8 @@
    global_system_variables.long_query_time= (ulonglong)
      (global_system_variables.long_query_time_double * 1e6);
  
@@ -533,7 +533,7 @@ diff -ruN a/sql/sql_cache.cc b/sql/sql_cache.cc
 diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
 --- a/sql/sql_class.cc 2011-01-20 00:37:09.000000000 +0200
 +++ b/sql/sql_class.cc 2011-02-21 22:57:48.843760997 +0200
-@@ -367,6 +367,37 @@
+@@ -368,6 +368,37 @@
    thd->warning_info->inc_current_row_for_warning();
  }
  
@@ -571,7 +571,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  
  /**
    Dumps a text description of a thread, its security context
-@@ -661,6 +692,7 @@
+@@ -662,6 +693,7 @@
      *cond_hdl= NULL;
      return FALSE;
    }
@@ -579,7 +579,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  
    for (Internal_error_handler *error_handler= m_internal_handler;
         error_handler;
-@@ -3389,6 +3421,12 @@
+@@ -3390,6 +3422,12 @@
      first_successful_insert_id_in_prev_stmt;
    backup->first_successful_insert_id_in_cur_stmt= 
      first_successful_insert_id_in_cur_stmt;
@@ -592,7 +592,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  
    if ((!lex->requires_prelocking() || is_update_query(lex->sql_command)) &&
        !is_current_stmt_binlog_format_row())
-@@ -3409,6 +3447,14 @@
+@@ -3410,6 +3448,14 @@
    cuted_fields= 0;
    transaction.savepoints= 0;
    first_successful_insert_id_in_cur_stmt= 0;
@@ -607,7 +607,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  }
  
  
-@@ -3471,6 +3517,12 @@
+@@ -3472,6 +3518,12 @@
    */
    examined_row_count+= backup->examined_row_count;
    cuted_fields+=       backup->cuted_fields;
@@ -825,7 +825,7 @@ diff -ruN a/sql/sql_parse.cc b/sql/sql_parse.cc
 diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
 --- a/sql/sql_select.cc        2011-02-21 22:57:24.411087114 +0200
 +++ b/sql/sql_select.cc        2011-02-21 22:57:48.867756749 +0200
-@@ -6872,7 +6872,10 @@
+@@ -6894,7 +6894,10 @@
          {
            join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
            if (statistics)
@@ -836,7 +836,7 @@ diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
          }
        }
        else
-@@ -6886,7 +6889,10 @@
+@@ -6908,7 +6911,10 @@
          {
            join->thd->server_status|=SERVER_QUERY_NO_INDEX_USED;
            if (statistics)
@@ -847,7 +847,7 @@ diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
          }
        }
        if (!table->no_keyread)
-@@ -10217,6 +10223,7 @@
+@@ -10239,6 +10245,7 @@
                (ulong) rows_limit,test(group)));
  
    status_var_increment(thd->status_var.created_tmp_tables);
@@ -855,7 +855,7 @@ diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
  
    if (use_temp_pool && !(test_flags & TEST_KEEP_TMP_TABLES))
      temp_pool_slot = bitmap_lock_set_next(&temp_pool);
-@@ -11115,6 +11122,7 @@
+@@ -11137,6 +11144,7 @@
      goto err;
    }
    status_var_increment(table->in_use->status_var.created_tmp_disk_tables);
@@ -863,7 +863,7 @@ diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
    share->db_record_offset= 1;
    DBUG_RETURN(0);
   err:
-@@ -11133,6 +11141,14 @@
+@@ -11155,6 +11163,14 @@
    save_proc_info=thd->proc_info;
    thd_proc_info(thd, "removing tmp table");
  
@@ -881,7 +881,7 @@ diff -ruN a/sql/sql_select.cc b/sql/sql_select.cc
 diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
 --- a/sql/sql_show.cc  2011-02-21 22:57:24.456079146 +0200
 +++ b/sql/sql_show.cc  2011-02-21 22:57:48.873755686 +0200
-@@ -1942,8 +1942,17 @@
+@@ -1943,8 +1943,17 @@
          table->field[4]->store(command_name[tmp->command].str,
                                 command_name[tmp->command].length, cs);
        /* MYSQL_TIME */
index d0406436b9abdda40681be68ed484c63fdf4dae1..b05ce61ae83198a0478a5f5238471c89e8e9850a 100644 (file)
@@ -10,7 +10,7 @@ diff -ruN a/client/mysqldump.c b/client/mysqldump.c
 +++ b/client/mysqldump.c       2010-07-28 16:47:59.604985656 +0400
 @@ -139,6 +139,8 @@
  static uint opt_protocol= 0;
- static char *opt_plugin_dir= 0, *opt_default_auth;
+ static char *opt_plugin_dir= 0, *opt_default_auth= 0;
  
 +static my_bool server_supports_sql_no_fcache= FALSE;
 +
@@ -35,7 +35,7 @@ diff -ruN a/client/mysqldump.c b/client/mysqldump.c
    /*
      As we're going to set SQL_MODE, it would be lost on reconnect, so we
      cannot reconnect.
-@@ -3158,7 +3171,12 @@
+@@ -3167,7 +3180,12 @@
  
      /* now build the query string */
  
@@ -49,7 +49,7 @@ diff -ruN a/client/mysqldump.c b/client/mysqldump.c
      dynstr_append_checked(&query_string, filename);
      dynstr_append_checked(&query_string, "'");
  
-@@ -3208,7 +3226,12 @@
+@@ -3217,7 +3235,12 @@
        check_io(md_result_file);
      }
      
@@ -168,7 +168,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  
  #include <thr_alarm.h>
  #include <ft_global.h>
-@@ -484,6 +489,11 @@
+@@ -485,6 +490,11 @@
  ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
  ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
  ulong max_connections, max_connect_errors;
@@ -180,7 +180,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  /**
    Limit of the total number of prepared statements in the server.
    Is necessary to protect the server against out-of-memory attacks.
-@@ -4167,6 +4177,97 @@
+@@ -4186,6 +4196,97 @@
  #define decrement_handler_count()
  #endif /* defined(_WIN32) || defined(HAVE_SMEM) */
  
@@ -278,7 +278,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  
  #ifndef EMBEDDED_LIBRARY
  #ifndef DBUG_OFF
-@@ -4421,6 +4522,10 @@
+@@ -4442,6 +4543,10 @@
    test_lc_time_sz();
  #endif
  
@@ -289,7 +289,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    /*
      We have enough space for fiddling with the argv, continue
    */
-@@ -4624,6 +4729,10 @@
+@@ -4645,6 +4750,10 @@
    }
  #endif
    clean_up(1);
@@ -300,7 +300,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    mysqld_exit(0);
  }
  
-@@ -6445,6 +6554,7 @@
+@@ -6467,6 +6576,7 @@
    {"Delayed_errors",           (char*) &delayed_insert_errors,  SHOW_LONG},
    {"Delayed_insert_threads",   (char*) &delayed_insert_threads, SHOW_LONG_NOFLUSH},
    {"Delayed_writes",           (char*) &delayed_insert_writes,  SHOW_LONG},
index 7a97be80b461d9f7129889d31b730f2ef44fcbac..a43c9261c8cc7cde64149806bf3d67ee9ab849fb 100644 (file)
@@ -242,7 +242,7 @@ diff -ruN a/sql/handler.h b/sql/handler.h
  // the following is for checking tables
  
  #define HA_ADMIN_ALREADY_DONE   1
-@@ -561,10 +565,12 @@
+@@ -553,10 +557,12 @@
  enum enum_schema_tables
  {
    SCH_CHARSETS= 0,
@@ -255,7 +255,7 @@ diff -ruN a/sql/handler.h b/sql/handler.h
    SCH_ENGINES,
    SCH_EVENTS,
    SCH_FILES,
-@@ -592,9 +598,12 @@
+@@ -584,9 +590,12 @@
    SCH_TABLE_CONSTRAINTS,
    SCH_TABLE_NAMES,
    SCH_TABLE_PRIVILEGES,
@@ -268,7 +268,7 @@ diff -ruN a/sql/handler.h b/sql/handler.h
    SCH_VARIABLES,
    SCH_VIEWS
  };
-@@ -1209,6 +1218,9 @@
+@@ -1201,6 +1210,9 @@
    bool locked;
    bool implicit_emptied;                /* Can be !=0 only if HEAP */
    const COND *pushed_cond;
@@ -278,7 +278,7 @@ diff -ruN a/sql/handler.h b/sql/handler.h
    /**
      next_insert_id is the next value which should be inserted into the
      auto_increment column: in a inserting-multi-row statement (like INSERT
-@@ -1260,10 +1272,12 @@
+@@ -1252,10 +1264,12 @@
      ref_length(sizeof(my_off_t)),
      ft_handler(0), inited(NONE),
      locked(FALSE), implicit_emptied(0),
@@ -293,7 +293,7 @@ diff -ruN a/sql/handler.h b/sql/handler.h
    virtual ~handler(void)
    {
      DBUG_ASSERT(locked == FALSE);
-@@ -1386,6 +1400,8 @@
+@@ -1378,6 +1392,8 @@
    {
      table= table_arg;
      table_share= share;
@@ -302,7 +302,7 @@ diff -ruN a/sql/handler.h b/sql/handler.h
    }
    virtual double scan_time()
    { return ulonglong2double(stats.data_file_length) / IO_SIZE + 2; }
-@@ -1753,6 +1769,8 @@
+@@ -1745,6 +1761,8 @@
    virtual bool is_crashed() const  { return 0; }
    virtual bool auto_repair() const { return 0; }
  
@@ -370,7 +370,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
  /*
    Log error with all enabled log event handlers
  
-@@ -5042,6 +5049,8 @@
+@@ -5041,6 +5048,8 @@
                               thd->first_successful_insert_id_in_prev_stmt_for_binlog);
            if (e.write(file))
              goto err;
@@ -379,7 +379,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
          }
          if (thd->auto_inc_intervals_in_cur_stmt_for_binlog.nb_elements() > 0)
          {
-@@ -5053,12 +5062,16 @@
+@@ -5052,12 +5061,16 @@
                               minimum());
            if (e.write(file))
              goto err;
@@ -396,7 +396,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
          }
          if (thd->user_var_events.elements)
          {
-@@ -5081,6 +5094,8 @@
+@@ -5080,6 +5093,8 @@
                                   flags);
              if (e.write(file))
                goto err;
@@ -405,7 +405,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
            }
          }
        }
-@@ -5092,6 +5107,8 @@
+@@ -5091,6 +5106,8 @@
      if (event_info->write(file) ||
          DBUG_EVALUATE_IF("injecting_fault_writing", 1, 0))
        goto err;
@@ -414,7 +414,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
  
      error= 0;
  err:
-@@ -5277,7 +5294,8 @@
+@@ -5276,7 +5293,8 @@
      be reset as a READ_CACHE to be able to read the contents from it.
   */
  
@@ -424,7 +424,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
  {
    Mutex_sentry sentry(lock_log ? &LOCK_log : NULL);
  
-@@ -5324,6 +5342,7 @@
+@@ -5323,6 +5341,7 @@
        /* write the first half of the split header */
        if (my_b_write(&log_file, header, carry))
          return ER_ERROR_ON_WRITE;
@@ -432,7 +432,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
  
        /*
          copy fixed second half of header to cache so the correct
-@@ -5392,6 +5411,7 @@
+@@ -5391,6 +5410,7 @@
      /* Write data to the binary log file */
      if (my_b_write(&log_file, cache->read_pos, length))
        return ER_ERROR_ON_WRITE;
@@ -440,7 +440,7 @@ diff -ruN a/sql/log.cc b/sql/log.cc
      cache->read_pos=cache->read_end;          // Mark buffer used up
    } while ((length= my_b_fill(cache)));
  
-@@ -5506,20 +5526,23 @@
+@@ -5505,20 +5525,23 @@
        Query_log_event qinfo(thd, STRING_WITH_LEN("BEGIN"), TRUE, FALSE, TRUE, 0);
        if (qinfo.write(&log_file))
          goto err;
@@ -490,7 +490,7 @@ diff -ruN a/sql/log.h b/sql/log.h
 diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
 --- a/sql/mysqld.cc    2010-12-03 20:58:26.000000000 +0300
 +++ b/sql/mysqld.cc    2010-12-30 02:04:50.000000000 +0300
-@@ -438,6 +438,7 @@
+@@ -439,6 +439,7 @@
  uint    opt_debug_sync_timeout= 0;
  #endif /* defined(ENABLED_DEBUG_SYNC) */
  my_bool opt_old_style_user_limits= 0, trust_function_creators= 0;
@@ -498,7 +498,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  my_bool opt_optimizer_fix= 0;
  /*
    True if there is at least one per-hour limit for some user, so we should
-@@ -489,6 +490,7 @@
+@@ -490,6 +491,7 @@
  ulong binlog_cache_use= 0, binlog_cache_disk_use= 0;
  ulong binlog_stmt_cache_use= 0, binlog_stmt_cache_disk_use= 0;
  ulong max_connections, max_connect_errors;
@@ -506,7 +506,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  
  /* flashcache */
  int cachedev_fd;
-@@ -633,7 +635,9 @@
+@@ -634,7 +636,9 @@
    LOCK_crypt,
    LOCK_global_system_variables,
    LOCK_user_conn, LOCK_slave_list, LOCK_active_mi,
@@ -517,7 +517,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  /**
    The below lock protects access to two global server variables:
    max_prepared_stmt_count and prepared_stmt_count. These variables
-@@ -1493,6 +1497,11 @@
+@@ -1494,6 +1498,11 @@
  #ifdef HAVE_RESPONSE_TIME_DISTRIBUTION
    query_response_time_free();
  #endif // HAVE_RESPONSE_TIME_DISTRIBUTION
@@ -529,7 +529,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  #ifdef HAVE_REPLICATION
    end_slave_list();
  #endif
-@@ -1596,6 +1605,10 @@
+@@ -1597,6 +1606,10 @@
    mysql_cond_destroy(&COND_thread_cache);
    mysql_cond_destroy(&COND_flush_thread_cache);
    mysql_cond_destroy(&COND_manager);
@@ -540,7 +540,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
  }
  #endif /*EMBEDDED_LIBRARY*/
  
-@@ -3019,6 +3032,7 @@
+@@ -3033,6 +3046,7 @@
    {"show_binlog_events",   (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOG_EVENTS]), SHOW_LONG_STATUS},
    {"show_binlogs",         (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_BINLOGS]), SHOW_LONG_STATUS},
    {"show_charsets",        (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CHARSETS]), SHOW_LONG_STATUS},
@@ -548,7 +548,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    {"show_collations",      (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_COLLATIONS]), SHOW_LONG_STATUS},
    {"show_contributors",    (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CONTRIBUTORS]), SHOW_LONG_STATUS},
    {"show_create_db",       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_CREATE_DB]), SHOW_LONG_STATUS},
-@@ -3039,6 +3053,7 @@
+@@ -3053,6 +3067,7 @@
  #endif
    {"show_function_status", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS_FUNC]), SHOW_LONG_STATUS},
    {"show_grants",          (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_GRANTS]), SHOW_LONG_STATUS},
@@ -556,7 +556,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    {"show_keys",            (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_KEYS]), SHOW_LONG_STATUS},
    {"show_master_status",   (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_MASTER_STAT]), SHOW_LONG_STATUS},
    {"show_new_master",      (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_NEW_MASTER]), SHOW_LONG_STATUS},
-@@ -3058,10 +3073,13 @@
+@@ -3072,10 +3087,13 @@
    {"show_slave_status_nolock", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_SLAVE_NOLOCK_STAT]), SHOW_LONG_STATUS},
    {"show_status",          (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STATUS]), SHOW_LONG_STATUS},
    {"show_storage_engines", (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_STORAGE_ENGINES]), SHOW_LONG_STATUS},
@@ -570,7 +570,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    {"show_variables",       (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_VARIABLES]), SHOW_LONG_STATUS},
    {"show_warnings",        (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SHOW_WARNS]), SHOW_LONG_STATUS},
    {"slave_start",          (char*) offsetof(STATUS_VAR, com_stat[(uint) SQLCOM_SLAVE_START]), SHOW_LONG_STATUS},
-@@ -3582,6 +3600,13 @@
+@@ -3601,6 +3619,13 @@
    mysql_mutex_init(key_LOCK_server_started,
                     &LOCK_server_started, MY_MUTEX_INIT_FAST);
    mysql_cond_init(key_COND_server_started, &COND_server_started, NULL);
@@ -584,7 +584,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    sp_cache_init();
  #ifdef HAVE_EVENT_SCHEDULER
    Events::init_mutexes();
-@@ -3951,6 +3976,9 @@
+@@ -3970,6 +3995,9 @@
    query_response_time_init();
  #endif // HAVE_RESPONSE_TIME_DISTRIBUTION
    /* We have to initialize the storage engines before CSV logging */
@@ -594,7 +594,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    if (ha_init())
    {
      sql_print_error("Can't init databases");
-@@ -4087,6 +4115,9 @@
+@@ -4106,6 +4134,9 @@
  
    init_max_user_conn();
    init_update_queries();
@@ -604,7 +604,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    DBUG_RETURN(0);
  }
  
-@@ -5118,6 +5149,7 @@
+@@ -5139,6 +5170,7 @@
      {
        sql_print_warning("%s", ER_DEFAULT(ER_CON_COUNT_ERROR));
      }
@@ -612,7 +612,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
      delete thd;
      DBUG_VOID_RETURN;
    }
-@@ -7817,6 +7849,8 @@
+@@ -7834,6 +7866,8 @@
    key_delayed_insert_mutex, key_hash_filo_lock, key_LOCK_active_mi,
    key_LOCK_connection_count, key_LOCK_crypt, key_LOCK_delayed_create,
    key_LOCK_delayed_insert, key_LOCK_delayed_status, key_LOCK_error_log,
@@ -621,7 +621,7 @@ diff -ruN a/sql/mysqld.cc b/sql/mysqld.cc
    key_LOCK_gdl, key_LOCK_global_system_variables,
    key_LOCK_manager,
    key_LOCK_prepared_stmt_count,
-@@ -7854,6 +7888,13 @@
+@@ -7871,6 +7905,13 @@
    { &key_LOCK_delayed_insert, "LOCK_delayed_insert", PSI_FLAG_GLOBAL},
    { &key_LOCK_delayed_status, "LOCK_delayed_status", PSI_FLAG_GLOBAL},
    { &key_LOCK_error_log, "LOCK_error_log", PSI_FLAG_GLOBAL},
@@ -694,7 +694,7 @@ diff -ruN a/sql/mysqld.h b/sql/mysqld.h
  extern MYSQL_PLUGIN_IMPORT mysql_mutex_t LOCK_thread_count;
  #ifdef HAVE_OPENSSL
  extern mysql_mutex_t LOCK_des_key_file;
-@@ -452,6 +464,16 @@
+@@ -451,6 +463,16 @@
    return id;
  }
  
@@ -738,7 +738,7 @@ diff -ruN a/sql/sql_base.cc b/sql/sql_base.cc
 diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
 --- a/sql/sql_class.cc 2010-12-03 20:58:26.000000000 +0300
 +++ b/sql/sql_class.cc 2010-12-30 02:41:40.000000000 +0300
-@@ -601,6 +601,13 @@
+@@ -602,6 +602,13 @@
    mysys_var=0;
    binlog_evt_union.do_union= FALSE;
    enable_slow_log= 0;
@@ -752,7 +752,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  #ifndef DBUG_OFF
    dbug_sentry=THD_SENTRY_MAGIC;
  #endif
-@@ -981,6 +988,7 @@
+@@ -982,6 +989,7 @@
      variables.option_bits|= OPTION_BIN_LOG;
    else
      variables.option_bits&= ~OPTION_BIN_LOG;
@@ -760,7 +760,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  
  #if defined(ENABLED_DEBUG_SYNC)
    /* Initialize the Debug Sync Facility. See debug_sync.cc. */
-@@ -988,6 +996,94 @@
+@@ -989,6 +997,94 @@
  #endif /* defined(ENABLED_DEBUG_SYNC) */
  }
  
@@ -855,7 +855,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  
  /*
    Init THD for query processing.
-@@ -1722,6 +1818,32 @@
+@@ -1723,6 +1819,32 @@
  }
  #endif
  
@@ -888,7 +888,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  
  struct Item_change_record: public ilink
  {
-@@ -1898,6 +2020,7 @@
+@@ -1899,6 +2021,7 @@
    }
  
    thd->sent_row_count++;
@@ -896,7 +896,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  
    if (thd->vio_ok())
      DBUG_RETURN(protocol->write());
-@@ -1990,6 +2113,7 @@
+@@ -1991,6 +2114,7 @@
  select_export::~select_export()
  {
    thd->sent_row_count=row_count;
@@ -904,7 +904,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
  }
  
  
-@@ -3013,6 +3137,7 @@
+@@ -3014,6 +3138,7 @@
    if (likely(thd != 0))
    { /* current_thd==0 when close_connection() calls net_send_error() */
      thd->status_var.bytes_sent+= length;
@@ -912,7 +912,7 @@ diff -ruN a/sql/sql_class.cc b/sql/sql_class.cc
    }
  }
  
-@@ -3020,6 +3145,7 @@
+@@ -3021,6 +3146,7 @@
  void thd_increment_bytes_received(ulong length)
  {
    current_thd->status_var.bytes_received+= length;
@@ -2461,7 +2461,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
  /***************************************************************************
  ** List all table types supported
  ***************************************************************************/
-@@ -799,6 +836,7 @@
+@@ -800,6 +837,7 @@
                sctx->master_access);
    if (!(db_access & DB_ACLS) && check_grant_db(thd,dbname))
    {
@@ -2469,7 +2469,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
      my_error(ER_DBACCESS_DENIED_ERROR, MYF(0),
               sctx->priv_user, sctx->host_or_ip, dbname);
      general_log_print(thd,COM_INIT_DB,ER(ER_DBACCESS_DENIED_ERROR),
-@@ -2351,6 +2389,284 @@
+@@ -2352,6 +2390,284 @@
    DBUG_RETURN(res);
  }
  
@@ -2754,7 +2754,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
  
  /* collect status for all running threads */
  
-@@ -7512,6 +7828,104 @@
+@@ -7513,6 +7829,104 @@
  };
  
  
@@ -2859,7 +2859,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
  ST_FIELD_INFO processlist_fields_info[]=
  {
    {"ID", 4, MYSQL_TYPE_LONGLONG, 0, 0, "Id", SKIP_OPEN_TABLE},
-@@ -7701,6 +8115,8 @@
+@@ -7702,6 +8116,8 @@
  {
    {"CHARACTER_SETS", charsets_fields_info, create_schema_table, 
     fill_schema_charsets, make_character_sets_old_format, 0, -1, -1, 0, 0},
@@ -2868,7 +2868,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
    {"COLLATIONS", collation_fields_info, create_schema_table, 
     fill_schema_collation, make_old_format, 0, -1, -1, 0, 0},
    {"COLLATION_CHARACTER_SET_APPLICABILITY", coll_charset_app_fields_info,
-@@ -7710,6 +8126,8 @@
+@@ -7711,6 +8127,8 @@
     OPTIMIZE_I_S_TABLE|OPEN_VIEW_FULL},
    {"COLUMN_PRIVILEGES", column_privileges_fields_info, create_schema_table,
     fill_schema_column_privileges, 0, 0, -1, -1, 0, 0},
@@ -2877,7 +2877,7 @@ diff -ruN a/sql/sql_show.cc b/sql/sql_show.cc
    {"ENGINES", engines_fields_info, create_schema_table,
     fill_schema_engines, make_old_format, 0, -1, -1, 0, 0},
  #ifdef HAVE_EVENT_SCHEDULER
-@@ -7782,14 +8200,20 @@
+@@ -7783,14 +8201,20 @@
     get_all_tables, make_table_names_old_format, 0, 1, 2, 1, 0},
    {"TABLE_PRIVILEGES", table_privileges_fields_info, create_schema_table,
     fill_schema_table_privileges, 0, 0, -1, -1, 0, 0},
This page took 0.311821 seconds and 4 git commands to generate.