mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
Automatic merge
This commit is contained in:
@@ -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_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")
|
||||
|
||||
# remove support for Exception handling
|
||||
|
@@ -128,7 +128,6 @@ struct tm *gmtime_r(const time_t *timep,struct tm *tmp);
|
||||
|
||||
void pthread_exit(void *a); /* was #define pthread_exit(A) ExitThread(A)*/
|
||||
|
||||
|
||||
#ifndef ETIMEDOUT
|
||||
#define ETIMEDOUT 145 /* Win32 doesn't have this */
|
||||
#endif
|
||||
|
@@ -251,6 +251,7 @@ connection master;
|
||||
CREATE TABLE t1(s VARCHAR(10)) ENGINE=myisam;
|
||||
# -slave.opt has --replicate-ignore-table=test.t_ignored1
|
||||
CREATE TABLE t_ignored1(id INT AUTO_INCREMENT PRIMARY KEY) ENGINE=myisam;
|
||||
sync_slave_with_master;
|
||||
|
||||
connection slave;
|
||||
|
||||
|
@@ -76,6 +76,11 @@ UNLOCK TABLES;
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- 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
|
||||
UNLOCK TABLES;
|
||||
|
||||
|
@@ -72,8 +72,12 @@ UNLOCK TABLES;
|
||||
# clean up
|
||||
|
||||
-- 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
|
||||
-- reap
|
||||
UNLOCK TABLES;
|
||||
|
||||
-- connection con3
|
||||
|
@@ -163,9 +163,7 @@ if [ -f "storage/pbxt/bin/xtstat.exe" ] ; then
|
||||
cp storage/pbxt/bin/xtstat.{exe,pdb} $DESTDIR/bin
|
||||
fi
|
||||
|
||||
|
||||
cp server-tools/instance-manager/$TARGET/*.exe $DESTDIR/bin/
|
||||
|
||||
if [ x"$TARGET" != x"release" ] ; then
|
||||
cp server-tools/instance-manager/$TARGET/*.pdb $DESTDIR/bin/
|
||||
cp client/$TARGET/mysql.pdb $DESTDIR/bin/
|
||||
|
@@ -18,7 +18,6 @@ SET(CMAKE_CXX_FLAGS_DEBUG
|
||||
"${CMAKE_CXX_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
|
||||
SET(CMAKE_C_FLAGS_DEBUG
|
||||
"${CMAKE_C_FLAGS_DEBUG} -DSAFEMALLOC -DSAFE_MUTEX -DUSE_SYMDIR /Zi")
|
||||
|
||||
SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG}")
|
||||
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/include
|
||||
|
@@ -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_max_join_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);
|
||||
#endif
|
||||
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_relay_log_size(THD *thd, enum_var_type type);
|
||||
|
@@ -1,4 +1,4 @@
|
||||
/* 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
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -2598,10 +2598,9 @@ static my_bool translog_buffer_flush(struct st_translog_buffer *buffer)
|
||||
{
|
||||
/* some other flush in progress */
|
||||
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->overlay && translog_prev_buffer_flush_wait(buffer))
|
||||
DBUG_RETURN(0); /* some the thread flushed the buffer already */
|
||||
@@ -7769,6 +7768,7 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
|
||||
uint i;
|
||||
uint8 last_buffer_no, start_buffer_no;
|
||||
DBUG_ENTER("translog_flush_buffers");
|
||||
LINT_INIT(last_buffer_no);
|
||||
|
||||
/*
|
||||
We will recheck information when will lock buffers one by
|
||||
@@ -7789,7 +7789,6 @@ void translog_flush_buffers(TRANSLOG_ADDRESS *lsn,
|
||||
(uint) start_buffer_no, (uint) log_descriptor.bc.buffer_no,
|
||||
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
|
||||
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,
|
||||
struct st_translog_buffer *buffer= log_descriptor.bc.buffer;
|
||||
*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)",
|
||||
LSN_IN_PARTS(log_descriptor.bc.buffer->last_lsn)));
|
||||
LSN_IN_PARTS(*lsn)));
|
||||
last_buffer_no= log_descriptor.bc.buffer_no;
|
||||
log_descriptor.is_everything_flushed= 1;
|
||||
translog_force_current_buffer_to_finish();
|
||||
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) %
|
||||
TRANSLOG_BUFFERS_NO);
|
||||
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 */
|
||||
*sent_to_disk= translog_get_sent_to_disk();
|
||||
|
@@ -1025,6 +1025,7 @@ finish:
|
||||
*/
|
||||
static inline void inc_counter_for_resize_op(PAGECACHE *pagecache)
|
||||
{
|
||||
safe_mutex_assert_owner(&pagecache->cache_lock);
|
||||
pagecache->cnt_for_resize_op++;
|
||||
}
|
||||
|
||||
@@ -1037,6 +1038,7 @@ static inline void dec_counter_for_resize_op(PAGECACHE *pagecache)
|
||||
{
|
||||
#ifdef THREAD
|
||||
struct st_my_thread_var *last_thread;
|
||||
safe_mutex_assert_owner(&pagecache->cache_lock);
|
||||
if (!--pagecache->cnt_for_resize_op &&
|
||||
(last_thread= pagecache->resize_queue.last_thread))
|
||||
{
|
||||
@@ -1084,6 +1086,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.
|
||||
|
||||
@@ -1106,6 +1139,10 @@ void end_pagecache(PAGECACHE *pagecache, my_bool cleanup)
|
||||
|
||||
if (pagecache->disk_blocks > 0)
|
||||
{
|
||||
#ifndef DBUG_OFF
|
||||
check_pagecache_is_cleaned_up(pagecache);
|
||||
#endif
|
||||
|
||||
if (pagecache->block_mem)
|
||||
{
|
||||
my_large_free(pagecache->block_mem, MYF(0));
|
||||
@@ -2250,6 +2287,7 @@ static my_bool pagecache_wait_lock(PAGECACHE *pagecache,
|
||||
&pagecache->cache_lock);
|
||||
}
|
||||
while(thread->next);
|
||||
inc_counter_for_resize_op(pagecache);
|
||||
#else
|
||||
DBUG_ASSERT(0);
|
||||
#endif
|
||||
@@ -3457,7 +3495,7 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
|
||||
{
|
||||
/*
|
||||
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;
|
||||
}
|
||||
@@ -3527,8 +3565,17 @@ static my_bool pagecache_delete_internal(PAGECACHE *pagecache,
|
||||
page_link->requests--;
|
||||
/* See NOTE for pagecache_unlock about registering requests. */
|
||||
free_block(pagecache, block);
|
||||
dec_counter_for_resize_op(pagecache);
|
||||
return 0;
|
||||
|
||||
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);
|
||||
return error;
|
||||
}
|
||||
@@ -3579,6 +3626,8 @@ my_bool pagecache_delete_by_link(PAGECACHE *pagecache,
|
||||
*/
|
||||
DBUG_ASSERT((block->status &
|
||||
(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
|
||||
block and it can't be evicted (which is cause of lock fail and retry)
|
||||
@@ -3695,6 +3744,7 @@ restart:
|
||||
if (!page_link)
|
||||
{
|
||||
DBUG_PRINT("info", ("There is no such page in the cache"));
|
||||
dec_counter_for_resize_op(pagecache);
|
||||
pagecache_pthread_mutex_unlock(&pagecache->cache_lock);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
@@ -3707,6 +3757,7 @@ restart:
|
||||
"reassigned" : "in switch")));
|
||||
PCBLOCK_INFO(block);
|
||||
page_link->requests--;
|
||||
dec_counter_for_resize_op(pagecache);
|
||||
goto end;
|
||||
}
|
||||
/* See NOTE for pagecache_unlock about registering requests. */
|
||||
|
@@ -476,6 +476,7 @@ int main(int argc __attribute__((unused)),
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
DBUG_PRINT("info", ("thread ended"));
|
||||
|
||||
flush_pagecache_blocks(&pagecache, &file1, FLUSH_IGNORE_CHANGED);
|
||||
end_pagecache(&pagecache, 1);
|
||||
DBUG_PRINT("info", ("Page cache ended"));
|
||||
|
||||
|
@@ -341,6 +341,7 @@ int main(int argc __attribute__((unused)),
|
||||
pthread_mutex_unlock(&LOCK_thread_count);
|
||||
DBUG_PRINT("info", ("thread ended"));
|
||||
|
||||
flush_pagecache_blocks(&pagecache, &file1, FLUSH_IGNORE_CHANGED);
|
||||
end_pagecache(&pagecache, 1);
|
||||
DBUG_PRINT("info", ("Page cache ended"));
|
||||
|
||||
|
@@ -269,11 +269,6 @@ int main(int argc __attribute__((unused)),
|
||||
int *param, error;
|
||||
int rc;
|
||||
|
||||
/* Disabled until Sanja tests */
|
||||
plan(1);
|
||||
ok(1, "disabled");
|
||||
exit(0);
|
||||
|
||||
plan(WRITERS + FLUSHERS +
|
||||
ITERATIONS * WRITERS * 3 + FLUSH_ITERATIONS * FLUSHERS );
|
||||
|
||||
|
@@ -168,7 +168,7 @@ int main(int argc __attribute__((unused)), char *argv[])
|
||||
PAGECACHE_PIN_LEFT_UNPINNED,
|
||||
PAGECACHE_WRITE_DELAY,
|
||||
0, LSN_IMPOSSIBLE);
|
||||
flush_pagecache_blocks(&pagecache, &file1, FLUSH_FORCE_WRITE);
|
||||
flush_pagecache_blocks(&pagecache, &file1, FLUSH_RELEASE);
|
||||
}
|
||||
my_close(file1.file, MYF(MY_WME));
|
||||
if ((file1.file= my_open(first_translog_file, O_RDONLY, MYF(MY_WME))) < 0)
|
||||
|
@@ -748,19 +748,19 @@ int ha_oqgraph::fill_record(byte *record, const open_query::row &row)
|
||||
if (row.latch_indicator)
|
||||
{
|
||||
field[0]->set_notnull();
|
||||
field[0]->store((longlong) row.latch);
|
||||
field[0]->store((longlong) row.latch, 0);
|
||||
}
|
||||
|
||||
if (row.orig_indicator)
|
||||
{
|
||||
field[1]->set_notnull();
|
||||
field[1]->store((longlong) row.orig);
|
||||
field[1]->store((longlong) row.orig, 0);
|
||||
}
|
||||
|
||||
if (row.dest_indicator)
|
||||
{
|
||||
field[2]->set_notnull();
|
||||
field[2]->store((longlong) row.dest);
|
||||
field[2]->store((longlong) row.dest, 0);
|
||||
}
|
||||
|
||||
if (row.weight_indicator)
|
||||
@@ -772,13 +772,13 @@ int ha_oqgraph::fill_record(byte *record, const open_query::row &row)
|
||||
if (row.seq_indicator)
|
||||
{
|
||||
field[4]->set_notnull();
|
||||
field[4]->store((longlong) row.seq);
|
||||
field[4]->store((longlong) row.seq, 0);
|
||||
}
|
||||
|
||||
if (row.link_indicator)
|
||||
{
|
||||
field[5]->set_notnull();
|
||||
field[5]->store((longlong) row.link);
|
||||
field[5]->store((longlong) row.link, 0);
|
||||
}
|
||||
|
||||
if (ptrdiff)
|
||||
|
Reference in New Issue
Block a user