Commit 9ec7898f authored by Michael Widenius's avatar Michael Widenius

Merge with 5.1

parents 30ad214c bbb951cc
...@@ -116,7 +116,7 @@ IF(MSVC) ...@@ -116,7 +116,7 @@ IF(MSVC)
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG}) STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT}) STRING(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG_INIT ${CMAKE_CXX_FLAGS_DEBUG_INIT})
# set stack size (see bug#20815) # generate map files, set stack size (see bug#20815)
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1048576") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /STACK:1048576")
# remove support for Exception handling # remove support for Exception handling
......
...@@ -127,9 +127,8 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp); ...@@ -127,9 +127,8 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/ void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
#ifndef ETIMEDOUT
#ifndef ETIMEDOUT #define ETIMEDOUT 145 /* Win32 doesn't have this */
#define ETIMEDOUT 145
#endif #endif
#define getpid() GetCurrentThreadId() #define getpid() GetCurrentThreadId()
#define HAVE_LOCALTIME_R 1 #define HAVE_LOCALTIME_R 1
......
...@@ -251,6 +251,7 @@ connection master; ...@@ -251,6 +251,7 @@ connection master;
CREATE TABLE t1(s VARCHAR(10)) ENGINE=myisam; CREATE TABLE t1(s VARCHAR(10)) ENGINE=myisam;
# -slave.opt has --replicate-ignore-table=test.t_ignored1 # -slave.opt has --replicate-ignore-table=test.t_ignored1
CREATE TABLE t_ignored1(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam; CREATE TABLE t_ignored1(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
sync_slave_with_master;
connection slave; connection slave;
......
...@@ -2513,14 +2513,12 @@ sub fix_vs_config_dir () { ...@@ -2513,14 +2513,12 @@ sub fix_vs_config_dir () {
my $modified = 1e30; my $modified = 1e30;
$opt_vs_config=""; $opt_vs_config="";
for my $dir (qw(client/*.dir libmysql/libmysql.dir sql/mysqld.dir
sql/udf_example.dir storage/*/*.dir plugin/*/*.dir)) { for (<$basedir/sql/*/mysqld.exe>) {
for (<$basedir/$dir/*/BuildLog.htm>) { if (-M $_ < $modified)
if (-M $_ < $modified) {
{ $modified = -M _;
$modified = -M _; $opt_vs_config = basename(dirname($_));
$opt_vs_config = basename(dirname($_));
}
} }
} }
......
...@@ -76,6 +76,11 @@ UNLOCK TABLES; ...@@ -76,6 +76,11 @@ UNLOCK TABLES;
UNLOCK TABLES; UNLOCK TABLES;
-- connection con3 -- connection con3
#
# We may get a timeout error here if the tables are locked in a different
# order than expected. This is ok as the purpose of this patch is to ensure
# we don't get a crash in the previous unlock tables.
-- error 0, 1205
-- reap -- reap
UNLOCK TABLES; UNLOCK TABLES;
......
...@@ -72,8 +72,12 @@ UNLOCK TABLES; ...@@ -72,8 +72,12 @@ UNLOCK TABLES;
# clean up # clean up
-- connection con2 -- connection con2
-- reap #
# We may get a timeout error here if the tables are locked in a different
# order than expected. This is ok as the purpose of this patch is to ensure
# we don't get a crash in the previous unlock tables.
-- error 0, 1205 -- error 0, 1205
-- reap
UNLOCK TABLES; UNLOCK TABLES;
-- connection con3 -- connection con3
......
...@@ -177,7 +177,6 @@ cp tests/$TARGET/*.exe $DESTDIR/bin/ ...@@ -177,7 +177,6 @@ cp tests/$TARGET/*.exe $DESTDIR/bin/
cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/ cp libmysql/$TARGET/libmysql.dll $DESTDIR/bin/
cp sql/$TARGET/mysqld.exe $DESTDIR/bin/mysqld$EXE_SUFFIX.exe cp sql/$TARGET/mysqld.exe $DESTDIR/bin/mysqld$EXE_SUFFIX.exe
cp sql/$TARGET/mysqld.map $DESTDIR/bin/mysqld$EXE_SUFFIX.map
if [ x"$TARGET" != x"release" ] ; then if [ x"$TARGET" != x"release" ] ; then
cp sql/$TARGET/mysqld.pdb $DESTDIR/bin/mysqld$EXE_SUFFIX.pdb cp sql/$TARGET/mysqld.pdb $DESTDIR/bin/mysqld$EXE_SUFFIX.pdb
fi fi
...@@ -186,7 +185,6 @@ if [ x"$PACK_DEBUG" = x"" -a -f "sql/debug/mysqld.exe" -o \ ...@@ -186,7 +185,6 @@ if [ x"$PACK_DEBUG" = x"" -a -f "sql/debug/mysqld.exe" -o \
x"$PACK_DEBUG" = x"yes" ] ; then x"$PACK_DEBUG" = x"yes" ] ; then
cp sql/debug/mysqld.exe $DESTDIR/bin/mysqld-debug.exe cp sql/debug/mysqld.exe $DESTDIR/bin/mysqld-debug.exe
cp sql/debug/mysqld.pdb $DESTDIR/bin/mysqld-debug.pdb cp sql/debug/mysqld.pdb $DESTDIR/bin/mysqld-debug.pdb
cp sql/debug/mysqld.map $DESTDIR/bin/mysqld-debug.map
fi fi
# ---------------------------------------------------------------------- # ----------------------------------------------------------------------
......
...@@ -20,7 +20,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX") ...@@ -20,7 +20,7 @@ SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX")
ADD_DEFINITIONS(-DMYSQL_SERVER -DMYSQL_INSTANCE_MANAGER) ADD_DEFINITIONS(-DMYSQL_SERVER -DMYSQL_INSTANCE_MANAGER)
INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/sql INCLUDE_DIRECTORIES(${PROJECT_SOURCE_DIR}/include ${PROJECT_SOURCE_DIR}/sql
${PROJECT_SOURCE_DIR}/extra/yassl/include) ${PROJECT_SOURCE_DIR}/extra/yassl/include)
ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instance.cc instance_map.cc ADD_EXECUTABLE(mysqlmanager buffer.cc command.cc commands.cc guardian.cc instance.cc instance_map.cc
instance_options.cc listener.cc log.cc manager.cc messages.cc mysql_connection.cc instance_options.cc listener.cc log.cc manager.cc messages.cc mysql_connection.cc
mysqlmanager.cc options.cc parse.cc parse_output.cc priv.cc protocol.cc mysqlmanager.cc options.cc parse.cc parse_output.cc priv.cc protocol.cc
......
...@@ -18,7 +18,7 @@ SET(CMAKE_CXX_FLAGS_DEBUG ...@@ -18,7 +18,7 @@ SET(CMAKE_CXX_FLAGS_DEBUG
"${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi") "${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
SET(CMAKE_C_FLAGS_DEBUG SET(CMAKE_C_FLAGS_DEBUG
"${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi") "${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MAP /MAPINFO:EXPORTS") SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/extra/yassl/include ${CMAKE_SOURCE_DIR}/extra/yassl/include
......
...@@ -128,7 +128,9 @@ static void fix_net_write_timeout(THD *thd, enum_var_type type); ...@@ -128,7 +128,9 @@ static void fix_net_write_timeout(THD *thd, enum_var_type type);
static void fix_net_retry_count(THD *thd, enum_var_type type); static void fix_net_retry_count(THD *thd, enum_var_type type);
static void fix_max_join_size(THD *thd, enum_var_type type); static void fix_max_join_size(THD *thd, enum_var_type type);
static void fix_query_cache_size(THD *thd, enum_var_type type); static void fix_query_cache_size(THD *thd, enum_var_type type);
#ifdef HAVE_QUERY_CACHE
static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type); static void fix_query_cache_min_res_unit(THD *thd, enum_var_type type);
#endif
static void fix_myisam_max_sort_file_size(THD *thd, enum_var_type type); static void fix_myisam_max_sort_file_size(THD *thd, enum_var_type type);
static void fix_max_binlog_size(THD *thd, enum_var_type type); static void fix_max_binlog_size(THD *thd, enum_var_type type);
static void fix_max_relay_log_size(THD *thd, enum_var_type type); static void fix_max_relay_log_size(THD *thd, enum_var_type type);
......
...@@ -40,12 +40,19 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ...@@ -40,12 +40,19 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/extra/yassl/include) ${CMAKE_SOURCE_DIR}/extra/yassl/include)
# Removing compiler optimizations for innodb/mem/* files on 64-bit Windows IF(MSVC)
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297 # Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
IF (MSVC AND $(WIN64)) # due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
PROPERTIES COMPILE_FLAGS -Od) SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c
ENDIF (MSVC AND $(WIN64)) PROPERTIES COMPILE_FLAGS -Od)
ENDIF()
# Avoid "unreferenced label" warning in generated file
SET_SOURCE_FILES_PROPERTIES(pars/pars0grm.c
PROPERTIES COMPILE_FLAGS "/wd4102")
SET_SOURCE_FILES_PROPERTIES(pars/lexyy.c
PROPERTIES COMPILE_FLAGS "/wd4003")
ENDIF()
SET(INNODB_PLUGIN_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c SET(INNODB_PLUGIN_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
......
/* Copyright (C) 2007 MySQL AB & Sanja Belkin /* Copyright (C) 2007 MySQL AB & Sanja Belkin. 2010 Monty Program Ab.
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
...@@ -2598,11 +2598,10 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer) ...@@ -2598,11 +2598,10 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
{ {
/* some other flush in progress */ /* some other flush in progress */
translog_wait_for_closing(buffer); translog_wait_for_closing(buffer);
if (buffer->file != file || buffer->offset != offset || buffer->ver != ver)
DBUG_RETURN(0); /* some the thread flushed the buffer already */
} }
if (buffer->file != file || buffer->offset != offset || buffer->ver != ver)
DBUG_RETURN(0); /* some the thread flushed the buffer already */
if (buffer->overlay && translog_prev_buffer_flush_wait(buffer)) if (buffer->overlay && translog_prev_buffer_flush_wait(buffer))
DBUG_RETURN(0); /* some the thread flushed the buffer already */ DBUG_RETURN(0); /* some the thread flushed the buffer already */
...@@ -7769,6 +7768,7 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn, ...@@ -7769,6 +7768,7 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
uint i; uint i;
uint8 last_buffer_no, start_buffer_no; uint8 last_buffer_no, start_buffer_no;
DBUG_ENTER("translog_flush_buffers"); DBUG_ENTER("translog_flush_buffers");
LINT_INIT(last_buffer_no);
/* /*
We will recheck information when will lock buffers one by We will recheck information when will lock buffers one by
...@@ -7789,7 +7789,6 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn, ...@@ -7789,7 +7789,6 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
(uint) start_buffer_no, (uint) log_descriptor.bc.buffer_no, (uint) start_buffer_no, (uint) log_descriptor.bc.buffer_no,
LSN_IN_PARTS(log_descriptor.bc.buffer->prev_last_lsn))); LSN_IN_PARTS(log_descriptor.bc.buffer->prev_last_lsn)));
/* /*
if LSN up to which we have to flush bigger then maximum LSN of previous if LSN up to which we have to flush bigger then maximum LSN of previous
buffer and at least one LSN was saved in the current buffer (last_lsn != buffer and at least one LSN was saved in the current buffer (last_lsn !=
...@@ -7801,18 +7800,28 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn, ...@@ -7801,18 +7800,28 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
struct st_translog_buffer *buffer= log_descriptor.bc.buffer; struct st_translog_buffer *buffer= log_descriptor.bc.buffer;
*lsn= log_descriptor.bc.buffer->last_lsn; /* fix lsn if it was horizon */ *lsn= log_descriptor.bc.buffer->last_lsn; /* fix lsn if it was horizon */
DBUG_PRINT("info", ("LSN to flush fixed to last lsn: (%lu,0x%lx)", DBUG_PRINT("info", ("LSN to flush fixed to last lsn: (%lu,0x%lx)",
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn))); LSN_IN_PARTS(*lsn)));
last_buffer_no= log_descriptor.bc.buffer_no; last_buffer_no= log_descriptor.bc.buffer_no;
log_descriptor.is_everything_flushed= 1; log_descriptor.is_everything_flushed= 1;
translog_force_current_buffer_to_finish(); translog_force_current_buffer_to_finish();
translog_buffer_unlock(buffer); translog_buffer_unlock(buffer);
} }
else else if (log_descriptor.bc.buffer->prev_last_lsn != LSN_IMPOSSIBLE)
{ {
/* fix lsn if it was horizon */
*lsn= log_descriptor.bc.buffer->prev_last_lsn;
DBUG_PRINT("info", ("LSN to flush fixed to prev last lsn: (%lu,0x%lx)",
LSN_IN_PARTS(*lsn)));
last_buffer_no= ((log_descriptor.bc.buffer_no + TRANSLOG_BUFFERS_NO -1) % last_buffer_no= ((log_descriptor.bc.buffer_no + TRANSLOG_BUFFERS_NO -1) %
TRANSLOG_BUFFERS_NO); TRANSLOG_BUFFERS_NO);
translog_unlock(); translog_unlock();
} }
else if (log_descriptor.bc.buffer->last_lsn == LSN_IMPOSSIBLE)
{
DBUG_PRINT("info", ("There is no LSNs yet generated => do nothing"));
translog_unlock();
DBUG_VOID_RETURN;
}
/* flush buffers */ /* flush buffers */
*sent_to_disk= translog_get_sent_to_disk(); *sent_to_disk= translog_get_sent_to_disk();
......
...@@ -1025,6 +1025,7 @@ ulong resize_pagecache(PAGECACHE *pagecache, ...@@ -1025,6 +1025,7 @@ ulong resize_pagecache(PAGECACHE *pagecache,
*/ */
static inline void inc_counter_for_resize_op(PAGECACHE *pagecache) static inline void inc_counter_for_resize_op(PAGECACHE *pagecache)
{ {
safe_mutex_assert_owner(&pagecache->cache_lock);
pagecache->cnt_for_resize_op++; pagecache->cnt_for_resize_op++;
} }
...@@ -1037,6 +1038,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache) ...@@ -1037,6 +1038,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
{ {
#ifdef THREAD #ifdef THREAD
struct st_my_thread_var *last_thread; struct st_my_thread_var *last_thread;
safe_mutex_assert_owner(&pagecache->cache_lock);
if (!--pagecache->cnt_for_resize_op && if (!--pagecache->cnt_for_resize_op &&
(last_thread= pagecache->resize_queue.last_thread)) (last_thread= pagecache->resize_queue.last_thread))
{ {
...@@ -1044,6 +1046,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache) ...@@ -1044,6 +1046,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
("thread %ld", last_thread->next->id)); ("thread %ld", last_thread->next->id));
pagecache_pthread_cond_signal(&last_thread->next->suspend); pagecache_pthread_cond_signal(&last_thread->next->suspend);
} }
DBUG_ASSERT((longlong) pagecache->cnt_for_resize_op >= 0);
#else #else
pagecache->cnt_for_resize_op--; pagecache->cnt_for_resize_op--;
#endif #endif
...@@ -1084,6 +1087,37 @@ void change_pagecache_param(PAGECACHE *pagecache, uint division_limit, ...@@ -1084,6 +1087,37 @@ void change_pagecache_param(PAGECACHE *pagecache, uint division_limit,
} }
/*
Check that pagecache was used and cleaned up properly.
*/
#ifndef DBUG_OFF
void check_pagecache_is_cleaned_up(PAGECACHE *pagecache)
{
DBUG_ENTER("check_pagecache_is_cleaned_up");
/*
Ensure we called inc_counter_for_resize_op and dec_counter_for_resize_op
the same number of times. (If not, a resize() could never happen.
*/
DBUG_ASSERT(pagecache->cnt_for_resize_op == 0);
if (pagecache->disk_blocks > 0)
{
if (pagecache->block_mem)
{
uint i;
for (i=0 ; i < pagecache->blocks_used ; i++)
{
DBUG_ASSERT(pagecache->block_root[i].status == 0);
DBUG_ASSERT(pagecache->block_root[i].type == PAGECACHE_EMPTY_PAGE);
}
}
}
DBUG_VOID_RETURN;
}
#endif
/* /*
Removes page cache from memory. Does NOT flush pages to disk. Removes page cache from memory. Does NOT flush pages to disk.
...@@ -1106,6 +1140,10 @@ void end_pagecache(PAGECACHE *pagecache, my_bool cleanup) ...@@ -1106,6 +1140,10 @@ void end_pagecache(PAGECACHE *pagecache, my_bool cleanup)
if (pagecache->disk_blocks > 0) if (pagecache->disk_blocks > 0)
{ {
#ifndef DBUG_OFF
check_pagecache_is_cleaned_up(pagecache);
#endif
if (pagecache->block_mem) if (pagecache->block_mem)
{ {
my_large_free(pagecache->block_mem, MYF(0)); my_large_free(pagecache->block_mem, MYF(0));
...@@ -2250,6 +2288,7 @@ static my_bool pagecache_wait_lock(PAGECACHE *pagecache, ...@@ -2250,6 +2288,7 @@ static my_bool pagecache_wait_lock(PAGECACHE *pagecache,
&pagecache->cache_lock); &pagecache->cache_lock);
} }
while(thread->next); while(thread->next);
inc_counter_for_resize_op(pagecache);
#else #else
DBUG_ASSERT(0); DBUG_ASSERT(0);
#endif #endif
...@@ -3457,7 +3496,7 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache, ...@@ -3457,7 +3496,7 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
{ {
/* /*
this call is just 'hint' for the cache to free the page so we will this call is just 'hint' for the cache to free the page so we will
not interferes with flushing process but gust return success not interferes with flushing process but must return success
*/ */
goto out; goto out;
} }
...@@ -3527,8 +3566,17 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache, ...@@ -3527,8 +3566,17 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
page_link->requests--; page_link->requests--;
/* See NOTE for pagecache_unlock about registering requests. */ /* See NOTE for pagecache_unlock about registering requests. */
free_block(pagecache, block); free_block(pagecache, block);
dec_counter_for_resize_op(pagecache);
return 0;
out: out:
/* Cache is locked, so we can relese page before freeing it */
if (make_lock_and_pin(pagecache, block,
PAGECACHE_LOCK_WRITE_UNLOCK,
PAGECACHE_UNPIN, FALSE))
DBUG_ASSERT(0);
page_link->requests--;
unreg_request(pagecache, block, 1);
dec_counter_for_resize_op(pagecache); dec_counter_for_resize_op(pagecache);
return error; return error;
} }
...@@ -3579,6 +3627,8 @@ my_bool pagecache_delete_by_link(PAGECACHE *pagecache, ...@@ -3579,6 +3627,8 @@ my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
*/ */
DBUG_ASSERT((block->status & DBUG_ASSERT((block->status &
(PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0); (PCBLOCK_IN_SWITCH | PCBLOCK_REASSIGNED)) == 0);
inc_counter_for_resize_op(pagecache);
/* /*
make_lock_and_pin() can't fail here, because we are keeping pin on the make_lock_and_pin() can't fail here, because we are keeping pin on the
block and it can't be evicted (which is cause of lock fail and retry) block and it can't be evicted (which is cause of lock fail and retry)
...@@ -3695,6 +3745,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache, ...@@ -3695,6 +3745,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache,
if (!page_link) if (!page_link)
{ {
DBUG_PRINT("info", ("There is no such page in the cache")); DBUG_PRINT("info", ("There is no such page in the cache"));
dec_counter_for_resize_op(pagecache);
pagecache_pthread_mutex_unlock(&pagecache->cache_lock); pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
DBUG_RETURN(0); DBUG_RETURN(0);
} }
...@@ -3707,6 +3758,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache, ...@@ -3707,6 +3758,7 @@ my_bool pagecache_delete(PAGECACHE *pagecache,
"reassigned" : "in switch"))); "reassigned" : "in switch")));
PCBLOCK_INFO(block); PCBLOCK_INFO(block);
page_link->requests--; page_link->requests--;
dec_counter_for_resize_op(pagecache);
goto end; goto end;
} }
/* See NOTE for pagecache_unlock about registering requests. */ /* See NOTE for pagecache_unlock about registering requests. */
......
...@@ -42,12 +42,20 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include ...@@ -42,12 +42,20 @@ INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/zlib ${CMAKE_SOURCE_DIR}/zlib
${CMAKE_SOURCE_DIR}/extra/yassl/include) ${CMAKE_SOURCE_DIR}/extra/yassl/include)
# Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
# due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297 IF(MSVC)
IF (MSVC AND $(WIN64)) # Removing compiler optimizations for innodb/mem/* files on 64-bit Windows
SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c # due to 64-bit compiler error, See MySQL Bug #19424, #36366, #34297
PROPERTIES COMPILE_FLAGS -Od) IF(CMAKE_SIZEOF_VOID_P MATCHES 8)
ENDIF (MSVC AND $(WIN64)) SET_SOURCE_FILES_PROPERTIES(mem/mem0mem.c mem/mem0pool.c
PROPERTIES COMPILE_FLAGS -Od)
ENDIF()
# Avoid "unreferenced label" warning in generated file
SET_SOURCE_FILES_PROPERTIES(pars/pars0grm.c
PROPERTIES COMPILE_FLAGS "/wd4102")
SET_SOURCE_FILES_PROPERTIES(pars/lexyy.c
PROPERTIES COMPILE_FLAGS "/wd4003")
ENDIF()
SET(XTRADB_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c SET(XTRADB_SOURCES btr/btr0btr.c btr/btr0cur.c btr/btr0pcur.c btr/btr0sea.c
buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c buf/buf0buddy.c buf/buf0buf.c buf/buf0flu.c buf/buf0lru.c buf/buf0rea.c
......
...@@ -42,7 +42,7 @@ fseg_alloc_free_page) */ ...@@ -42,7 +42,7 @@ fseg_alloc_free_page) */
/* @} */ /* @} */
/** File space extent size (one megabyte) in pages */ /** File space extent size (one megabyte) in pages */
#define FSP_EXTENT_SIZE (1u << (20 - UNIV_PAGE_SIZE_SHIFT)) #define FSP_EXTENT_SIZE (1ULL << (20 - UNIV_PAGE_SIZE_SHIFT))
/** On a page of any file segment, data may be put starting from this /** On a page of any file segment, data may be put starting from this
offset */ offset */
......
cscript win\configure.js ^
WITH_EXAMPLE_STORAGE_ENGINE ^
WITH_FEDERATEDX_STORAGE_ENGINE ^
WITH_MERGE_STORAGE_ENGINE ^
WITH_PARTITION_STORAGE_ENGINE ^
WITH_MARIA_STORAGE_ENGINE ^
WITH_PBXT_STORAGE_ENGINE ^
WITH_XTRADB_STORAGE_ENGINE
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment