mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-main
into a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-5.1-marvel BitKeeper/etc/ignore: auto-union client/mysqlcheck.c: Auto merged client/mysqldump.c: Auto merged client/mysqltest.c: Auto merged include/Makefile.am: Auto merged include/m_string.h: Auto merged include/my_base.h: Auto merged include/my_dbug.h: Auto merged include/my_global.h: Auto merged include/my_sys.h: Auto merged libmysql/CMakeLists.txt: Auto merged libmysql/Makefile.shared: Auto merged mysql-test/lib/mtr_report.pl: Auto merged mysys/mf_keycache.c: Auto merged sql/gen_lex_hash.cc: Auto merged sql/ha_partition.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item_func.cc: Auto merged sql/lex.h: Auto merged sql/log.cc: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/opt_range.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_plugin.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged sql/table.h: Auto merged sql/unireg.cc: Auto merged storage/myisam/ft_boolean_search.c: Auto merged storage/myisam/ft_nlq_search.c: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/mi_check.c: Auto merged storage/myisam/mi_open.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged client/mysqlslap.c: Manual merge with main 5.1 tree.
This commit is contained in:
@@ -105,6 +105,7 @@
|
||||
#include <keycache.h>
|
||||
#include "my_static.h"
|
||||
#include <m_string.h>
|
||||
#include <my_bit.h>
|
||||
#include <errno.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -1262,12 +1263,12 @@ static void unlink_block(KEY_CACHE *keycache, BLOCK_LINK *block)
|
||||
|
||||
KEYCACHE_THREAD_TRACE("unlink_block");
|
||||
#if defined(KEYCACHE_DEBUG)
|
||||
KEYCACHE_DBUG_ASSERT(keycache->blocks_available != 0);
|
||||
keycache->blocks_available--;
|
||||
KEYCACHE_DBUG_PRINT("unlink_block",
|
||||
("unlinked block %u status=%x #requests=%u #available=%u",
|
||||
BLOCK_NUMBER(block), block->status,
|
||||
block->requests, keycache->blocks_available));
|
||||
KEYCACHE_DBUG_ASSERT(keycache->blocks_available >= 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2360,9 +2361,9 @@ restart:
|
||||
(block->hash_link->diskpos == filepos)));
|
||||
*page_st=page_status;
|
||||
KEYCACHE_DBUG_PRINT("find_key_block",
|
||||
("fd: %d pos: %lu block->status: %u page_status: %u",
|
||||
("fd: %d pos: %lu block->status: %u page_status: %d",
|
||||
file, (ulong) filepos, block->status,
|
||||
(uint) page_status));
|
||||
page_status));
|
||||
|
||||
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
|
||||
DBUG_EXECUTE("check_keycache2",
|
||||
@@ -2513,10 +2514,10 @@ static void read_block(KEY_CACHE *keycache,
|
||||
*/
|
||||
|
||||
uchar *key_cache_read(KEY_CACHE *keycache,
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length __attribute__((unused)),
|
||||
int return_buffer __attribute__((unused)))
|
||||
File file, my_off_t filepos, int level,
|
||||
uchar *buff, uint length,
|
||||
uint block_length __attribute__((unused)),
|
||||
int return_buffer __attribute__((unused)))
|
||||
{
|
||||
my_bool locked_and_incremented= FALSE;
|
||||
int error=0;
|
||||
@@ -2534,12 +2535,12 @@ uchar *key_cache_read(KEY_CACHE *keycache,
|
||||
uint status;
|
||||
int page_st;
|
||||
|
||||
/*
|
||||
/*
|
||||
When the key cache is once initialized, we use the cache_lock to
|
||||
reliably distinguish the cases of normal operation, resizing, and
|
||||
disabled cache. We always increment and decrement
|
||||
'cnt_for_resize_op' so that a resizer can wait for pending I/O.
|
||||
*/
|
||||
*/
|
||||
keycache_pthread_mutex_lock(&keycache->cache_lock);
|
||||
/*
|
||||
Cache resizing has two phases: Flushing and re-initializing. In
|
||||
@@ -2976,9 +2977,10 @@ int key_cache_write(KEY_CACHE *keycache,
|
||||
int error=0;
|
||||
DBUG_ENTER("key_cache_write");
|
||||
DBUG_PRINT("enter",
|
||||
("fd: %u pos: %lu length: %u block_length: %u key_block_length: %u",
|
||||
(uint) file, (ulong) filepos, length, block_length,
|
||||
keycache ? keycache->key_cache_block_size : 0));
|
||||
("fd: %u pos: %lu length: %u block_length: %u"
|
||||
" key_block_length: %u",
|
||||
(uint) file, (ulong) filepos, length, block_length,
|
||||
keycache ? keycache->key_cache_block_size : 0));
|
||||
|
||||
if (!dont_write)
|
||||
{
|
||||
@@ -3184,7 +3186,6 @@ int key_cache_write(KEY_CACHE *keycache,
|
||||
a flush.
|
||||
*/
|
||||
block->status&= ~BLOCK_FOR_UPDATE;
|
||||
|
||||
set_if_smaller(block->offset, offset);
|
||||
set_if_bigger(block->length, read_length+offset);
|
||||
|
||||
|
Reference in New Issue
Block a user