]> git.pld-linux.org Git - packages/mysql.git/blobdiff - innodb_fix_misc.patch
- rel. 2
[packages/mysql.git] / innodb_fix_misc.patch
index 794ed60449a6669058723dd73d460104e5c5739d..e58c5e50a29d984e8d917c40c884bf602e472b69 100644 (file)
@@ -12,7 +12,7 @@
 # should be done or reviewed by the maintainer!
 --- a/storage/innobase/buf/buf0buf.c
 +++ b/storage/innobase/buf/buf0buf.c
-@@ -2040,6 +2040,27 @@
+@@ -1981,6 +1981,27 @@
  #endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
        }
  
@@ -40,7 +40,7 @@
        if (UNIV_UNLIKELY(!bpage->zip.data)) {
                /* There is no compressed page. */
  err_exit:
-@@ -2549,6 +2570,27 @@
+@@ -2489,6 +2510,27 @@
                block = (buf_block_t*) buf_page_hash_get_low(
                        buf_pool, space, offset, fold);
                if (block) {
@@ -68,7 +68,7 @@
                        block_mutex = buf_page_get_mutex_enter((buf_page_t*)block);
                        ut_a(block_mutex);
                }
-@@ -3467,11 +3509,28 @@
+@@ -3411,11 +3453,28 @@
  
        fold = buf_page_address_fold(space, offset);
  
@@ -97,7 +97,7 @@
        if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) {
                /* The page is already in the buffer pool. */
                watch_page = NULL;
-@@ -3602,6 +3661,7 @@
+@@ -3546,6 +3605,7 @@
                bpage->state    = BUF_BLOCK_ZIP_PAGE;
                bpage->space    = space;
                bpage->offset   = offset;
  
  #ifdef UNIV_DEBUG
                bpage->in_page_hash = FALSE;
-@@ -3686,6 +3746,7 @@
+@@ -3630,6 +3690,7 @@
  
        fold = buf_page_address_fold(space, offset);
  
        //buf_pool_mutex_enter(buf_pool);
        mutex_enter(&buf_pool->LRU_list_mutex);
        rw_lock_x_lock(&buf_pool->page_hash_latch);
-@@ -3693,6 +3754,21 @@
+@@ -3637,6 +3698,21 @@
        block = (buf_block_t*) buf_page_hash_get_low(
                buf_pool, space, offset, fold);
  
        if (block
            && buf_page_in_file(&block->page)
            && !buf_pool_watch_is_sentinel(buf_pool, &block->page)) {
-@@ -3984,8 +4060,11 @@
+@@ -3990,8 +4066,11 @@
        }
  
        if (io_type == BUF_IO_WRITE
                        return(TRUE);
 --- a/storage/innobase/buf/buf0lru.c
 +++ b/storage/innobase/buf/buf0lru.c
-@@ -529,6 +529,62 @@
+@@ -545,6 +545,62 @@
        }
  }
  
 +                      for (k = chunk->size; k--; block++) {
 +                              if (buf_block_get_state(block)
 +                                  != BUF_BLOCK_FILE_PAGE
-+                                  || !block->is_hashed
++                                  || !block->index
 +                                  || buf_page_get_space(&block->page) != id) {
 +                                      continue;
 +                              }
  #if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
  /********************************************************************//**
  Insert a compressed block into buf_pool->zip_clean in the LRU order. */
-@@ -1483,6 +1539,10 @@
+@@ -1499,6 +1555,10 @@
                return(FALSE);
        }
  
  
        fil_system->spaces = hash_create(hash_size);
        fil_system->name_hash = hash_create(hash_size);
-@@ -2344,7 +2347,11 @@
+@@ -2352,7 +2355,11 @@
        completely and permanently. The flag is_being_deleted also prevents
        fil_flush() from being applied to this tablespace. */
  
  #endif
        /* printf("Deleting tablespace %s id %lu\n", space->name, id); */
  
-@@ -4722,6 +4729,10 @@
+@@ -4739,6 +4746,10 @@
        ulint           page_size;
        ibool           success         = TRUE;
  
        fil_mutex_enter_and_prepare_for_io(space_id);
  
        space = fil_space_get_by_id(space_id);
-@@ -4733,6 +4744,7 @@
+@@ -4750,6 +4761,7 @@
                *actual_size = space->size;
  
                mutex_exit(&fil_system->mutex);
  
                return(TRUE);
        }
