# should be done or reviewed by the maintainer!
--- a/storage/innobase/buf/buf0buf.c
+++ b/storage/innobase/buf/buf0buf.c
-@@ -1944,6 +1944,27 @@
+@@ -1981,6 +1981,27 @@
#endif /* UNIV_DEBUG || UNIV_BUF_DEBUG */
}
if (UNIV_UNLIKELY(!bpage->zip.data)) {
/* There is no compressed page. */
err_exit:
-@@ -2452,6 +2473,27 @@
+@@ -2489,6 +2510,27 @@
block = (buf_block_t*) buf_page_hash_get_low(
buf_pool, space, offset, fold);
if (block) {
block_mutex = buf_page_get_mutex_enter((buf_page_t*)block);
ut_a(block_mutex);
}
-@@ -3374,11 +3416,28 @@
+@@ -3411,11 +3453,28 @@
fold = buf_page_address_fold(space, offset);
if (watch_page && !buf_pool_watch_is_sentinel(buf_pool, watch_page)) {
/* The page is already in the buffer pool. */
watch_page = NULL;
-@@ -3509,6 +3568,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;
-@@ -3593,6 +3653,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);
-@@ -3600,6 +3661,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)) {
-@@ -3953,8 +4029,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 @@
}
}
#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
-@@ -12141,6 +12141,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),
-@@ -12235,6 +12241,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
};
-@@ -12244,7 +12251,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
-@@ -1455,6 +1455,7 @@
+@@ -1475,6 +1475,7 @@
0 if the block was never accessed
in the buffer pool */
/* @} */
UNIV_INTERN ulong srv_n_free_tickets_to_enter = 500;
--- a/storage/innobase/srv/srv0start.c
+++ b/storage/innobase/srv/srv0start.c
-@@ -2167,7 +2167,7 @@
+@@ -2187,7 +2187,7 @@
if (srv_print_verbose_log) {
ut_print_timestamp(stderr);
fprintf(stderr,