-@@ -4765,6 +4777,8 @@
+@@ -4782,6 +4794,8 @@
                offset_low  = ((start_page_no - file_start_page_no)
                               % (4096 * ((1024 * 1024) / page_size)))
                        * page_size;
  #ifdef UNIV_HOTBACKUP
                success = os_file_write(node->name, node->handle, buf,
                                        offset_low, offset_high,
-@@ -4774,8 +4788,10 @@
+@@ -4791,8 +4805,10 @@
                                 node->name, node->handle, buf,
                                 offset_low, offset_high,
                                 page_size * n_pages,
                if (success) {
                        node->size += n_pages;
                        space->size += n_pages;
-@@ -4821,6 +4837,7 @@
+@@ -4838,6 +4854,7 @@
        printf("Extended %s to %lu, actual size %lu pages\n", space->name,
        size_after_extend, *actual_size); */
        mutex_exit(&fil_system->mutex);
  
        fil_flush(space_id, TRUE);
  
-@@ -5183,6 +5200,22 @@
+@@ -5200,6 +5217,22 @@
                srv_data_written+= len;
        }
  
        /* Reserve the fil_system mutex and make sure that we can open at
        least one file while holding it, if the file is not already open */
  
-@@ -5324,10 +5357,24 @@
+@@ -5341,10 +5374,24 @@
  #else
        /* Queue the aio request */
        ret = os_aio(type, mode | wake_later, node->name, node->handle, buf,
        ut_a(ret);
  
        if (mode == OS_AIO_SYNC) {
-@@ -5427,6 +5474,7 @@
+@@ -5444,6 +5491,7 @@
        fil_node_t*     fil_node;
        void*           message;
        ulint           type;
  
        ut_ad(fil_validate_skip());
  
-@@ -5434,10 +5482,10 @@
+@@ -5451,10 +5499,10 @@
                srv_set_io_thread_op_info(segment, "native aio handle");
  #ifdef WIN_ASYNC_IO
                ret = os_aio_windows_handle(segment, 0, &fil_node,
  #else
                ut_error;
                ret = 0; /* Eliminate compiler warning */
-@@ -5446,7 +5494,22 @@
+@@ -5463,7 +5511,22 @@
                srv_set_io_thread_op_info(segment, "simulated aio handle");
  
                ret = os_aio_simulated_handle(segment, &fil_node,
        ut_a(ret);
 --- a/storage/innobase/handler/ha_innodb.cc
 +++ b/storage/innobase/handler/ha_innodb.cc
-@@ -12023,6 +12023,12 @@
+@@ -12189,6 +12189,12 @@
    "except for the deletion.",
    NULL, NULL, 0, &corrupt_table_action_typelib);
  
  static struct st_mysql_sys_var* innobase_system_variables[]= {
    MYSQL_SYSVAR(page_size),
    MYSQL_SYSVAR(log_block_size),
-@@ -12114,6 +12120,7 @@
-   MYSQL_SYSVAR(purge_batch_size),
-   MYSQL_SYSVAR(rollback_segments),
+@@ -12286,6 +12292,7 @@
+   MYSQL_SYSVAR(flush_checkpoint_debug),
+ #endif
    MYSQL_SYSVAR(corrupt_table_action),
 +  MYSQL_SYSVAR(lazy_drop_table),
    NULL
  };
  
-@@ -12123,7 +12130,7 @@
+@@ -12295,7 +12302,7 @@
    &innobase_storage_engine,
    innobase_hton_name,
    plugin_author,
    NULL, /* Plugin Deinit */
 --- a/storage/innobase/include/buf0buf.h
 +++ b/storage/innobase/include/buf0buf.h
-@@ -1477,6 +1477,7 @@
+@@ -1475,6 +1475,7 @@
                                        0 if the block was never accessed
                                        in the buffer pool */
        /* @} */
        ibool           file_page_was_freed;
 --- a/storage/innobase/include/buf0buf.ic
 +++ b/storage/innobase/include/buf0buf.ic
-@@ -408,6 +408,7 @@
+@@ -426,6 +426,7 @@
        buf_block_set_state(block, BUF_BLOCK_FILE_PAGE);
        block->page.space = space;
        block->page.offset = page_no;
  
 --- a/storage/innobase/include/srv0srv.h
 +++ b/storage/innobase/include/srv0srv.h
-@@ -244,6 +244,8 @@
+@@ -249,6 +249,8 @@
  extern ulint  srv_pass_corrupt_table;
  
  extern ulint  srv_dict_size_limit;
  extern ulint  srv_n_rows_inserted;
 --- a/storage/innobase/include/sync0sync.h
 +++ b/storage/innobase/include/sync0sync.h
-@@ -693,6 +693,7 @@
+@@ -689,6 +689,7 @@
  #define       SYNC_BUF_POOL           150     /* Buffer pool mutex */
  #define       SYNC_BUF_FLUSH_LIST     145     /* Buffer flush list mutex */
  #define SYNC_DOUBLEWRITE      140
 +#define       SYNC_OUTER_ANY_LATCH    136
  #define       SYNC_ANY_LATCH          135
- #define SYNC_THR_LOCAL                133
  #define       SYNC_MEM_HASH           131
+ #define       SYNC_MEM_POOL           130
 --- a/storage/innobase/include/univ.i
 +++ b/storage/innobase/include/univ.i
-@@ -52,6 +52,11 @@
+@@ -53,6 +53,11 @@
  #define INNODB_VERSION_MINOR  1
  #define INNODB_VERSION_BUGFIX 8
  
  /* The following is the InnoDB version as shown in
  SELECT plugin_version FROM information_schema.plugins;
  calculated in make_version_string() in sql/sql_show.cc like this:
-@@ -64,7 +69,8 @@
+@@ -65,7 +70,8 @@
  #define INNODB_VERSION_STR                    \
        IB_TO_STR(INNODB_VERSION_MAJOR) "."     \
        IB_TO_STR(INNODB_VERSION_MINOR) "."     \
  
  /** Provide optional 4.x backwards compatibility for 5.0 and above */
  UNIV_INTERN ibool     row_rollback_on_timeout = FALSE;
-@@ -1191,6 +1192,13 @@
+@@ -1192,6 +1193,13 @@
  
        thr = que_fork_get_first_thr(prebuilt->ins_graph);
  
        if (prebuilt->sql_stat_start) {
                node->state = INS_NODE_SET_IX_LOCK;
                prebuilt->sql_stat_start = FALSE;
-@@ -2575,10 +2583,29 @@
+@@ -2576,10 +2584,29 @@
  
                        err = DB_ERROR;
                } else {
                }
        }
  
-@@ -2927,6 +2954,19 @@
+@@ -2928,6 +2955,19 @@
                        table->space = space;
                        index = dict_table_get_first_index(table);
                        do {
                        } while (index);
 --- a/storage/innobase/row/row0sel.c
 +++ b/storage/innobase/row/row0sel.c
-@@ -3367,6 +3367,7 @@
+@@ -3418,6 +3418,7 @@
        ulint           offsets_[REC_OFFS_NORMAL_SIZE];
        ulint*          offsets                         = offsets_;
        ibool           table_lock_waited               = FALSE;
  
        rec_offs_init(offsets_);
  
-@@ -3738,6 +3739,17 @@
+@@ -3796,6 +3797,17 @@
  
        /* Do some start-of-statement preparations */
  
        if (!prebuilt->sql_stat_start) {
                /* No need to set an intention lock or assign a read view */
  
-@@ -3748,6 +3760,18 @@
+@@ -3806,6 +3818,18 @@
                              " perform a consistent read\n"
                              "InnoDB: but the read view is not assigned!\n",
                              stderr);
                        ut_error;
 --- a/storage/innobase/srv/srv0srv.c
 +++ b/storage/innobase/srv/srv0srv.c
-@@ -441,6 +441,8 @@
+@@ -447,6 +447,8 @@
  UNIV_INTERN ulint     srv_pass_corrupt_table = 0; /* 0:disable 1:enable */
  
  UNIV_INTERN ulint     srv_dict_size_limit = 0;
  UNIV_INTERN ulong     srv_n_free_tickets_to_enter = 500;
 --- a/storage/innobase/srv/srv0start.c
 +++ b/storage/innobase/srv/srv0start.c
-@@ -2161,7 +2161,7 @@
+@@ -2187,7 +2187,7 @@
        if (srv_print_verbose_log) {
                ut_print_timestamp(stderr);
                fprintf(stderr,
        }
 --- a/storage/innobase/sync/sync0sync.c
 +++ b/storage/innobase/sync/sync0sync.c
-@@ -1225,6 +1225,7 @@
+@@ -1219,6 +1219,7 @@
+       case SYNC_LOG:
        case SYNC_LOG_FLUSH_ORDER:
-       case SYNC_THR_LOCAL:
        case SYNC_ANY_LATCH:
 +      case SYNC_OUTER_ANY_LATCH:
        case SYNC_FILE_FORMAT_TAG:
This page took 0.061525 seconds and 4 git commands to generate.