mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
This commit is contained in:
@@ -7532,7 +7532,7 @@ void fix_win_paths(char *val, size_t len)
|
|||||||
DBUG_PRINT("info", ("Converted \\ to /, p: %s", p));
|
DBUG_PRINT("info", ("Converted \\ to /, p: %s", p));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBUG_PRINT("exit", (" val: %s, len: %d", val, len));
|
DBUG_PRINT("exit", (" val: %s, len: %zu", val, len));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@@ -139,8 +139,8 @@ IF(MSVC)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
#TODO: update the code and remove the disabled warnings
|
#TODO: update the code and remove the disabled warnings
|
||||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /we4700")
|
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4800 /wd4805 /wd4996 /we4700 /we4311 /we4477 /we4302")
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099 /we4700")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4800 /wd4805 /wd4996 /wd4291 /wd4577 /we4099 /we4700 /we4311 /we4477 /we4302")
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
|
@@ -1341,8 +1341,8 @@ void _db_dump_(uint _line_, const char *keyword,
|
|||||||
{
|
{
|
||||||
fprintf(cs->stack->out_file->file, "%s: ", cs->func);
|
fprintf(cs->stack->out_file->file, "%s: ", cs->func);
|
||||||
}
|
}
|
||||||
(void) fprintf(cs->stack->out_file->file, "%s: Memory: 0x%lx Bytes: (%ld)\n",
|
(void) fprintf(cs->stack->out_file->file, "%s: Memory: %p Bytes: (%ld)\n",
|
||||||
keyword, (ulong) memory, (long) length);
|
keyword, memory, (long) length);
|
||||||
|
|
||||||
pos=0;
|
pos=0;
|
||||||
while (length-- > 0)
|
while (length-- > 0)
|
||||||
|
@@ -93,7 +93,7 @@ static bool use_end_page;
|
|||||||
static bool do_one_page;
|
static bool do_one_page;
|
||||||
static my_bool do_leaf;
|
static my_bool do_leaf;
|
||||||
static my_bool per_page_details;
|
static my_bool per_page_details;
|
||||||
static ulong n_merge;
|
static ulint n_merge;
|
||||||
extern ulong srv_checksum_algorithm;
|
extern ulong srv_checksum_algorithm;
|
||||||
static ulong physical_page_size; /* Page size in bytes on disk. */
|
static ulong physical_page_size; /* Page size in bytes on disk. */
|
||||||
static ulong logical_page_size; /* Page size when uncompressed. */
|
static ulong logical_page_size; /* Page size when uncompressed. */
|
||||||
@@ -1538,7 +1538,7 @@ int main(
|
|||||||
byte* buf = NULL;
|
byte* buf = NULL;
|
||||||
byte* xdes = NULL;
|
byte* xdes = NULL;
|
||||||
/* bytes read count */
|
/* bytes read count */
|
||||||
ulong bytes;
|
ulint bytes;
|
||||||
/* current time */
|
/* current time */
|
||||||
time_t now;
|
time_t now;
|
||||||
/* last time */
|
/* last time */
|
||||||
@@ -1675,7 +1675,7 @@ int main(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Read the minimum page size. */
|
/* Read the minimum page size. */
|
||||||
bytes = ulong(fread(buf, 1, UNIV_ZIP_SIZE_MIN, fil_in));
|
bytes = fread(buf, 1, UNIV_ZIP_SIZE_MIN, fil_in);
|
||||||
partial_page_read = true;
|
partial_page_read = true;
|
||||||
|
|
||||||
if (bytes != UNIV_ZIP_SIZE_MIN) {
|
if (bytes != UNIV_ZIP_SIZE_MIN) {
|
||||||
|
@@ -531,8 +531,8 @@ mode_extract(int n_threads, int argc __attribute__((unused)),
|
|||||||
ctxt.ds_ctxt = ds_ctxt;
|
ctxt.ds_ctxt = ds_ctxt;
|
||||||
ctxt.mutex = &mutex;
|
ctxt.mutex = &mutex;
|
||||||
|
|
||||||
tids = malloc(sizeof(pthread_t) * n_threads);
|
tids = calloc(n_threads, sizeof(pthread_t));
|
||||||
retvals = malloc(sizeof(void*) * n_threads);
|
retvals = calloc(n_threads, sizeof(void*));
|
||||||
|
|
||||||
for (i = 0; i < n_threads; i++)
|
for (i = 0; i < n_threads; i++)
|
||||||
pthread_create(tids + i, NULL, extract_worker_thread_func,
|
pthread_create(tids + i, NULL, extract_worker_thread_func,
|
||||||
@@ -542,7 +542,7 @@ mode_extract(int n_threads, int argc __attribute__((unused)),
|
|||||||
pthread_join(tids[i], retvals + i);
|
pthread_join(tids[i], retvals + i);
|
||||||
|
|
||||||
for (i = 0; i < n_threads; i++) {
|
for (i = 0; i < n_threads; i++) {
|
||||||
if ((ulong)retvals[i] == XB_STREAM_READ_ERROR) {
|
if ((size_t)retvals[i] == XB_STREAM_READ_ERROR) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@@ -1859,9 +1859,9 @@ xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info)
|
|||||||
MY_STAT mystat;
|
MY_STAT mystat;
|
||||||
|
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
"page_size = %lu\n"
|
"page_size = " ULINTPF "\n"
|
||||||
"zip_size = %lu\n"
|
"zip_size = " ULINTPF " \n"
|
||||||
"space_id = %lu\n",
|
"space_id = " ULINTPF "\n",
|
||||||
info->page_size.logical(),
|
info->page_size.logical(),
|
||||||
info->page_size.is_compressed()
|
info->page_size.is_compressed()
|
||||||
? info->page_size.physical() : 0,
|
? info->page_size.physical() : 0,
|
||||||
@@ -4174,7 +4174,7 @@ exit:
|
|||||||
|
|
||||||
char tmpname[FN_REFLEN];
|
char tmpname[FN_REFLEN];
|
||||||
|
|
||||||
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#%lu",
|
snprintf(tmpname, FN_REFLEN, "%s/xtrabackup_tmp_#" ULINTPF,
|
||||||
dbname, fil_space->id);
|
dbname, fil_space->id);
|
||||||
|
|
||||||
msg("xtrabackup: Renaming %s to %s.ibd\n",
|
msg("xtrabackup: Renaming %s to %s.ibd\n",
|
||||||
|
@@ -2053,9 +2053,9 @@ static my_bool store_param(MYSQL_STMT *stmt, MYSQL_BIND *param)
|
|||||||
{
|
{
|
||||||
NET *net= &stmt->mysql->net;
|
NET *net= &stmt->mysql->net;
|
||||||
DBUG_ENTER("store_param");
|
DBUG_ENTER("store_param");
|
||||||
DBUG_PRINT("enter",("type: %d buffer: 0x%lx length: %lu is_null: %d",
|
DBUG_PRINT("enter",("type: %d buffer:%p length: %lu is_null: %d",
|
||||||
param->buffer_type,
|
param->buffer_type,
|
||||||
(long) (param->buffer ? param->buffer : NullS),
|
param->buffer,
|
||||||
*param->length, *param->is_null));
|
*param->length, *param->is_null));
|
||||||
|
|
||||||
if (*param->is_null)
|
if (*param->is_null)
|
||||||
@@ -2979,8 +2979,8 @@ mysql_stmt_send_long_data(MYSQL_STMT *stmt, uint param_number,
|
|||||||
MYSQL_BIND *param;
|
MYSQL_BIND *param;
|
||||||
DBUG_ENTER("mysql_stmt_send_long_data");
|
DBUG_ENTER("mysql_stmt_send_long_data");
|
||||||
DBUG_ASSERT(stmt != 0);
|
DBUG_ASSERT(stmt != 0);
|
||||||
DBUG_PRINT("enter",("param no: %d data: 0x%lx, length : %ld",
|
DBUG_PRINT("enter",("param no: %d data: %p, length : %ld",
|
||||||
param_number, (long) data, length));
|
param_number, data, length));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
We only need to check for stmt->param_count, if it's not null
|
We only need to check for stmt->param_count, if it's not null
|
||||||
|
@@ -205,7 +205,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("exit",("Mysql handler: 0x%lx", (long) mysql));
|
DBUG_PRINT("exit",("Mysql handler: %p", mysql));
|
||||||
DBUG_RETURN(mysql);
|
DBUG_RETURN(mysql);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
12
mysys/hash.c
12
mysys/hash.c
@@ -84,7 +84,7 @@ my_hash_init2(HASH *hash, uint growth_size, CHARSET_INFO *charset,
|
|||||||
{
|
{
|
||||||
my_bool res;
|
my_bool res;
|
||||||
DBUG_ENTER("my_hash_init");
|
DBUG_ENTER("my_hash_init");
|
||||||
DBUG_PRINT("enter",("hash: 0x%lx size: %u", (long) hash, (uint) size));
|
DBUG_PRINT("enter",("hash:%p size: %u", hash, (uint) size));
|
||||||
|
|
||||||
hash->records=0;
|
hash->records=0;
|
||||||
hash->key_offset=key_offset;
|
hash->key_offset=key_offset;
|
||||||
@@ -144,8 +144,8 @@ static inline void my_hash_free_elements(HASH *hash)
|
|||||||
void my_hash_free(HASH *hash)
|
void my_hash_free(HASH *hash)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("my_hash_free");
|
DBUG_ENTER("my_hash_free");
|
||||||
DBUG_PRINT("enter",("hash: 0x%lx elements: %ld",
|
DBUG_PRINT("enter",("hash:%p elements: %ld",
|
||||||
(long) hash, hash->records));
|
hash, hash->records));
|
||||||
|
|
||||||
my_hash_free_elements(hash);
|
my_hash_free_elements(hash);
|
||||||
hash->free= 0;
|
hash->free= 0;
|
||||||
@@ -166,7 +166,7 @@ void my_hash_free(HASH *hash)
|
|||||||
void my_hash_reset(HASH *hash)
|
void my_hash_reset(HASH *hash)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("my_hash_reset");
|
DBUG_ENTER("my_hash_reset");
|
||||||
DBUG_PRINT("enter",("hash: 0x%lxd", (long) hash));
|
DBUG_PRINT("enter",("hash:%p", hash));
|
||||||
|
|
||||||
my_hash_free_elements(hash);
|
my_hash_free_elements(hash);
|
||||||
reset_dynamic(&hash->array);
|
reset_dynamic(&hash->array);
|
||||||
@@ -844,8 +844,8 @@ my_bool my_hash_check(HASH *hash)
|
|||||||
blength, records)) != i)
|
blength, records)) != i)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error", ("Record in wrong link at %d: Start %d "
|
DBUG_PRINT("error", ("Record in wrong link at %d: Start %d "
|
||||||
"Record: 0x%lx Record-link %d",
|
"Record:%p Record-link %d",
|
||||||
idx, i, (long) hash_info->data, rec_link));
|
idx, i, hash_info->data, rec_link));
|
||||||
error=1;
|
error=1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
LIST *list_add(LIST *root, LIST *element)
|
LIST *list_add(LIST *root, LIST *element)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("list_add");
|
DBUG_ENTER("list_add");
|
||||||
DBUG_PRINT("enter",("root: 0x%lx element: 0x%lx", (long) root, (long) element));
|
DBUG_PRINT("enter",("root: %p element: %p", root, element));
|
||||||
if (root)
|
if (root)
|
||||||
{
|
{
|
||||||
if (root->prev) /* If add in mid of list */
|
if (root->prev) /* If add in mid of list */
|
||||||
|
@@ -154,8 +154,8 @@ int init_io_cache(IO_CACHE *info, File file, size_t cachesize,
|
|||||||
my_off_t pos;
|
my_off_t pos;
|
||||||
my_off_t end_of_file= ~(my_off_t) 0;
|
my_off_t end_of_file= ~(my_off_t) 0;
|
||||||
DBUG_ENTER("init_io_cache");
|
DBUG_ENTER("init_io_cache");
|
||||||
DBUG_PRINT("enter",("cache: 0x%lx type: %d pos: %ld",
|
DBUG_PRINT("enter",("cache:%p type: %d pos: %llu",
|
||||||
(ulong) info, (int) type, (ulong) seek_offset));
|
info, (int) type, (ulonglong) seek_offset));
|
||||||
|
|
||||||
info->file= file;
|
info->file= file;
|
||||||
info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */
|
info->type= TYPE_NOT_SET; /* Don't set it until mutex are created */
|
||||||
@@ -437,8 +437,8 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
|
|||||||
my_bool clear_cache)
|
my_bool clear_cache)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("reinit_io_cache");
|
DBUG_ENTER("reinit_io_cache");
|
||||||
DBUG_PRINT("enter",("cache: 0x%lx type: %d seek_offset: %lu clear_cache: %d",
|
DBUG_PRINT("enter",("cache:%p type: %d seek_offset: %llu clear_cache: %d",
|
||||||
(ulong) info, type, (ulong) seek_offset,
|
info, type, (ulonglong) seek_offset,
|
||||||
(int) clear_cache));
|
(int) clear_cache));
|
||||||
|
|
||||||
DBUG_ASSERT(type == READ_CACHE || type == WRITE_CACHE);
|
DBUG_ASSERT(type == READ_CACHE || type == WRITE_CACHE);
|
||||||
@@ -865,10 +865,10 @@ void init_io_cache_share(IO_CACHE *read_cache, IO_CACHE_SHARE *cshare,
|
|||||||
IO_CACHE *write_cache, uint num_threads)
|
IO_CACHE *write_cache, uint num_threads)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("init_io_cache_share");
|
DBUG_ENTER("init_io_cache_share");
|
||||||
DBUG_PRINT("io_cache_share", ("read_cache: 0x%lx share: 0x%lx "
|
DBUG_PRINT("io_cache_share", ("read_cache: %p share: %p "
|
||||||
"write_cache: 0x%lx threads: %u",
|
"write_cache: %p threads: %u",
|
||||||
(long) read_cache, (long) cshare,
|
read_cache, cshare,
|
||||||
(long) write_cache, num_threads));
|
write_cache, num_threads));
|
||||||
|
|
||||||
DBUG_ASSERT(num_threads > 1);
|
DBUG_ASSERT(num_threads > 1);
|
||||||
DBUG_ASSERT(read_cache->type == READ_CACHE);
|
DBUG_ASSERT(read_cache->type == READ_CACHE);
|
||||||
@@ -930,9 +930,9 @@ void remove_io_thread(IO_CACHE *cache)
|
|||||||
flush_io_cache(cache);
|
flush_io_cache(cache);
|
||||||
|
|
||||||
mysql_mutex_lock(&cshare->mutex);
|
mysql_mutex_lock(&cshare->mutex);
|
||||||
DBUG_PRINT("io_cache_share", ("%s: 0x%lx",
|
DBUG_PRINT("io_cache_share", ("%s: %p",
|
||||||
(cache == cshare->source_cache) ?
|
(cache == cshare->source_cache) ?
|
||||||
"writer" : "reader", (long) cache));
|
"writer" : "reader", cache));
|
||||||
|
|
||||||
/* Remove from share. */
|
/* Remove from share. */
|
||||||
total= --cshare->total_threads;
|
total= --cshare->total_threads;
|
||||||
@@ -1006,9 +1006,9 @@ static int lock_io_cache(IO_CACHE *cache, my_off_t pos)
|
|||||||
/* Enter the lock. */
|
/* Enter the lock. */
|
||||||
mysql_mutex_lock(&cshare->mutex);
|
mysql_mutex_lock(&cshare->mutex);
|
||||||
cshare->running_threads--;
|
cshare->running_threads--;
|
||||||
DBUG_PRINT("io_cache_share", ("%s: 0x%lx pos: %lu running: %u",
|
DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u",
|
||||||
(cache == cshare->source_cache) ?
|
(cache == cshare->source_cache) ?
|
||||||
"writer" : "reader", (long) cache, (ulong) pos,
|
"writer" : "reader", cache, (ulong) pos,
|
||||||
cshare->running_threads));
|
cshare->running_threads));
|
||||||
|
|
||||||
if (cshare->source_cache)
|
if (cshare->source_cache)
|
||||||
@@ -1145,10 +1145,10 @@ static void unlock_io_cache(IO_CACHE *cache)
|
|||||||
{
|
{
|
||||||
IO_CACHE_SHARE *cshare= cache->share;
|
IO_CACHE_SHARE *cshare= cache->share;
|
||||||
DBUG_ENTER("unlock_io_cache");
|
DBUG_ENTER("unlock_io_cache");
|
||||||
DBUG_PRINT("io_cache_share", ("%s: 0x%lx pos: %lu running: %u",
|
DBUG_PRINT("io_cache_share", ("%s: %p pos: %lu running: %u",
|
||||||
(cache == cshare->source_cache) ?
|
(cache == cshare->source_cache) ?
|
||||||
"writer" : "reader",
|
"writer" : "reader",
|
||||||
(long) cache, (ulong) cshare->pos_in_file,
|
cache, (ulong) cshare->pos_in_file,
|
||||||
cshare->total_threads));
|
cshare->total_threads));
|
||||||
|
|
||||||
cshare->running_threads= cshare->total_threads;
|
cshare->running_threads= cshare->total_threads;
|
||||||
@@ -1899,7 +1899,7 @@ int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock)
|
|||||||
size_t length;
|
size_t length;
|
||||||
my_bool append_cache= (info->type == SEQ_READ_APPEND);
|
my_bool append_cache= (info->type == SEQ_READ_APPEND);
|
||||||
DBUG_ENTER("my_b_flush_io_cache");
|
DBUG_ENTER("my_b_flush_io_cache");
|
||||||
DBUG_PRINT("enter", ("cache: 0x%lx", (long) info));
|
DBUG_PRINT("enter", ("cache: %p", info));
|
||||||
|
|
||||||
if (!append_cache)
|
if (!append_cache)
|
||||||
need_append_buffer_lock= 0;
|
need_append_buffer_lock= 0;
|
||||||
@@ -1977,7 +1977,7 @@ int end_io_cache(IO_CACHE *info)
|
|||||||
{
|
{
|
||||||
int error=0;
|
int error=0;
|
||||||
DBUG_ENTER("end_io_cache");
|
DBUG_ENTER("end_io_cache");
|
||||||
DBUG_PRINT("enter",("cache: 0x%lx", (ulong) info));
|
DBUG_PRINT("enter",("cache: %p", info));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Every thread must call remove_io_thread(). The last one destroys
|
Every thread must call remove_io_thread(). The last one destroys
|
||||||
|
@@ -609,11 +609,11 @@ int init_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache,
|
|||||||
keycache->waiting_for_hash_link.last_thread= NULL;
|
keycache->waiting_for_hash_link.last_thread= NULL;
|
||||||
keycache->waiting_for_block.last_thread= NULL;
|
keycache->waiting_for_block.last_thread= NULL;
|
||||||
DBUG_PRINT("exit",
|
DBUG_PRINT("exit",
|
||||||
("disk_blocks: %d block_root: 0x%lx hash_entries: %d\
|
("disk_blocks: %d block_root: %p hash_entries: %d\
|
||||||
hash_root: 0x%lx hash_links: %d hash_link_root: 0x%lx",
|
hash_root: %p hash_links: %d hash_link_root: %p",
|
||||||
keycache->disk_blocks, (long) keycache->block_root,
|
keycache->disk_blocks, keycache->block_root,
|
||||||
keycache->hash_entries, (long) keycache->hash_root,
|
keycache->hash_entries, keycache->hash_root,
|
||||||
keycache->hash_links, (long) keycache->hash_link_root));
|
keycache->hash_links, keycache->hash_link_root));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -963,7 +963,7 @@ static
|
|||||||
void end_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache, my_bool cleanup)
|
void end_simple_key_cache(SIMPLE_KEY_CACHE_CB *keycache, my_bool cleanup)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("end_simple_key_cache");
|
DBUG_ENTER("end_simple_key_cache");
|
||||||
DBUG_PRINT("enter", ("key_cache: 0x%lx", (long) keycache));
|
DBUG_PRINT("enter", ("key_cache: %p", keycache));
|
||||||
|
|
||||||
if (!keycache->key_cache_inited)
|
if (!keycache->key_cache_inited)
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
@@ -4366,7 +4366,7 @@ int flush_simple_key_cache_blocks(SIMPLE_KEY_CACHE_CB *keycache,
|
|||||||
{
|
{
|
||||||
int res= 0;
|
int res= 0;
|
||||||
DBUG_ENTER("flush_key_blocks");
|
DBUG_ENTER("flush_key_blocks");
|
||||||
DBUG_PRINT("enter", ("keycache: 0x%lx", (long) keycache));
|
DBUG_PRINT("enter", ("keycache: %p", keycache));
|
||||||
|
|
||||||
if (!keycache->key_cache_inited)
|
if (!keycache->key_cache_inited)
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
@@ -4795,11 +4795,11 @@ void keycache_debug_log_close(void)
|
|||||||
|
|
||||||
static int fail_block(BLOCK_LINK *block)
|
static int fail_block(BLOCK_LINK *block)
|
||||||
{
|
{
|
||||||
F_B_PRT("block->next_used: %lx\n", (ulong) block->next_used);
|
F_B_PRT("block->next_used: %p\n", block->next_used);
|
||||||
F_B_PRT("block->prev_used: %lx\n", (ulong) block->prev_used);
|
F_B_PRT("block->prev_used: %p\n", block->prev_used);
|
||||||
F_B_PRT("block->next_changed: %lx\n", (ulong) block->next_changed);
|
F_B_PRT("block->next_changed: %p\n", block->next_changed);
|
||||||
F_B_PRT("block->prev_changed: %lx\n", (ulong) block->prev_changed);
|
F_B_PRT("block->prev_changed: %p\n", block->prev_changed);
|
||||||
F_B_PRT("block->hash_link: %lx\n", (ulong) block->hash_link);
|
F_B_PRT("block->hash_link: %p\n", block->hash_link);
|
||||||
F_B_PRT("block->status: %u\n", block->status);
|
F_B_PRT("block->status: %u\n", block->status);
|
||||||
F_B_PRT("block->length: %u\n", block->length);
|
F_B_PRT("block->length: %u\n", block->length);
|
||||||
F_B_PRT("block->offset: %u\n", block->offset);
|
F_B_PRT("block->offset: %u\n", block->offset);
|
||||||
@@ -4810,9 +4810,9 @@ static int fail_block(BLOCK_LINK *block)
|
|||||||
|
|
||||||
static int fail_hlink(HASH_LINK *hlink)
|
static int fail_hlink(HASH_LINK *hlink)
|
||||||
{
|
{
|
||||||
F_B_PRT("hlink->next: %lx\n", (ulong) hlink->next);
|
F_B_PRT("hlink->next: %p\n", hlink->next);
|
||||||
F_B_PRT("hlink->prev: %lx\n", (ulong) hlink->prev);
|
F_B_PRT("hlink->prev: %p\n", hlink->prev);
|
||||||
F_B_PRT("hlink->block: %lx\n", (ulong) hlink->block);
|
F_B_PRT("hlink->block: %p\n", hlink->block);
|
||||||
F_B_PRT("hlink->diskpos: %lu\n", (ulong) hlink->diskpos);
|
F_B_PRT("hlink->diskpos: %lu\n", (ulong) hlink->diskpos);
|
||||||
F_B_PRT("hlink->file: %d\n", hlink->file);
|
F_B_PRT("hlink->file: %d\n", hlink->file);
|
||||||
return 0; /* Let the assert fail. */
|
return 0; /* Let the assert fail. */
|
||||||
@@ -5358,7 +5358,7 @@ void end_partitioned_key_cache(PARTITIONED_KEY_CACHE_CB *keycache,
|
|||||||
uint i;
|
uint i;
|
||||||
uint partitions= keycache->partitions;
|
uint partitions= keycache->partitions;
|
||||||
DBUG_ENTER("partitioned_end_key_cache");
|
DBUG_ENTER("partitioned_end_key_cache");
|
||||||
DBUG_PRINT("enter", ("key_cache: 0x%lx", (long) keycache));
|
DBUG_PRINT("enter", ("key_cache: %p", keycache));
|
||||||
|
|
||||||
for (i= 0; i < partitions; i++)
|
for (i= 0; i < partitions; i++)
|
||||||
{
|
{
|
||||||
@@ -5672,7 +5672,7 @@ int flush_partitioned_key_cache_blocks(PARTITIONED_KEY_CACHE_CB *keycache,
|
|||||||
int err= 0;
|
int err= 0;
|
||||||
ulonglong *dirty_part_map= (ulonglong *) file_extra;
|
ulonglong *dirty_part_map= (ulonglong *) file_extra;
|
||||||
DBUG_ENTER("partitioned_flush_key_blocks");
|
DBUG_ENTER("partitioned_flush_key_blocks");
|
||||||
DBUG_PRINT("enter", ("keycache: 0x%lx", (long) keycache));
|
DBUG_PRINT("enter", ("keycache: %p", keycache));
|
||||||
|
|
||||||
for (i= 0; i < partitions; i++)
|
for (i= 0; i < partitions; i++)
|
||||||
{
|
{
|
||||||
|
@@ -173,8 +173,8 @@ fn_expand(const char *filename, char *result_buf)
|
|||||||
char dir[FN_REFLEN];
|
char dir[FN_REFLEN];
|
||||||
const int flags= MY_UNPACK_FILENAME | MY_SAFE_PATH | MY_RELATIVE_PATH;
|
const int flags= MY_UNPACK_FILENAME | MY_SAFE_PATH | MY_RELATIVE_PATH;
|
||||||
DBUG_ENTER("fn_expand");
|
DBUG_ENTER("fn_expand");
|
||||||
DBUG_PRINT("enter", ("filename: %s, result_buf: 0x%lx",
|
DBUG_PRINT("enter", ("filename: %s, result_buf: %p",
|
||||||
filename, (unsigned long) result_buf));
|
filename, result_buf));
|
||||||
if (my_getwd(dir, sizeof(dir), MYF(0)))
|
if (my_getwd(dir, sizeof(dir), MYF(0)))
|
||||||
DBUG_RETURN(3);
|
DBUG_RETURN(3);
|
||||||
DBUG_PRINT("debug", ("dir: %s", dir));
|
DBUG_PRINT("debug", ("dir: %s", dir));
|
||||||
|
@@ -74,7 +74,7 @@ FILE *my_fopen(const char *filename, int flags, myf MyFlags)
|
|||||||
my_file_total_opened++;
|
my_file_total_opened++;
|
||||||
my_file_info[filedesc].type= STREAM_BY_FOPEN;
|
my_file_info[filedesc].type= STREAM_BY_FOPEN;
|
||||||
mysql_mutex_unlock(&THR_LOCK_open);
|
mysql_mutex_unlock(&THR_LOCK_open);
|
||||||
DBUG_PRINT("exit",("stream: 0x%lx", (long) fd));
|
DBUG_PRINT("exit",("stream: %p", fd));
|
||||||
DBUG_RETURN(fd);
|
DBUG_RETURN(fd);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -222,7 +222,7 @@ int my_fclose(FILE *fd, myf MyFlags)
|
|||||||
{
|
{
|
||||||
int err,file;
|
int err,file;
|
||||||
DBUG_ENTER("my_fclose");
|
DBUG_ENTER("my_fclose");
|
||||||
DBUG_PRINT("my",("stream: 0x%lx MyFlags: %lu", (long) fd, MyFlags));
|
DBUG_PRINT("my",("stream: %p MyFlags: %lu", fd, MyFlags));
|
||||||
|
|
||||||
mysql_mutex_lock(&THR_LOCK_open);
|
mysql_mutex_lock(&THR_LOCK_open);
|
||||||
file= my_fileno(fd);
|
file= my_fileno(fd);
|
||||||
@@ -292,7 +292,7 @@ FILE *my_fdopen(File Filedes, const char *name, int Flags, myf MyFlags)
|
|||||||
mysql_mutex_unlock(&THR_LOCK_open);
|
mysql_mutex_unlock(&THR_LOCK_open);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("exit",("stream: 0x%lx", (long) fd));
|
DBUG_PRINT("exit",("stream: %p", fd));
|
||||||
DBUG_RETURN(fd);
|
DBUG_RETURN(fd);
|
||||||
} /* my_fdopen */
|
} /* my_fdopen */
|
||||||
|
|
||||||
|
@@ -46,8 +46,8 @@ size_t my_fread(FILE *stream, uchar *Buffer, size_t Count, myf MyFlags)
|
|||||||
{
|
{
|
||||||
size_t readbytes;
|
size_t readbytes;
|
||||||
DBUG_ENTER("my_fread");
|
DBUG_ENTER("my_fread");
|
||||||
DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %lu",
|
DBUG_PRINT("my",("stream: %p Buffer %p Count: %u MyFlags: %lu",
|
||||||
(long) stream, (long) Buffer, (uint) Count, MyFlags));
|
stream, Buffer, (uint) Count, MyFlags));
|
||||||
|
|
||||||
if ((readbytes= fread(Buffer, sizeof(char), Count, stream)) != Count)
|
if ((readbytes= fread(Buffer, sizeof(char), Count, stream)) != Count)
|
||||||
{
|
{
|
||||||
@@ -94,8 +94,8 @@ size_t my_fwrite(FILE *stream, const uchar *Buffer, size_t Count, myf MyFlags)
|
|||||||
uint errors;
|
uint errors;
|
||||||
#endif
|
#endif
|
||||||
DBUG_ENTER("my_fwrite");
|
DBUG_ENTER("my_fwrite");
|
||||||
DBUG_PRINT("my",("stream: 0x%lx Buffer: 0x%lx Count: %u MyFlags: %lu",
|
DBUG_PRINT("my",("stream:%p Buffer:%p Count: %u MyFlags: %lu",
|
||||||
(long) stream, (long) Buffer, (uint) Count, MyFlags));
|
stream, Buffer, (uint) Count, MyFlags));
|
||||||
|
|
||||||
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
|
#if !defined(NO_BACKGROUND) && defined(USE_MY_STREAM)
|
||||||
errors=0;
|
errors=0;
|
||||||
@@ -163,8 +163,8 @@ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence,
|
|||||||
myf MyFlags __attribute__((unused)))
|
myf MyFlags __attribute__((unused)))
|
||||||
{
|
{
|
||||||
DBUG_ENTER("my_fseek");
|
DBUG_ENTER("my_fseek");
|
||||||
DBUG_PRINT("my",("stream: 0x%lx pos: %lu whence: %d MyFlags: %lu",
|
DBUG_PRINT("my",("stream:%p pos: %llu whence: %d MyFlags: %lu",
|
||||||
(long) stream, (long) pos, whence, MyFlags));
|
stream, (ulonglong) pos, whence, MyFlags));
|
||||||
DBUG_RETURN(fseek(stream, (off_t) pos, whence) ?
|
DBUG_RETURN(fseek(stream, (off_t) pos, whence) ?
|
||||||
MY_FILEPOS_ERROR : (my_off_t) ftell(stream));
|
MY_FILEPOS_ERROR : (my_off_t) ftell(stream));
|
||||||
} /* my_seek */
|
} /* my_seek */
|
||||||
@@ -174,11 +174,11 @@ my_off_t my_fseek(FILE *stream, my_off_t pos, int whence,
|
|||||||
|
|
||||||
my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused)))
|
my_off_t my_ftell(FILE *stream, myf MyFlags __attribute__((unused)))
|
||||||
{
|
{
|
||||||
off_t pos;
|
long long pos;
|
||||||
DBUG_ENTER("my_ftell");
|
DBUG_ENTER("my_ftell");
|
||||||
DBUG_PRINT("my",("stream: 0x%lx MyFlags: %lu", (long) stream, MyFlags));
|
DBUG_PRINT("my",("stream:%p MyFlags: %lu", stream, MyFlags));
|
||||||
pos=ftell(stream);
|
pos=IF_WIN(_ftelli64(stream),ftell(stream));
|
||||||
DBUG_PRINT("exit",("ftell: %lu",(ulong) pos));
|
DBUG_PRINT("exit",("ftell: %lld",pos));
|
||||||
DBUG_RETURN((my_off_t) pos);
|
DBUG_RETURN((my_off_t) pos);
|
||||||
} /* my_ftell */
|
} /* my_ftell */
|
||||||
|
|
||||||
|
@@ -48,8 +48,8 @@ int my_getwd(char * buf, size_t size, myf MyFlags)
|
|||||||
{
|
{
|
||||||
char * pos;
|
char * pos;
|
||||||
DBUG_ENTER("my_getwd");
|
DBUG_ENTER("my_getwd");
|
||||||
DBUG_PRINT("my",("buf: 0x%lx size: %u MyFlags %lu",
|
DBUG_PRINT("my",("buf:%p size: %u MyFlags %lu",
|
||||||
(long) buf, (uint) size, MyFlags));
|
buf, (uint) size, MyFlags));
|
||||||
|
|
||||||
if (size < 1)
|
if (size < 1)
|
||||||
DBUG_RETURN(-1);
|
DBUG_RETURN(-1);
|
||||||
|
@@ -253,8 +253,6 @@ void my_parameter_handler(const wchar_t * expression, const wchar_t * function,
|
|||||||
const wchar_t * file, unsigned int line,
|
const wchar_t * file, unsigned int line,
|
||||||
uintptr_t pReserved)
|
uintptr_t pReserved)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("my",("Expression: %s function: %s file: %s, line: %d",
|
|
||||||
expression, function, file, line));
|
|
||||||
__debugbreak();
|
__debugbreak();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -221,7 +221,7 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
|
|||||||
long handle;
|
long handle;
|
||||||
#endif
|
#endif
|
||||||
DBUG_ENTER("my_dir");
|
DBUG_ENTER("my_dir");
|
||||||
DBUG_PRINT("my",("path: '%s' stat: %d MyFlags: %d",path,MyFlags));
|
DBUG_PRINT("my",("path: '%s' MyFlags: %d",path,MyFlags));
|
||||||
|
|
||||||
/* Put LIB-CHAR as last path-character if not there */
|
/* Put LIB-CHAR as last path-character if not there */
|
||||||
tmp_file=tmp_path;
|
tmp_file=tmp_path;
|
||||||
@@ -347,8 +347,8 @@ MY_STAT *my_stat(const char *path, MY_STAT *stat_area, myf my_flags)
|
|||||||
{
|
{
|
||||||
int m_used;
|
int m_used;
|
||||||
DBUG_ENTER("my_stat");
|
DBUG_ENTER("my_stat");
|
||||||
DBUG_PRINT("my", ("path: '%s' stat_area: 0x%lx MyFlags: %lu", path,
|
DBUG_PRINT("my", ("path: '%s' stat_area: %p MyFlags: %lu", path,
|
||||||
(long) stat_area, my_flags));
|
stat_area, my_flags));
|
||||||
|
|
||||||
if ((m_used= (stat_area == NULL)))
|
if ((m_used= (stat_area == NULL)))
|
||||||
if (!(stat_area= (MY_STAT *) my_malloc(sizeof(MY_STAT), my_flags)))
|
if (!(stat_area= (MY_STAT *) my_malloc(sizeof(MY_STAT), my_flags)))
|
||||||
|
@@ -166,7 +166,7 @@ uchar *safe_hash_search(SAFE_HASH *hash, const uchar *key, uint length,
|
|||||||
result= def;
|
result= def;
|
||||||
else
|
else
|
||||||
result= ((SAFE_HASH_ENTRY*) result)->data;
|
result= ((SAFE_HASH_ENTRY*) result)->data;
|
||||||
DBUG_PRINT("exit",("data: 0x%lx", (long) result));
|
DBUG_PRINT("exit",("data: %p", result));
|
||||||
DBUG_RETURN(result);
|
DBUG_RETURN(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ my_bool safe_hash_set(SAFE_HASH *hash, const uchar *key, uint length,
|
|||||||
SAFE_HASH_ENTRY *entry;
|
SAFE_HASH_ENTRY *entry;
|
||||||
my_bool error= 0;
|
my_bool error= 0;
|
||||||
DBUG_ENTER("safe_hash_set");
|
DBUG_ENTER("safe_hash_set");
|
||||||
DBUG_PRINT("enter",("key: %.*s data: 0x%lx", length, key, (long) data));
|
DBUG_PRINT("enter",("key: %.*s data: %p", length, key, data));
|
||||||
|
|
||||||
mysql_rwlock_wrlock(&hash->mutex);
|
mysql_rwlock_wrlock(&hash->mutex);
|
||||||
entry= (SAFE_HASH_ENTRY*) my_hash_search(&hash->hash, key, length);
|
entry= (SAFE_HASH_ENTRY*) my_hash_search(&hash->hash, key, length);
|
||||||
|
@@ -121,6 +121,15 @@ int pthread_join(pthread_t thread, void **value_ptr)
|
|||||||
goto error_return;
|
goto error_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!GetExitCodeThread(handle, &ret))
|
||||||
|
{
|
||||||
|
errno= EINVAL;
|
||||||
|
goto error_return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value_ptr)
|
||||||
|
*value_ptr= (void *)(size_t)ret;
|
||||||
|
|
||||||
CloseHandle(handle);
|
CloseHandle(handle);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@@ -760,9 +760,9 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
|
|||||||
PSI_TABLE_LOCK, lock_type);
|
PSI_TABLE_LOCK, lock_type);
|
||||||
|
|
||||||
mysql_mutex_lock(&lock->mutex);
|
mysql_mutex_lock(&lock->mutex);
|
||||||
DBUG_PRINT("lock",("data: 0x%lx thread: 0x%lx lock: 0x%lx type: %d",
|
DBUG_PRINT("lock",("data:%p thread:%lu lock:%p type: %d",
|
||||||
(long) data, (ulong) data->owner->thread_id,
|
data, (ulong) data->owner->thread_id,
|
||||||
(long) lock, (int) lock_type));
|
lock, (int) lock_type));
|
||||||
check_locks(lock,(uint) lock_type <= (uint) TL_READ_NO_INSERT ?
|
check_locks(lock,(uint) lock_type <= (uint) TL_READ_NO_INSERT ?
|
||||||
"enter read_lock" : "enter write_lock", lock_type, 0);
|
"enter read_lock" : "enter write_lock", lock_type, 0);
|
||||||
if ((int) lock_type <= (int) TL_READ_NO_INSERT)
|
if ((int) lock_type <= (int) TL_READ_NO_INSERT)
|
||||||
@@ -797,7 +797,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
|
|||||||
See Bug#42147 for more information.
|
See Bug#42147 for more information.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DBUG_PRINT("lock",("write locked 1 by thread: 0x%lx",
|
DBUG_PRINT("lock",("write locked 1 by thread:%lu",
|
||||||
(ulong) lock->write.data->owner->thread_id));
|
(ulong) lock->write.data->owner->thread_id));
|
||||||
if (thr_lock_owner_equal(data->owner, lock->write.data->owner) ||
|
if (thr_lock_owner_equal(data->owner, lock->write.data->owner) ||
|
||||||
(lock->write.data->type <= TL_WRITE_DELAYED &&
|
(lock->write.data->type <= TL_WRITE_DELAYED &&
|
||||||
@@ -942,8 +942,8 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
|
|||||||
! lock->read_no_write_count) ||
|
! lock->read_no_write_count) ||
|
||||||
has_old_lock(lock->write.data, data->owner))
|
has_old_lock(lock->write.data, data->owner))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("write_wait.data: 0x%lx old_type: %d",
|
DBUG_PRINT("info", ("write_wait.data: %p old_type: %d",
|
||||||
(ulong) lock->write_wait.data,
|
lock->write_wait.data,
|
||||||
lock->write.data->type));
|
lock->write.data->type));
|
||||||
|
|
||||||
(*lock->write.last)=data; /* Add to running fifo */
|
(*lock->write.last)=data; /* Add to running fifo */
|
||||||
@@ -956,13 +956,13 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
|
|||||||
statistic_increment(locks_immediate,&THR_LOCK_lock);
|
statistic_increment(locks_immediate,&THR_LOCK_lock);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("lock",("write locked 2 by thread: 0x%lx",
|
DBUG_PRINT("lock",("write locked 2 by thread: %lu",
|
||||||
(ulong) lock->write.data->owner->thread_id));
|
(ulong) lock->write.data->owner->thread_id));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("write_wait.data: 0x%lx",
|
DBUG_PRINT("info", ("write_wait.data:%p",
|
||||||
(ulong) lock->write_wait.data));
|
lock->write_wait.data));
|
||||||
if (!lock->write_wait.data)
|
if (!lock->write_wait.data)
|
||||||
{ /* no scheduled write locks */
|
{ /* no scheduled write locks */
|
||||||
my_bool concurrent_insert= 0;
|
my_bool concurrent_insert= 0;
|
||||||
@@ -992,7 +992,7 @@ thr_lock(THR_LOCK_DATA *data, THR_LOCK_INFO *owner, ulong lock_wait_timeout)
|
|||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBUG_PRINT("lock",("write locked 3 by thread: 0x%lx type: %d",
|
DBUG_PRINT("lock",("write locked 3 by thread:%lu type: %d",
|
||||||
(ulong) lock->read.data->owner->thread_id,
|
(ulong) lock->read.data->owner->thread_id,
|
||||||
data->type));
|
data->type));
|
||||||
}
|
}
|
||||||
@@ -1058,7 +1058,7 @@ static inline void free_all_read_locks(THR_LOCK *lock,
|
|||||||
lock->read_no_write_count++;
|
lock->read_no_write_count++;
|
||||||
}
|
}
|
||||||
/* purecov: begin inspected */
|
/* purecov: begin inspected */
|
||||||
DBUG_PRINT("lock",("giving read lock to thread: 0x%lx",
|
DBUG_PRINT("lock",("giving read lock to thread: %lu",
|
||||||
(ulong)data->owner->thread_id));
|
(ulong)data->owner->thread_id));
|
||||||
/* purecov: end */
|
/* purecov: end */
|
||||||
data->cond=0; /* Mark thread free */
|
data->cond=0; /* Mark thread free */
|
||||||
@@ -1077,7 +1077,7 @@ void thr_unlock(THR_LOCK_DATA *data, uint unlock_flags)
|
|||||||
THR_LOCK *lock=data->lock;
|
THR_LOCK *lock=data->lock;
|
||||||
enum thr_lock_type lock_type=data->type;
|
enum thr_lock_type lock_type=data->type;
|
||||||
DBUG_ENTER("thr_unlock");
|
DBUG_ENTER("thr_unlock");
|
||||||
DBUG_PRINT("lock",("data: %p thread: 0x%lx lock: %p",
|
DBUG_PRINT("lock",("data: %p thread: %lu lock: %p",
|
||||||
data, (ulong) data->owner->thread_id,
|
data, (ulong) data->owner->thread_id,
|
||||||
lock));
|
lock));
|
||||||
mysql_mutex_lock(&lock->mutex);
|
mysql_mutex_lock(&lock->mutex);
|
||||||
@@ -1171,7 +1171,7 @@ static void wake_up_waiters(THR_LOCK *lock)
|
|||||||
(*lock->check_status)(data->status_param))
|
(*lock->check_status)(data->status_param))
|
||||||
data->type=TL_WRITE; /* Upgrade lock */
|
data->type=TL_WRITE; /* Upgrade lock */
|
||||||
/* purecov: begin inspected */
|
/* purecov: begin inspected */
|
||||||
DBUG_PRINT("lock",("giving write lock of type %d to thread: 0x%lx",
|
DBUG_PRINT("lock",("giving write lock of type %d to thread: %lu",
|
||||||
data->type, (ulong) data->owner->thread_id));
|
data->type, (ulong) data->owner->thread_id));
|
||||||
/* purecov: end */
|
/* purecov: end */
|
||||||
{
|
{
|
||||||
@@ -1280,7 +1280,7 @@ thr_multi_lock(THR_LOCK_DATA **data, uint count, THR_LOCK_INFO *owner,
|
|||||||
{
|
{
|
||||||
THR_LOCK_DATA **pos, **end, **first_lock;
|
THR_LOCK_DATA **pos, **end, **first_lock;
|
||||||
DBUG_ENTER("thr_multi_lock");
|
DBUG_ENTER("thr_multi_lock");
|
||||||
DBUG_PRINT("lock",("data: 0x%lx count: %d", (long) data, count));
|
DBUG_PRINT("lock",("data: %p count: %d", data, count));
|
||||||
|
|
||||||
if (count > 1)
|
if (count > 1)
|
||||||
sort_locks(data,count);
|
sort_locks(data,count);
|
||||||
@@ -1301,8 +1301,8 @@ thr_multi_lock(THR_LOCK_DATA **data, uint count, THR_LOCK_INFO *owner,
|
|||||||
DBUG_RETURN(result);
|
DBUG_RETURN(result);
|
||||||
}
|
}
|
||||||
#ifdef MAIN
|
#ifdef MAIN
|
||||||
printf("Thread: %s Got lock: 0x%lx type: %d\n",my_thread_name(),
|
printf("Thread: %s Got lock:%p type: %d\n",my_thread_name(),
|
||||||
(long) pos[0]->lock, pos[0]->type); fflush(stdout);
|
pos[0]->lock, pos[0]->type); fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
DEBUG_SYNC_C("thr_multi_lock_after_thr_lock");
|
DEBUG_SYNC_C("thr_multi_lock_after_thr_lock");
|
||||||
@@ -1401,21 +1401,21 @@ void thr_multi_unlock(THR_LOCK_DATA **data,uint count, uint unlock_flags)
|
|||||||
{
|
{
|
||||||
THR_LOCK_DATA **pos,**end;
|
THR_LOCK_DATA **pos,**end;
|
||||||
DBUG_ENTER("thr_multi_unlock");
|
DBUG_ENTER("thr_multi_unlock");
|
||||||
DBUG_PRINT("lock",("data: 0x%lx count: %d flags: %u", (long) data, count,
|
DBUG_PRINT("lock",("data: %p count: %d flags: %u", data, count,
|
||||||
unlock_flags));
|
unlock_flags));
|
||||||
|
|
||||||
for (pos=data,end=data+count; pos < end ; pos++)
|
for (pos=data,end=data+count; pos < end ; pos++)
|
||||||
{
|
{
|
||||||
#ifdef MAIN
|
#ifdef MAIN
|
||||||
printf("Thread: %s Rel lock: 0x%lx type: %d\n",
|
printf("Thread: %s Rel lock: %p type: %d\n",
|
||||||
my_thread_name(), (long) pos[0]->lock, pos[0]->type);
|
my_thread_name(), pos[0]->lock, pos[0]->type);
|
||||||
fflush(stdout);
|
fflush(stdout);
|
||||||
#endif
|
#endif
|
||||||
if ((*pos)->type != TL_UNLOCK)
|
if ((*pos)->type != TL_UNLOCK)
|
||||||
thr_unlock(*pos, unlock_flags);
|
thr_unlock(*pos, unlock_flags);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBUG_PRINT("lock",("Free lock: data: %p thread: 0x%lx lock: %p",
|
DBUG_PRINT("lock",("Free lock: data: %p thread:%lu lock: %p",
|
||||||
*pos, (ulong) (*pos)->owner->thread_id,
|
*pos, (ulong) (*pos)->owner->thread_id,
|
||||||
(*pos)->lock));
|
(*pos)->lock));
|
||||||
}
|
}
|
||||||
@@ -1689,7 +1689,7 @@ void thr_print_locks(void)
|
|||||||
{
|
{
|
||||||
THR_LOCK *lock=(THR_LOCK*) list->data;
|
THR_LOCK *lock=(THR_LOCK*) list->data;
|
||||||
mysql_mutex_lock(&lock->mutex);
|
mysql_mutex_lock(&lock->mutex);
|
||||||
printf("lock: 0x%lx:",(ulong) lock);
|
printf("lock:%p:", lock);
|
||||||
if ((lock->write_wait.data || lock->read_wait.data) &&
|
if ((lock->write_wait.data || lock->read_wait.data) &&
|
||||||
(! lock->read.data && ! lock->write.data))
|
(! lock->read.data && ! lock->write.data))
|
||||||
printf(" WARNING: ");
|
printf(" WARNING: ");
|
||||||
|
@@ -90,7 +90,7 @@ void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
|
|||||||
myf my_flags)
|
myf my_flags)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("init_tree");
|
DBUG_ENTER("init_tree");
|
||||||
DBUG_PRINT("enter",("tree: 0x%lx size: %d", (long) tree, size));
|
DBUG_PRINT("enter",("tree: %p size: %d", tree, size));
|
||||||
|
|
||||||
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
|
if (default_alloc_size < DEFAULT_ALLOC_SIZE)
|
||||||
default_alloc_size= DEFAULT_ALLOC_SIZE;
|
default_alloc_size= DEFAULT_ALLOC_SIZE;
|
||||||
@@ -139,7 +139,7 @@ void init_tree(TREE *tree, size_t default_alloc_size, size_t memory_limit,
|
|||||||
static void free_tree(TREE *tree, myf free_flags)
|
static void free_tree(TREE *tree, myf free_flags)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("free_tree");
|
DBUG_ENTER("free_tree");
|
||||||
DBUG_PRINT("enter",("tree: 0x%lx", (long) tree));
|
DBUG_PRINT("enter",("tree: %p", tree));
|
||||||
|
|
||||||
if (tree->root) /* If initialized */
|
if (tree->root) /* If initialized */
|
||||||
{
|
{
|
||||||
|
@@ -88,7 +88,7 @@ static int find_type_eol(const char **x, const TYPELIB *typelib, uint flags,
|
|||||||
const char *j;
|
const char *j;
|
||||||
CHARSET_INFO *cs= &my_charset_latin1;
|
CHARSET_INFO *cs= &my_charset_latin1;
|
||||||
DBUG_ENTER("find_type_eol");
|
DBUG_ENTER("find_type_eol");
|
||||||
DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", *x, (long) typelib));
|
DBUG_PRINT("enter",("x: '%s' lib: %p", *x, typelib));
|
||||||
|
|
||||||
DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_COMMA_TERM)));
|
DBUG_ASSERT(!(flags & ~(FIND_TYPE_NO_PREFIX | FIND_TYPE_COMMA_TERM)));
|
||||||
|
|
||||||
@@ -200,7 +200,7 @@ my_ulonglong find_typeset(char *x, TYPELIB *lib, int *err)
|
|||||||
int find;
|
int find;
|
||||||
char *i;
|
char *i;
|
||||||
DBUG_ENTER("find_set");
|
DBUG_ENTER("find_set");
|
||||||
DBUG_PRINT("enter",("x: '%s' lib: 0x%lx", x, (long) lib));
|
DBUG_PRINT("enter",("x: '%s' lib: %p", x, lib));
|
||||||
|
|
||||||
if (!lib->count)
|
if (!lib->count)
|
||||||
{
|
{
|
||||||
|
@@ -224,17 +224,17 @@ void wqueue_add_and_wait(WQUEUE *wqueue,
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("wqueue_add_and_wait");
|
DBUG_ENTER("wqueue_add_and_wait");
|
||||||
DBUG_PRINT("enter",
|
DBUG_PRINT("enter",
|
||||||
("thread: 0x%lx cond: 0x%lx mutex: 0x%lx",
|
("thread: %p cond: %p mutex: %p",
|
||||||
(ulong) thread, (ulong) &thread->suspend, (ulong) lock));
|
thread, &thread->suspend, lock));
|
||||||
wqueue_add_to_queue(wqueue, thread);
|
wqueue_add_to_queue(wqueue, thread);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("wait... cond: 0x%lx mutex: 0x%lx",
|
DBUG_PRINT("info", ("wait... cond: %p mutex: %p",
|
||||||
(ulong) &thread->suspend, (ulong) lock));
|
&thread->suspend, lock));
|
||||||
mysql_cond_wait(&thread->suspend, lock);
|
mysql_cond_wait(&thread->suspend, lock);
|
||||||
DBUG_PRINT("info", ("wait done cond: 0x%lx mutex: 0x%lx next: 0x%lx",
|
DBUG_PRINT("info", ("wait done cond: %p mutex: %p next: %p",
|
||||||
(ulong) &thread->suspend, (ulong) lock,
|
&thread->suspend, lock,
|
||||||
(ulong) thread->next));
|
thread->next));
|
||||||
}
|
}
|
||||||
while (thread->next);
|
while (thread->next);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
@@ -134,7 +134,7 @@ void my_sha(uchar *digest, const char *buf, size_t len)
|
|||||||
CONTEXT context;
|
CONTEXT context;
|
||||||
|
|
||||||
sha_init_fast(&context);
|
sha_init_fast(&context);
|
||||||
sha_input(&context, (const uchar *)buf, len);
|
sha_input(&context, (const uchar *)buf, (unsigned int)len);
|
||||||
sha_result(&context, digest);
|
sha_result(&context, digest);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -952,7 +952,7 @@ void STDCALL
|
|||||||
mysql_free_result(MYSQL_RES *result)
|
mysql_free_result(MYSQL_RES *result)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("mysql_free_result");
|
DBUG_ENTER("mysql_free_result");
|
||||||
DBUG_PRINT("enter",("mysql_res: 0x%lx", (long) result));
|
DBUG_PRINT("enter",("mysql_res: %p", result));
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
MYSQL *mysql= result->handle;
|
MYSQL *mysql= result->handle;
|
||||||
@@ -1653,7 +1653,7 @@ mysql_init(MYSQL *mysql)
|
|||||||
*/
|
*/
|
||||||
mysql->reconnect= 0;
|
mysql->reconnect= 0;
|
||||||
|
|
||||||
DBUG_PRINT("mysql",("mysql: 0x%lx", (long) mysql));
|
DBUG_PRINT("mysql",("mysql: %p", mysql));
|
||||||
return mysql;
|
return mysql;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3379,7 +3379,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
|
|||||||
}
|
}
|
||||||
DBUG_PRINT("info",
|
DBUG_PRINT("info",
|
||||||
("End of connect attempts, sock: %d status: %d error: %d",
|
("End of connect attempts, sock: %d status: %d error: %d",
|
||||||
sock, status, saved_error));
|
(int)sock, status, saved_error));
|
||||||
|
|
||||||
freeaddrinfo(res_lst);
|
freeaddrinfo(res_lst);
|
||||||
|
|
||||||
@@ -3633,7 +3633,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
DBUG_PRINT("exit", ("Mysql handler: 0x%lx", (long) mysql));
|
DBUG_PRINT("exit", ("Mysql handler: %p",mysql));
|
||||||
DBUG_RETURN(mysql);
|
DBUG_RETURN(mysql);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
@@ -3955,7 +3955,7 @@ void STDCALL mysql_close_slow_part(MYSQL *mysql)
|
|||||||
void STDCALL mysql_close(MYSQL *mysql)
|
void STDCALL mysql_close(MYSQL *mysql)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("mysql_close");
|
DBUG_ENTER("mysql_close");
|
||||||
DBUG_PRINT("enter", ("mysql: 0x%lx", (long) mysql));
|
DBUG_PRINT("enter", ("mysql: %p", mysql));
|
||||||
|
|
||||||
if (mysql) /* Some simple safety */
|
if (mysql) /* Some simple safety */
|
||||||
{
|
{
|
||||||
@@ -4066,7 +4066,7 @@ int STDCALL
|
|||||||
mysql_real_query(MYSQL *mysql, const char *query, ulong length)
|
mysql_real_query(MYSQL *mysql, const char *query, ulong length)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("mysql_real_query");
|
DBUG_ENTER("mysql_real_query");
|
||||||
DBUG_PRINT("enter",("handle: 0x%lx", (long) mysql));
|
DBUG_PRINT("enter",("handle: %p", mysql));
|
||||||
DBUG_PRINT("query",("Query = '%-.4096s'",query));
|
DBUG_PRINT("query",("Query = '%-.4096s'",query));
|
||||||
|
|
||||||
if (mysql_send_query(mysql,query,length))
|
if (mysql_send_query(mysql,query,length))
|
||||||
|
@@ -124,8 +124,8 @@ static bool set_one_value(ha_create_table_option *opt,
|
|||||||
MEM_ROOT *root)
|
MEM_ROOT *root)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("set_one_value");
|
DBUG_ENTER("set_one_value");
|
||||||
DBUG_PRINT("enter", ("opt: 0x%lx type: %u name '%s' value: '%s'",
|
DBUG_PRINT("enter", ("opt: %p type: %u name '%s' value: '%s'",
|
||||||
(ulong) opt,
|
opt,
|
||||||
opt->type, opt->name,
|
opt->type, opt->name,
|
||||||
(value->str ? value->str : "<DEFAULT>")));
|
(value->str ? value->str : "<DEFAULT>")));
|
||||||
switch (opt->type)
|
switch (opt->type)
|
||||||
|
@@ -681,8 +681,8 @@ static st_debug_sync_action *debug_sync_get_action(THD *thd,
|
|||||||
}
|
}
|
||||||
DBUG_ASSERT(action >= ds_control->ds_action);
|
DBUG_ASSERT(action >= ds_control->ds_action);
|
||||||
DBUG_ASSERT(action < ds_control->ds_action + ds_control->ds_active);
|
DBUG_ASSERT(action < ds_control->ds_action + ds_control->ds_active);
|
||||||
DBUG_PRINT("debug_sync", ("action: 0x%lx array: 0x%lx count: %u",
|
DBUG_PRINT("debug_sync", ("action: %p array: %p count: %u",
|
||||||
(long) action, (long) ds_control->ds_action,
|
action, ds_control->ds_action,
|
||||||
ds_control->ds_active));
|
ds_control->ds_active));
|
||||||
|
|
||||||
DBUG_RETURN(action);
|
DBUG_RETURN(action);
|
||||||
|
@@ -911,9 +911,9 @@ Event_queue_element::compute_next_execution_time()
|
|||||||
{
|
{
|
||||||
my_time_t time_now;
|
my_time_t time_now;
|
||||||
DBUG_ENTER("Event_queue_element::compute_next_execution_time");
|
DBUG_ENTER("Event_queue_element::compute_next_execution_time");
|
||||||
DBUG_PRINT("enter", ("starts: %lu ends: %lu last_executed: %lu this: 0x%lx",
|
DBUG_PRINT("enter", ("starts: %lu ends: %lu last_executed: %lu this: %p",
|
||||||
(long) starts, (long) ends, (long) last_executed,
|
(long) starts, (long) ends, (long) last_executed,
|
||||||
(long) this));
|
this));
|
||||||
|
|
||||||
if (status != Event_parse_data::ENABLED)
|
if (status != Event_parse_data::ENABLED)
|
||||||
{
|
{
|
||||||
|
@@ -1060,7 +1060,7 @@ Event_db_repository::load_named_event(THD *thd, LEX_STRING dbname,
|
|||||||
TABLE_LIST event_table;
|
TABLE_LIST event_table;
|
||||||
|
|
||||||
DBUG_ENTER("Event_db_repository::load_named_event");
|
DBUG_ENTER("Event_db_repository::load_named_event");
|
||||||
DBUG_PRINT("enter",("thd: 0x%lx name: %*s", (long) thd,
|
DBUG_PRINT("enter",("thd: %p name: %*s", thd,
|
||||||
(int) name.length, name.str));
|
(int) name.length, name.str));
|
||||||
|
|
||||||
event_table.init_one_table("mysql", 5, "event", 5, "event", TL_READ);
|
event_table.init_one_table("mysql", 5, "event", 5, "event", TL_READ);
|
||||||
@@ -1183,7 +1183,7 @@ Event_db_repository::check_system_tables(THD *thd)
|
|||||||
const unsigned int event_priv_column_position= 29;
|
const unsigned int event_priv_column_position= 29;
|
||||||
|
|
||||||
DBUG_ENTER("Event_db_repository::check_system_tables");
|
DBUG_ENTER("Event_db_repository::check_system_tables");
|
||||||
DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd));
|
DBUG_PRINT("enter", ("thd: %p", thd));
|
||||||
|
|
||||||
/* Check mysql.db */
|
/* Check mysql.db */
|
||||||
tables.init_one_table("mysql", 5, "db", 2, "db", TL_READ);
|
tables.init_one_table("mysql", 5, "db", 2, "db", TL_READ);
|
||||||
|
@@ -497,9 +497,9 @@ Event_parse_data::check_parse_data(THD *thd)
|
|||||||
{
|
{
|
||||||
bool ret;
|
bool ret;
|
||||||
DBUG_ENTER("Event_parse_data::check_parse_data");
|
DBUG_ENTER("Event_parse_data::check_parse_data");
|
||||||
DBUG_PRINT("info", ("execute_at: 0x%lx expr=0x%lx starts=0x%lx ends=0x%lx",
|
DBUG_PRINT("info", ("execute_at: %p expr=%p starts=%p ends=%p",
|
||||||
(long) item_execute_at, (long) item_expression,
|
item_execute_at, item_expression,
|
||||||
(long) item_starts, (long) item_ends));
|
item_starts, item_ends));
|
||||||
|
|
||||||
init_name(thd, identifier);
|
init_name(thd, identifier);
|
||||||
|
|
||||||
@@ -532,9 +532,9 @@ Event_parse_data::init_definer(THD *thd)
|
|||||||
size_t definer_user_len= thd->lex->definer->user.length;
|
size_t definer_user_len= thd->lex->definer->user.length;
|
||||||
size_t definer_host_len= thd->lex->definer->host.length;
|
size_t definer_host_len= thd->lex->definer->host.length;
|
||||||
|
|
||||||
DBUG_PRINT("info",("init definer_user thd->mem_root: 0x%lx "
|
DBUG_PRINT("info",("init definer_user thd->mem_root: %p "
|
||||||
"definer_user: 0x%lx", (long) thd->mem_root,
|
"definer_user: %p", thd->mem_root,
|
||||||
(long) definer_user));
|
definer_user));
|
||||||
|
|
||||||
/* + 1 for @ */
|
/* + 1 for @ */
|
||||||
DBUG_PRINT("info",("init definer as whole"));
|
DBUG_PRINT("info",("init definer as whole"));
|
||||||
|
@@ -135,7 +135,7 @@ bool
|
|||||||
Event_queue::init_queue(THD *thd)
|
Event_queue::init_queue(THD *thd)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Event_queue::init_queue");
|
DBUG_ENTER("Event_queue::init_queue");
|
||||||
DBUG_PRINT("enter", ("this: 0x%lx", (long) this));
|
DBUG_PRINT("enter", ("this: %p", this));
|
||||||
|
|
||||||
LOCK_QUEUE_DATA();
|
LOCK_QUEUE_DATA();
|
||||||
|
|
||||||
@@ -201,7 +201,7 @@ Event_queue::create_event(THD *thd, Event_queue_element *new_element,
|
|||||||
bool *created)
|
bool *created)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Event_queue::create_event");
|
DBUG_ENTER("Event_queue::create_event");
|
||||||
DBUG_PRINT("enter", ("thd: 0x%lx et=%s.%s", (long) thd,
|
DBUG_PRINT("enter", ("thd: %p et=%s.%s", thd,
|
||||||
new_element->dbname.str, new_element->name.str));
|
new_element->dbname.str, new_element->name.str));
|
||||||
|
|
||||||
/* Will do nothing if the event is disabled */
|
/* Will do nothing if the event is disabled */
|
||||||
@@ -213,7 +213,7 @@ Event_queue::create_event(THD *thd, Event_queue_element *new_element,
|
|||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element));
|
DBUG_PRINT("info", ("new event in the queue: %p", new_element));
|
||||||
|
|
||||||
LOCK_QUEUE_DATA();
|
LOCK_QUEUE_DATA();
|
||||||
*created= (queue_insert_safe(&queue, (uchar *) new_element) == FALSE);
|
*created= (queue_insert_safe(&queue, (uchar *) new_element) == FALSE);
|
||||||
@@ -242,7 +242,7 @@ Event_queue::update_event(THD *thd, LEX_STRING dbname, LEX_STRING name,
|
|||||||
Event_queue_element *new_element)
|
Event_queue_element *new_element)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Event_queue::update_event");
|
DBUG_ENTER("Event_queue::update_event");
|
||||||
DBUG_PRINT("enter", ("thd: 0x%lx et=[%s.%s]", (long) thd, dbname.str, name.str));
|
DBUG_PRINT("enter", ("thd: %p et=[%s.%s]", thd, dbname.str, name.str));
|
||||||
|
|
||||||
if ((new_element->status == Event_parse_data::DISABLED) ||
|
if ((new_element->status == Event_parse_data::DISABLED) ||
|
||||||
(new_element->status == Event_parse_data::SLAVESIDE_DISABLED))
|
(new_element->status == Event_parse_data::SLAVESIDE_DISABLED))
|
||||||
@@ -264,7 +264,7 @@ Event_queue::update_event(THD *thd, LEX_STRING dbname, LEX_STRING name,
|
|||||||
/* If not disabled event */
|
/* If not disabled event */
|
||||||
if (new_element)
|
if (new_element)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("new event in the queue: 0x%lx", (long) new_element));
|
DBUG_PRINT("info", ("new event in the queue: %p", new_element));
|
||||||
queue_insert_safe(&queue, (uchar *) new_element);
|
queue_insert_safe(&queue, (uchar *) new_element);
|
||||||
mysql_cond_broadcast(&COND_queue_state);
|
mysql_cond_broadcast(&COND_queue_state);
|
||||||
}
|
}
|
||||||
@@ -290,7 +290,7 @@ void
|
|||||||
Event_queue::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name)
|
Event_queue::drop_event(THD *thd, LEX_STRING dbname, LEX_STRING name)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Event_queue::drop_event");
|
DBUG_ENTER("Event_queue::drop_event");
|
||||||
DBUG_PRINT("enter", ("thd: 0x%lx db :%s name: %s", (long) thd,
|
DBUG_PRINT("enter", ("thd: %p db :%s name: %s", thd,
|
||||||
dbname.str, name.str));
|
dbname.str, name.str));
|
||||||
|
|
||||||
LOCK_QUEUE_DATA();
|
LOCK_QUEUE_DATA();
|
||||||
@@ -545,7 +545,7 @@ Event_queue::dbug_dump_queue(my_time_t when)
|
|||||||
i++)
|
i++)
|
||||||
{
|
{
|
||||||
et= ((Event_queue_element*)queue_element(&queue, i));
|
et= ((Event_queue_element*)queue_element(&queue, i));
|
||||||
DBUG_PRINT("info", ("et: 0x%lx name: %s.%s", (long) et,
|
DBUG_PRINT("info", ("et: %p name: %s.%s", et,
|
||||||
et->dbname.str, et->name.str));
|
et->dbname.str, et->name.str));
|
||||||
DBUG_PRINT("info", ("exec_at: %lu starts: %lu ends: %lu execs_so_far: %u "
|
DBUG_PRINT("info", ("exec_at: %lu starts: %lu ends: %lu execs_so_far: %u "
|
||||||
"expr: %ld et.exec_at: %ld now: %ld "
|
"expr: %ld et.exec_at: %ld now: %ld "
|
||||||
@@ -673,8 +673,8 @@ Event_queue::get_top_for_execution_if_time(THD *thd,
|
|||||||
end:
|
end:
|
||||||
UNLOCK_QUEUE_DATA();
|
UNLOCK_QUEUE_DATA();
|
||||||
|
|
||||||
DBUG_PRINT("info", ("returning %d et_new: 0x%lx ",
|
DBUG_PRINT("info", ("returning %d et_new: %p ",
|
||||||
ret, (long) *event_name));
|
ret, *event_name));
|
||||||
|
|
||||||
if (*event_name)
|
if (*event_name)
|
||||||
{
|
{
|
||||||
|
@@ -295,7 +295,7 @@ Event_worker_thread::run(THD *thd, Event_queue_element_for_exec *event)
|
|||||||
res= post_init_event_thread(thd);
|
res= post_init_event_thread(thd);
|
||||||
|
|
||||||
DBUG_ENTER("Event_worker_thread::run");
|
DBUG_ENTER("Event_worker_thread::run");
|
||||||
DBUG_PRINT("info", ("Time is %ld, THD: 0x%lx", (long) my_time(0), (long) thd));
|
DBUG_PRINT("info", ("Time is %u, THD: %p", (uint)my_time(0), thd));
|
||||||
|
|
||||||
inc_thread_running();
|
inc_thread_running();
|
||||||
if (res)
|
if (res)
|
||||||
@@ -420,7 +420,7 @@ Event_scheduler::start(int *err_no)
|
|||||||
scheduler_thd= new_thd;
|
scheduler_thd= new_thd;
|
||||||
DBUG_PRINT("info", ("Setting state go RUNNING"));
|
DBUG_PRINT("info", ("Setting state go RUNNING"));
|
||||||
state= RUNNING;
|
state= RUNNING;
|
||||||
DBUG_PRINT("info", ("Forking new thread for scheduler. THD: 0x%lx", (long) new_thd));
|
DBUG_PRINT("info", ("Forking new thread for scheduler. THD: %p", new_thd));
|
||||||
if ((*err_no= mysql_thread_create(key_thread_event_scheduler,
|
if ((*err_no= mysql_thread_create(key_thread_event_scheduler,
|
||||||
&th, &connection_attrib,
|
&th, &connection_attrib,
|
||||||
event_scheduler_thread,
|
event_scheduler_thread,
|
||||||
@@ -485,7 +485,7 @@ Event_scheduler::run(THD *thd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("info", ("get_top_for_execution_if_time returned "
|
DBUG_PRINT("info", ("get_top_for_execution_if_time returned "
|
||||||
"event_name=0x%lx", (long) event_name));
|
"event_name=%p", event_name));
|
||||||
if (event_name)
|
if (event_name)
|
||||||
{
|
{
|
||||||
if ((res= execute_top(event_name)))
|
if ((res= execute_top(event_name)))
|
||||||
@@ -566,7 +566,7 @@ Event_scheduler::execute_top(Event_queue_element_for_exec *event_name)
|
|||||||
started_events++;
|
started_events++;
|
||||||
executed_events++; // For SHOW STATUS
|
executed_events++; // For SHOW STATUS
|
||||||
|
|
||||||
DBUG_PRINT("info", ("Event is in THD: 0x%lx", (long) new_thd));
|
DBUG_PRINT("info", ("Event is in THD: %p", new_thd));
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
@@ -617,7 +617,7 @@ Event_scheduler::stop()
|
|||||||
{
|
{
|
||||||
THD *thd= current_thd;
|
THD *thd= current_thd;
|
||||||
DBUG_ENTER("Event_scheduler::stop");
|
DBUG_ENTER("Event_scheduler::stop");
|
||||||
DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd));
|
DBUG_PRINT("enter", ("thd: %p", thd));
|
||||||
|
|
||||||
LOCK_DATA();
|
LOCK_DATA();
|
||||||
DBUG_PRINT("info", ("state before action %s", scheduler_states_names[state].str));
|
DBUG_PRINT("info", ("state before action %s", scheduler_states_names[state].str));
|
||||||
|
@@ -1120,7 +1120,7 @@ Events::load_events_from_db(THD *thd)
|
|||||||
uint count= 0;
|
uint count= 0;
|
||||||
ulong saved_master_access;
|
ulong saved_master_access;
|
||||||
DBUG_ENTER("Events::load_events_from_db");
|
DBUG_ENTER("Events::load_events_from_db");
|
||||||
DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd));
|
DBUG_PRINT("enter", ("thd: %p", thd));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
NOTE: even if we run in read-only mode, we should be able to lock the
|
NOTE: even if we run in read-only mode, we should be able to lock the
|
||||||
|
@@ -8361,8 +8361,8 @@ const uchar *Field_blob::unpack(uchar *to, const uchar *from,
|
|||||||
const uchar *from_end, uint param_data)
|
const uchar *from_end, uint param_data)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Field_blob::unpack");
|
DBUG_ENTER("Field_blob::unpack");
|
||||||
DBUG_PRINT("enter", ("to: 0x%lx; from: 0x%lx; param_data: %u",
|
DBUG_PRINT("enter", ("to: %p; from: %p; param_data: %u",
|
||||||
(ulong) to, (ulong) from, param_data));
|
to, from, param_data));
|
||||||
uint const master_packlength=
|
uint const master_packlength=
|
||||||
param_data > 0 ? param_data & 0xFF : packlength;
|
param_data > 0 ? param_data & 0xFF : packlength;
|
||||||
if (from + master_packlength > from_end)
|
if (from + master_packlength > from_end)
|
||||||
@@ -9216,8 +9216,8 @@ Field_bit::do_last_null_byte() const
|
|||||||
bits. On systems with CHAR_BIT > 8 (not very common), the storage
|
bits. On systems with CHAR_BIT > 8 (not very common), the storage
|
||||||
will lose the extra bits.
|
will lose the extra bits.
|
||||||
*/
|
*/
|
||||||
DBUG_PRINT("test", ("bit_ofs: %d, bit_len: %d bit_ptr: 0x%lx",
|
DBUG_PRINT("test", ("bit_ofs: %d, bit_len: %d bit_ptr: %p",
|
||||||
bit_ofs, bit_len, (long) bit_ptr));
|
bit_ofs, bit_len, bit_ptr));
|
||||||
uchar *result;
|
uchar *result;
|
||||||
if (bit_len == 0)
|
if (bit_len == 0)
|
||||||
result= null_ptr;
|
result= null_ptr;
|
||||||
|
@@ -79,7 +79,7 @@ void set_token(int tok, const char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
compiled_token_array[tok].m_token_string= str;
|
compiled_token_array[tok].m_token_string= str;
|
||||||
compiled_token_array[tok].m_token_length= strlen(str);
|
compiled_token_array[tok].m_token_length= (int)strlen(str);
|
||||||
compiled_token_array[tok].m_append_space= true;
|
compiled_token_array[tok].m_append_space= true;
|
||||||
compiled_token_array[tok].m_start_expr= false;
|
compiled_token_array[tok].m_start_expr= false;
|
||||||
}
|
}
|
||||||
|
@@ -4803,8 +4803,8 @@ int ha_partition::rnd_init(bool scan)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Now we see what the index of our first important partition is */
|
/* Now we see what the index of our first important partition is */
|
||||||
DBUG_PRINT("info", ("m_part_info->read_partitions: 0x%lx",
|
DBUG_PRINT("info", ("m_part_info->read_partitions: %p",
|
||||||
(long) m_part_info->read_partitions.bitmap));
|
m_part_info->read_partitions.bitmap));
|
||||||
part_id= bitmap_get_first_set(&(m_part_info->read_partitions));
|
part_id= bitmap_get_first_set(&(m_part_info->read_partitions));
|
||||||
DBUG_PRINT("info", ("m_part_spec.start_part %d", part_id));
|
DBUG_PRINT("info", ("m_part_spec.start_part %d", part_id));
|
||||||
|
|
||||||
|
@@ -257,7 +257,7 @@ handler *get_new_handler(TABLE_SHARE *share, MEM_ROOT *alloc,
|
|||||||
{
|
{
|
||||||
handler *file;
|
handler *file;
|
||||||
DBUG_ENTER("get_new_handler");
|
DBUG_ENTER("get_new_handler");
|
||||||
DBUG_PRINT("enter", ("alloc: 0x%lx", (long) alloc));
|
DBUG_PRINT("enter", ("alloc: %p", alloc));
|
||||||
|
|
||||||
if (db_type && db_type->state == SHOW_OPTION_YES && db_type->create)
|
if (db_type && db_type->state == SHOW_OPTION_YES && db_type->create)
|
||||||
{
|
{
|
||||||
@@ -3191,8 +3191,8 @@ void handler::column_bitmaps_signal()
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("column_bitmaps_signal");
|
DBUG_ENTER("column_bitmaps_signal");
|
||||||
if (table)
|
if (table)
|
||||||
DBUG_PRINT("info", ("read_set: 0x%lx write_set: 0x%lx",
|
DBUG_PRINT("info", ("read_set: %p write_set: %p",
|
||||||
(long) table->read_set, (long) table->write_set));
|
table->read_set, table->write_set));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5741,9 +5741,9 @@ bool handler::check_table_binlog_row_based_internal(bool binlog_row)
|
|||||||
static int write_locked_table_maps(THD *thd)
|
static int write_locked_table_maps(THD *thd)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("write_locked_table_maps");
|
DBUG_ENTER("write_locked_table_maps");
|
||||||
DBUG_PRINT("enter", ("thd: 0x%lx thd->lock: 0x%lx "
|
DBUG_PRINT("enter", ("thd:%p thd->lock:%p "
|
||||||
"thd->extra_lock: 0x%lx",
|
"thd->extra_lock: %p",
|
||||||
(long) thd, (long) thd->lock, (long) thd->extra_lock));
|
thd, thd->lock, thd->extra_lock));
|
||||||
|
|
||||||
DBUG_PRINT("debug", ("get_binlog_table_maps(): %d", thd->get_binlog_table_maps()));
|
DBUG_PRINT("debug", ("get_binlog_table_maps(): %d", thd->get_binlog_table_maps()));
|
||||||
|
|
||||||
|
@@ -6293,8 +6293,8 @@ void Item_field::save_org_in_field(Field *to,
|
|||||||
fast_field_copier fast_field_copier_func)
|
fast_field_copier fast_field_copier_func)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Item_field::save_org_in_field");
|
DBUG_ENTER("Item_field::save_org_in_field");
|
||||||
DBUG_PRINT("enter", ("setup: 0x%lx data: 0x%lx",
|
DBUG_PRINT("enter", ("setup: %p data: %p",
|
||||||
(ulong) to, (ulong) fast_field_copier_func));
|
to, fast_field_copier_func));
|
||||||
if (fast_field_copier_func)
|
if (fast_field_copier_func)
|
||||||
{
|
{
|
||||||
if (field->is_null())
|
if (field->is_null())
|
||||||
|
@@ -3438,7 +3438,7 @@ public:
|
|||||||
DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII)
|
DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII)
|
||||||
{ }
|
{ }
|
||||||
Item_string_ascii(THD *thd, const char *str):
|
Item_string_ascii(THD *thd, const char *str):
|
||||||
Item_string(thd, str, strlen(str), &my_charset_latin1,
|
Item_string(thd, str, (uint)strlen(str), &my_charset_latin1,
|
||||||
DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII)
|
DERIVATION_COERCIBLE, MY_REPERTOIRE_ASCII)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
@@ -3744,7 +3744,7 @@ uchar *in_row::get_value(Item *item)
|
|||||||
void in_row::set(uint pos, Item *item)
|
void in_row::set(uint pos, Item *item)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("in_row::set");
|
DBUG_ENTER("in_row::set");
|
||||||
DBUG_PRINT("enter", ("pos: %u item: 0x%lx", pos, (ulong) item));
|
DBUG_PRINT("enter", ("pos: %u item: %p", pos,item));
|
||||||
((cmp_item_row*) base)[pos].store_value_by_template(current_thd, &tmp, item);
|
((cmp_item_row*) base)[pos].store_value_by_template(current_thd, &tmp, item);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@@ -3909,7 +3909,7 @@ cmp_item* cmp_item_row::make_same()
|
|||||||
cmp_item_row::~cmp_item_row()
|
cmp_item_row::~cmp_item_row()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("~cmp_item_row");
|
DBUG_ENTER("~cmp_item_row");
|
||||||
DBUG_PRINT("enter",("this: 0x%lx", (long) this));
|
DBUG_PRINT("enter",("this: %p", this));
|
||||||
if (comparators)
|
if (comparators)
|
||||||
{
|
{
|
||||||
for (uint i= 0; i < n; i++)
|
for (uint i= 0; i < n; i++)
|
||||||
|
@@ -58,7 +58,7 @@ Item_subselect::Item_subselect(THD *thd_arg):
|
|||||||
changed(0), is_correlated(FALSE), with_recursive_reference(0)
|
changed(0), is_correlated(FALSE), with_recursive_reference(0)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Item_subselect::Item_subselect");
|
DBUG_ENTER("Item_subselect::Item_subselect");
|
||||||
DBUG_PRINT("enter", ("this: 0x%lx", (ulong) this));
|
DBUG_PRINT("enter", ("this: %p", this));
|
||||||
sortbuffer.str= 0;
|
sortbuffer.str= 0;
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
@@ -84,8 +84,8 @@ void Item_subselect::init(st_select_lex *select_lex,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
DBUG_ENTER("Item_subselect::init");
|
DBUG_ENTER("Item_subselect::init");
|
||||||
DBUG_PRINT("enter", ("select_lex: 0x%lx this: 0x%lx",
|
DBUG_PRINT("enter", ("select_lex: %p this: %p",
|
||||||
(ulong) select_lex, (ulong) this));
|
select_lex, this));
|
||||||
unit= select_lex->master_unit();
|
unit= select_lex->master_unit();
|
||||||
|
|
||||||
if (unit->item)
|
if (unit->item)
|
||||||
@@ -130,7 +130,7 @@ void Item_subselect::init(st_select_lex *select_lex,
|
|||||||
/* The subquery is an expression cache candidate */
|
/* The subquery is an expression cache candidate */
|
||||||
upper->expr_cache_may_be_used[upper->parsing_place]= TRUE;
|
upper->expr_cache_may_be_used[upper->parsing_place]= TRUE;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info", ("engine: 0x%lx", (ulong)engine));
|
DBUG_PRINT("info", ("engine: %p", engine));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,7 +215,7 @@ void Item_allany_subselect::cleanup()
|
|||||||
Item_subselect::~Item_subselect()
|
Item_subselect::~Item_subselect()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Item_subselect::~Item_subselect");
|
DBUG_ENTER("Item_subselect::~Item_subselect");
|
||||||
DBUG_PRINT("enter", ("this: 0x%lx", (ulong) this));
|
DBUG_PRINT("enter", ("this: %p", this));
|
||||||
if (own_engine)
|
if (own_engine)
|
||||||
delete engine;
|
delete engine;
|
||||||
else
|
else
|
||||||
|
@@ -5611,8 +5611,8 @@ int THD::binlog_write_table_map(TABLE *table, bool is_transactional,
|
|||||||
{
|
{
|
||||||
int error;
|
int error;
|
||||||
DBUG_ENTER("THD::binlog_write_table_map");
|
DBUG_ENTER("THD::binlog_write_table_map");
|
||||||
DBUG_PRINT("enter", ("table: 0x%lx (%s: #%lu)",
|
DBUG_PRINT("enter", ("table: %p (%s: #%lu)",
|
||||||
(long) table, table->s->table_name.str,
|
table, table->s->table_name.str,
|
||||||
table->s->table_map_id));
|
table->s->table_map_id));
|
||||||
|
|
||||||
/* Ensure that all events in a GTID group are in the same cache */
|
/* Ensure that all events in a GTID group are in the same cache */
|
||||||
@@ -5763,7 +5763,7 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd,
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("MYSQL_BIN_LOG::flush_and_set_pending_rows_event(event)");
|
DBUG_ENTER("MYSQL_BIN_LOG::flush_and_set_pending_rows_event(event)");
|
||||||
DBUG_ASSERT(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open());
|
DBUG_ASSERT(WSREP_EMULATE_BINLOG(thd) || mysql_bin_log.is_open());
|
||||||
DBUG_PRINT("enter", ("event: 0x%lx", (long) event));
|
DBUG_PRINT("enter", ("event: %p", event));
|
||||||
|
|
||||||
int error= 0;
|
int error= 0;
|
||||||
binlog_cache_mngr *const cache_mngr=
|
binlog_cache_mngr *const cache_mngr=
|
||||||
@@ -5774,7 +5774,7 @@ MYSQL_BIN_LOG::flush_and_set_pending_rows_event(THD *thd,
|
|||||||
binlog_cache_data *cache_data=
|
binlog_cache_data *cache_data=
|
||||||
cache_mngr->get_binlog_cache_data(use_trans_cache(thd, is_transactional));
|
cache_mngr->get_binlog_cache_data(use_trans_cache(thd, is_transactional));
|
||||||
|
|
||||||
DBUG_PRINT("info", ("cache_mngr->pending(): 0x%lx", (long) cache_data->pending()));
|
DBUG_PRINT("info", ("cache_mngr->pending(): %p", cache_data->pending()));
|
||||||
|
|
||||||
if (Rows_log_event* pending= cache_data->pending())
|
if (Rows_log_event* pending= cache_data->pending())
|
||||||
{
|
{
|
||||||
|
@@ -2427,9 +2427,9 @@ void Log_event::print_header(IO_CACHE* file,
|
|||||||
if (checksum_alg != BINLOG_CHECKSUM_ALG_OFF &&
|
if (checksum_alg != BINLOG_CHECKSUM_ALG_OFF &&
|
||||||
checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF)
|
checksum_alg != BINLOG_CHECKSUM_ALG_UNDEF)
|
||||||
{
|
{
|
||||||
char checksum_buf[BINLOG_CHECKSUM_LEN * 2 + 4]; // to fit to "0x%lx "
|
char checksum_buf[BINLOG_CHECKSUM_LEN * 2 + 4]; // to fit to "%p "
|
||||||
size_t const bytes_written=
|
size_t const bytes_written=
|
||||||
my_snprintf(checksum_buf, sizeof(checksum_buf), "0x%08lx ", (ulong) crc);
|
my_snprintf(checksum_buf, sizeof(checksum_buf), "0x%08x ", crc);
|
||||||
my_b_printf(file, "%s ", get_type(&binlog_checksum_typelib, checksum_alg));
|
my_b_printf(file, "%s ", get_type(&binlog_checksum_typelib, checksum_alg));
|
||||||
my_b_printf(file, checksum_buf, bytes_written);
|
my_b_printf(file, checksum_buf, bytes_written);
|
||||||
}
|
}
|
||||||
@@ -4345,8 +4345,8 @@ Query_log_event::Query_log_event(const char* buf, uint event_len,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Q_CATALOG_NZ_CODE:
|
case Q_CATALOG_NZ_CODE:
|
||||||
DBUG_PRINT("info", ("case Q_CATALOG_NZ_CODE; pos: 0x%lx; end: 0x%lx",
|
DBUG_PRINT("info", ("case Q_CATALOG_NZ_CODE; pos:%p; end:%p",
|
||||||
(ulong) pos, (ulong) end));
|
pos, end));
|
||||||
if (get_str_len_and_pointer(&pos, &catalog, &catalog_len, end))
|
if (get_str_len_and_pointer(&pos, &catalog, &catalog_len, end))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("query= 0"));
|
DBUG_PRINT("info", ("query= 0"));
|
||||||
@@ -10456,7 +10456,7 @@ int Rows_log_event::do_add_row_data(uchar *row_data, size_t length)
|
|||||||
would save binlog space. TODO
|
would save binlog space. TODO
|
||||||
*/
|
*/
|
||||||
DBUG_ENTER("Rows_log_event::do_add_row_data");
|
DBUG_ENTER("Rows_log_event::do_add_row_data");
|
||||||
DBUG_PRINT("enter", ("row_data: 0x%lx length: %lu", (ulong) row_data,
|
DBUG_PRINT("enter", ("row_data:%p length: %lu", row_data,
|
||||||
(ulong) length));
|
(ulong) length));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -10836,8 +10836,8 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
|
|||||||
|
|
||||||
table= m_table= rgi->m_table_map.get_table(m_table_id);
|
table= m_table= rgi->m_table_map.get_table(m_table_id);
|
||||||
|
|
||||||
DBUG_PRINT("debug", ("m_table: 0x%lx, m_table_id: %lu%s",
|
DBUG_PRINT("debug", ("m_table:%p, m_table_id: %lu%s",
|
||||||
(ulong) m_table, m_table_id,
|
m_table, m_table_id,
|
||||||
table && master_had_triggers ?
|
table && master_had_triggers ?
|
||||||
" (master had triggers)" : ""));
|
" (master had triggers)" : ""));
|
||||||
if (table)
|
if (table)
|
||||||
@@ -10957,8 +10957,8 @@ int Rows_log_event::do_apply_event(rpl_group_info *rgi)
|
|||||||
m_curr_row_end.
|
m_curr_row_end.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
DBUG_PRINT("info", ("curr_row: 0x%lu; curr_row_end: 0x%lu; rows_end: 0x%lu",
|
DBUG_PRINT("info", ("curr_row: %p; curr_row_end: %p; rows_end:%p",
|
||||||
(ulong) m_curr_row, (ulong) m_curr_row_end, (ulong) m_rows_end));
|
m_curr_row, m_curr_row_end, m_rows_end));
|
||||||
|
|
||||||
if (!m_curr_row_end && !error)
|
if (!m_curr_row_end && !error)
|
||||||
error= unpack_current_row(rgi);
|
error= unpack_current_row(rgi);
|
||||||
|
@@ -364,10 +364,10 @@ copy_extra_record_fields(TABLE *table,
|
|||||||
my_ptrdiff_t master_fields)
|
my_ptrdiff_t master_fields)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("copy_extra_record_fields(table, master_reclen, master_fields)");
|
DBUG_ENTER("copy_extra_record_fields(table, master_reclen, master_fields)");
|
||||||
DBUG_PRINT("info", ("Copying to 0x%lx "
|
DBUG_PRINT("info", ("Copying to %p "
|
||||||
"from field %lu at offset %lu "
|
"from field %lu at offset %lu "
|
||||||
"to field %d at offset %lu",
|
"to field %d at offset %lu",
|
||||||
(long) table->record[0],
|
table->record[0],
|
||||||
(ulong) master_fields, (ulong) master_reclength,
|
(ulong) master_fields, (ulong) master_reclength,
|
||||||
table->s->fields, table->s->reclength));
|
table->s->fields, table->s->reclength));
|
||||||
/*
|
/*
|
||||||
@@ -625,8 +625,8 @@ replace_record(THD *thd, TABLE *table,
|
|||||||
static int find_and_fetch_row(TABLE *table, uchar *key)
|
static int find_and_fetch_row(TABLE *table, uchar *key)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("find_and_fetch_row(TABLE *table, uchar *key, uchar *record)");
|
DBUG_ENTER("find_and_fetch_row(TABLE *table, uchar *key, uchar *record)");
|
||||||
DBUG_PRINT("enter", ("table: 0x%lx, key: 0x%lx record: 0x%lx",
|
DBUG_PRINT("enter", ("table: %p, key: %p record: %p",
|
||||||
(long) table, (long) key, (long) table->record[1]));
|
table, key, table->record[1]));
|
||||||
|
|
||||||
DBUG_ASSERT(table->in_use != NULL);
|
DBUG_ASSERT(table->in_use != NULL);
|
||||||
|
|
||||||
@@ -1254,8 +1254,8 @@ Old_rows_log_event::Old_rows_log_event(const char *buf, uint event_len,
|
|||||||
|
|
||||||
const uchar* const ptr_rows_data= (const uchar*) ptr_after_width;
|
const uchar* const ptr_rows_data= (const uchar*) ptr_after_width;
|
||||||
size_t const data_size= event_len - (ptr_rows_data - (const uchar *) buf);
|
size_t const data_size= event_len - (ptr_rows_data - (const uchar *) buf);
|
||||||
DBUG_PRINT("info",("m_table_id: %lu m_flags: %d m_width: %lu data_size: %lu",
|
DBUG_PRINT("info",("m_table_id: %lu m_flags: %d m_width: %lu data_size: %zu",
|
||||||
m_table_id, m_flags, m_width, (ulong) data_size));
|
m_table_id, m_flags, m_width, data_size));
|
||||||
DBUG_DUMP("rows_data", (uchar*) ptr_rows_data, data_size);
|
DBUG_DUMP("rows_data", (uchar*) ptr_rows_data, data_size);
|
||||||
|
|
||||||
m_rows_buf= (uchar*) my_malloc(data_size, MYF(MY_WME));
|
m_rows_buf= (uchar*) my_malloc(data_size, MYF(MY_WME));
|
||||||
@@ -1310,8 +1310,8 @@ int Old_rows_log_event::do_add_row_data(uchar *row_data, size_t length)
|
|||||||
would save binlog space. TODO
|
would save binlog space. TODO
|
||||||
*/
|
*/
|
||||||
DBUG_ENTER("Old_rows_log_event::do_add_row_data");
|
DBUG_ENTER("Old_rows_log_event::do_add_row_data");
|
||||||
DBUG_PRINT("enter", ("row_data: 0x%lx length: %lu", (ulong) row_data,
|
DBUG_PRINT("enter", ("row_data: %p length: %zu",row_data,
|
||||||
(ulong) length));
|
length));
|
||||||
/*
|
/*
|
||||||
Don't print debug messages when running valgrind since they can
|
Don't print debug messages when running valgrind since they can
|
||||||
trigger false warnings.
|
trigger false warnings.
|
||||||
@@ -1599,8 +1599,8 @@ int Old_rows_log_event::do_apply_event(rpl_group_info *rgi)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
DBUG_PRINT("info", ("error: %d", error));
|
DBUG_PRINT("info", ("error: %d", error));
|
||||||
DBUG_PRINT("info", ("curr_row: 0x%lu; curr_row_end: 0x%lu; rows_end: 0x%lu",
|
DBUG_PRINT("info", ("curr_row: %p; curr_row_end:%p; rows_end: %p",
|
||||||
(ulong) m_curr_row, (ulong) m_curr_row_end, (ulong) m_rows_end));
|
m_curr_row, m_curr_row_end, m_rows_end));
|
||||||
|
|
||||||
if (!m_curr_row_end && !error)
|
if (!m_curr_row_end && !error)
|
||||||
unpack_current_row(rgi);
|
unpack_current_row(rgi);
|
||||||
|
@@ -1594,7 +1594,7 @@ static void close_connections(void)
|
|||||||
|
|
||||||
/* kill connection thread */
|
/* kill connection thread */
|
||||||
#if !defined(__WIN__)
|
#if !defined(__WIN__)
|
||||||
DBUG_PRINT("quit", ("waiting for select thread: 0x%lx",
|
DBUG_PRINT("quit", ("waiting for select thread: %lu",
|
||||||
(ulong)select_thread));
|
(ulong)select_thread));
|
||||||
|
|
||||||
mysql_mutex_lock(&LOCK_start_thread);
|
mysql_mutex_lock(&LOCK_start_thread);
|
||||||
@@ -2893,7 +2893,7 @@ void signal_thd_deleted()
|
|||||||
void unlink_thd(THD *thd)
|
void unlink_thd(THD *thd)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("unlink_thd");
|
DBUG_ENTER("unlink_thd");
|
||||||
DBUG_PRINT("enter", ("thd: 0x%lx", (long) thd));
|
DBUG_PRINT("enter", ("thd: %p", thd));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Do not decrement when its wsrep system thread. wsrep_applier is set for
|
Do not decrement when its wsrep system thread. wsrep_applier is set for
|
||||||
@@ -4848,7 +4848,7 @@ static void init_ssl()
|
|||||||
opt_ssl_ca, opt_ssl_capath,
|
opt_ssl_ca, opt_ssl_capath,
|
||||||
opt_ssl_cipher, &error,
|
opt_ssl_cipher, &error,
|
||||||
opt_ssl_crl, opt_ssl_crlpath);
|
opt_ssl_crl, opt_ssl_crlpath);
|
||||||
DBUG_PRINT("info",("ssl_acceptor_fd: 0x%lx", (long) ssl_acceptor_fd));
|
DBUG_PRINT("info",("ssl_acceptor_fd: %p", ssl_acceptor_fd));
|
||||||
if (!ssl_acceptor_fd)
|
if (!ssl_acceptor_fd)
|
||||||
{
|
{
|
||||||
sql_print_warning("Failed to setup SSL");
|
sql_print_warning("Failed to setup SSL");
|
||||||
|
@@ -1321,7 +1321,7 @@ QUICK_RANGE_SELECT::~QUICK_RANGE_SELECT()
|
|||||||
file->ha_end_keyread();
|
file->ha_end_keyread();
|
||||||
if (free_file)
|
if (free_file)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("Freeing separate handler 0x%lx (free: %d)", (long) file,
|
DBUG_PRINT("info", ("Freeing separate handler %p (free: %d)", file,
|
||||||
free_file));
|
free_file));
|
||||||
file->ha_external_lock(current_thd, F_UNLCK);
|
file->ha_external_lock(current_thd, F_UNLCK);
|
||||||
file->ha_close();
|
file->ha_close();
|
||||||
@@ -1483,7 +1483,7 @@ int QUICK_RANGE_SELECT::init_ror_merged_scan(bool reuse_handler,
|
|||||||
in_ror_merged_scan= 1;
|
in_ror_merged_scan= 1;
|
||||||
if (reuse_handler)
|
if (reuse_handler)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("Reusing handler 0x%lx", (long) file));
|
DBUG_PRINT("info", ("Reusing handler %p", file));
|
||||||
if (init())
|
if (init())
|
||||||
{
|
{
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
@@ -10217,7 +10217,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
|
|||||||
ulong count=count_key_part_usage(root,pos->next_key_part);
|
ulong count=count_key_part_usage(root,pos->next_key_part);
|
||||||
if (count > pos->next_key_part->use_count)
|
if (count > pos->next_key_part->use_count)
|
||||||
{
|
{
|
||||||
sql_print_information("Use_count: Wrong count for key at 0x%lx, %lu "
|
sql_print_information("Use_count: Wrong count for key at %p, %lu "
|
||||||
"should be %lu", (long unsigned int)pos,
|
"should be %lu", (long unsigned int)pos,
|
||||||
pos->next_key_part->use_count, count);
|
pos->next_key_part->use_count, count);
|
||||||
return;
|
return;
|
||||||
@@ -10226,7 +10226,7 @@ void SEL_ARG::test_use_count(SEL_ARG *root)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e_count != elements)
|
if (e_count != elements)
|
||||||
sql_print_warning("Wrong use count: %u (should be %u) for tree at 0x%lx",
|
sql_print_warning("Wrong use count: %u (should be %u) for tree at %p",
|
||||||
e_count, elements, (long unsigned int) this);
|
e_count, elements, (long unsigned int) this);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -14612,7 +14612,7 @@ static void print_sel_tree(PARAM *param, SEL_TREE *tree, key_map *tree_map,
|
|||||||
if (!tmp.length())
|
if (!tmp.length())
|
||||||
tmp.append(STRING_WITH_LEN("(empty)"));
|
tmp.append(STRING_WITH_LEN("(empty)"));
|
||||||
|
|
||||||
DBUG_PRINT("info", ("SEL_TREE: 0x%lx (%s) scans: %s", (long) tree, msg,
|
DBUG_PRINT("info", ("SEL_TREE: %p (%s) scans: %s", tree, msg,
|
||||||
tmp.c_ptr_safe()));
|
tmp.c_ptr_safe()));
|
||||||
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
|
@@ -258,9 +258,9 @@ sql_create_definition_file(const LEX_STRING *dir, const LEX_STRING *file_name,
|
|||||||
int path_end;
|
int path_end;
|
||||||
File_option *param;
|
File_option *param;
|
||||||
DBUG_ENTER("sql_create_definition_file");
|
DBUG_ENTER("sql_create_definition_file");
|
||||||
DBUG_PRINT("enter", ("Dir: %s, file: %s, base 0x%lx",
|
DBUG_PRINT("enter", ("Dir: %s, file: %s, base %p",
|
||||||
dir ? dir->str : "",
|
dir ? dir->str : "",
|
||||||
file_name->str, (ulong) base));
|
file_name->str, base));
|
||||||
|
|
||||||
if (dir)
|
if (dir)
|
||||||
{
|
{
|
||||||
|
@@ -105,10 +105,10 @@ pack_row(TABLE *table, MY_BITMAP const* cols,
|
|||||||
#endif
|
#endif
|
||||||
pack_ptr= field->pack(pack_ptr, field->ptr + offset,
|
pack_ptr= field->pack(pack_ptr, field->ptr + offset,
|
||||||
field->max_data_length());
|
field->max_data_length());
|
||||||
DBUG_PRINT("debug", ("field: %s; real_type: %d, pack_ptr: 0x%lx;"
|
DBUG_PRINT("debug", ("field: %s; real_type: %d, pack_ptr: %p;"
|
||||||
" pack_ptr':0x%lx; bytes: %d",
|
" pack_ptr':%p; bytes: %d",
|
||||||
field->field_name, field->real_type(),
|
field->field_name, field->real_type(),
|
||||||
(ulong) old_pack_ptr, (ulong) pack_ptr,
|
old_pack_ptr,pack_ptr,
|
||||||
(int) (pack_ptr - old_pack_ptr)));
|
(int) (pack_ptr - old_pack_ptr)));
|
||||||
DBUG_DUMP("packed_data", old_pack_ptr, pack_ptr - old_pack_ptr);
|
DBUG_DUMP("packed_data", old_pack_ptr, pack_ptr - old_pack_ptr);
|
||||||
}
|
}
|
||||||
@@ -322,9 +322,9 @@ unpack_row(rpl_group_info *rgi,
|
|||||||
|
|
||||||
pack_ptr= f->unpack(f->ptr, pack_ptr, row_end, metadata);
|
pack_ptr= f->unpack(f->ptr, pack_ptr, row_end, metadata);
|
||||||
DBUG_PRINT("debug", ("field: %s; metadata: 0x%x;"
|
DBUG_PRINT("debug", ("field: %s; metadata: 0x%x;"
|
||||||
" pack_ptr: 0x%lx; pack_ptr': 0x%lx; bytes: %d",
|
" pack_ptr: %p; pack_ptr': %p; bytes: %d",
|
||||||
f->field_name, metadata,
|
f->field_name, metadata,
|
||||||
(ulong) old_pack_ptr, (ulong) pack_ptr,
|
old_pack_ptr, pack_ptr,
|
||||||
(int) (pack_ptr - old_pack_ptr)));
|
(int) (pack_ptr - old_pack_ptr)));
|
||||||
if (!pack_ptr)
|
if (!pack_ptr)
|
||||||
{
|
{
|
||||||
@@ -336,8 +336,8 @@ unpack_row(rpl_group_info *rgi,
|
|||||||
Galera Node throws "Could not read field" error and drops out of cluster
|
Galera Node throws "Could not read field" error and drops out of cluster
|
||||||
*/
|
*/
|
||||||
WSREP_WARN("ROW event unpack field: %s metadata: 0x%x;"
|
WSREP_WARN("ROW event unpack field: %s metadata: 0x%x;"
|
||||||
" pack_ptr: 0x%lx; conv_table %p conv_field %p table %s"
|
" pack_ptr: %p; conv_table %p conv_field %p table %s"
|
||||||
" row_end: 0x%lx",
|
" row_end: %p",
|
||||||
f->field_name, metadata,
|
f->field_name, metadata,
|
||||||
(ulong) old_pack_ptr, conv_table, conv_field,
|
(ulong) old_pack_ptr, conv_table, conv_field,
|
||||||
(table_found) ? "found" : "not found", (ulong)row_end
|
(table_found) ? "found" : "not found", (ulong)row_end
|
||||||
|
@@ -66,8 +66,8 @@ TABLE* table_mapping::get_table(ulong table_id)
|
|||||||
entry *e= find_entry(table_id);
|
entry *e= find_entry(table_id);
|
||||||
if (e)
|
if (e)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("tid %lu -> table 0x%lx (%s)",
|
DBUG_PRINT("info", ("tid %lu -> table %p (%s)",
|
||||||
table_id, (long) e->table,
|
table_id, e->table,
|
||||||
MAYBE_TABLE_NAME(e->table)));
|
MAYBE_TABLE_NAME(e->table)));
|
||||||
DBUG_RETURN(e->table);
|
DBUG_RETURN(e->table);
|
||||||
}
|
}
|
||||||
@@ -105,9 +105,9 @@ int table_mapping::expand()
|
|||||||
int table_mapping::set_table(ulong table_id, TABLE* table)
|
int table_mapping::set_table(ulong table_id, TABLE* table)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("table_mapping::set_table(ulong,TABLE*)");
|
DBUG_ENTER("table_mapping::set_table(ulong,TABLE*)");
|
||||||
DBUG_PRINT("enter", ("table_id: %lu table: 0x%lx (%s)",
|
DBUG_PRINT("enter", ("table_id: %lu table: %p (%s)",
|
||||||
table_id,
|
table_id,
|
||||||
(long) table, MAYBE_TABLE_NAME(table)));
|
table, MAYBE_TABLE_NAME(table)));
|
||||||
entry *e= find_entry(table_id);
|
entry *e= find_entry(table_id);
|
||||||
if (e == 0)
|
if (e == 0)
|
||||||
{
|
{
|
||||||
@@ -133,8 +133,8 @@ int table_mapping::set_table(ulong table_id, TABLE* table)
|
|||||||
DBUG_RETURN(ERR_MEMORY_ALLOCATION);
|
DBUG_RETURN(ERR_MEMORY_ALLOCATION);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("info", ("tid %lu -> table 0x%lx (%s)",
|
DBUG_PRINT("info", ("tid %lu -> table %p (%s)",
|
||||||
table_id, (long) e->table,
|
table_id, e->table,
|
||||||
MAYBE_TABLE_NAME(e->table)));
|
MAYBE_TABLE_NAME(e->table)));
|
||||||
DBUG_RETURN(0); // All OK
|
DBUG_RETURN(0); // All OK
|
||||||
}
|
}
|
||||||
|
@@ -3462,11 +3462,11 @@ sql_delay_event(Log_event *ev, THD *thd, rpl_group_info *rgi)
|
|||||||
"ev->when= %lu "
|
"ev->when= %lu "
|
||||||
"rli->mi->clock_diff_with_master= %lu "
|
"rli->mi->clock_diff_with_master= %lu "
|
||||||
"now= %ld "
|
"now= %ld "
|
||||||
"sql_delay_end= %lu "
|
"sql_delay_end= %llu "
|
||||||
"nap_time= %ld",
|
"nap_time= %ld",
|
||||||
sql_delay, (long)ev->when,
|
sql_delay, (long)ev->when,
|
||||||
rli->mi->clock_diff_with_master,
|
rli->mi->clock_diff_with_master,
|
||||||
(long)now, sql_delay_end, (long)nap_time));
|
(long)now, (ulonglong)sql_delay_end, (long)nap_time));
|
||||||
|
|
||||||
if (sql_delay_end > now)
|
if (sql_delay_end > now)
|
||||||
{
|
{
|
||||||
|
14
sql/sp.cc
14
sql/sp.cc
@@ -1754,11 +1754,11 @@ sp_find_routine(THD *thd, stored_procedure_type type, sp_name *name,
|
|||||||
String retstr(64);
|
String retstr(64);
|
||||||
retstr.set_charset(sp->get_creation_ctx()->get_client_cs());
|
retstr.set_charset(sp->get_creation_ctx()->get_client_cs());
|
||||||
|
|
||||||
DBUG_PRINT("info", ("found: 0x%lx", (ulong)sp));
|
DBUG_PRINT("info", ("found:%p", sp));
|
||||||
if (sp->m_first_free_instance)
|
if (sp->m_first_free_instance)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("first free: 0x%lx level: %lu flags %x",
|
DBUG_PRINT("info", ("first free:%p level: %lu flags %x",
|
||||||
(ulong)sp->m_first_free_instance,
|
sp->m_first_free_instance,
|
||||||
sp->m_first_free_instance->m_recursion_level,
|
sp->m_first_free_instance->m_recursion_level,
|
||||||
sp->m_first_free_instance->m_flags));
|
sp->m_first_free_instance->m_flags));
|
||||||
DBUG_ASSERT(!(sp->m_first_free_instance->m_flags & sp_head::IS_INVOKED));
|
DBUG_ASSERT(!(sp->m_first_free_instance->m_flags & sp_head::IS_INVOKED));
|
||||||
@@ -1798,8 +1798,8 @@ sp_find_routine(THD *thd, stored_procedure_type type, sp_name *name,
|
|||||||
new_sp->m_recursion_level= level;
|
new_sp->m_recursion_level= level;
|
||||||
new_sp->m_first_instance= sp;
|
new_sp->m_first_instance= sp;
|
||||||
sp->m_last_cached_sp= sp->m_first_free_instance= new_sp;
|
sp->m_last_cached_sp= sp->m_first_free_instance= new_sp;
|
||||||
DBUG_PRINT("info", ("added level: 0x%lx, level: %lu, flags %x",
|
DBUG_PRINT("info", ("added level:%p, level: %lu, flags %x",
|
||||||
(ulong)new_sp, new_sp->m_recursion_level,
|
new_sp, new_sp->m_recursion_level,
|
||||||
new_sp->m_flags));
|
new_sp->m_flags));
|
||||||
DBUG_RETURN(new_sp);
|
DBUG_RETURN(new_sp);
|
||||||
}
|
}
|
||||||
@@ -1810,8 +1810,8 @@ sp_find_routine(THD *thd, stored_procedure_type type, sp_name *name,
|
|||||||
if (db_find_routine(thd, type, name, &sp) == SP_OK)
|
if (db_find_routine(thd, type, name, &sp) == SP_OK)
|
||||||
{
|
{
|
||||||
sp_cache_insert(cp, sp);
|
sp_cache_insert(cp, sp);
|
||||||
DBUG_PRINT("info", ("added new: 0x%lx, level: %lu, flags %x",
|
DBUG_PRINT("info", ("added new:%p, level: %lu, flags %x",
|
||||||
(ulong)sp, sp->m_recursion_level,
|
sp, sp->m_recursion_level,
|
||||||
sp->m_flags));
|
sp->m_flags));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -549,7 +549,7 @@ sp_head::operator new(size_t size) throw()
|
|||||||
if (sp == NULL)
|
if (sp == NULL)
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
sp->main_mem_root= own_root;
|
sp->main_mem_root= own_root;
|
||||||
DBUG_PRINT("info", ("mem_root 0x%lx", (ulong) &sp->mem_root));
|
DBUG_PRINT("info", ("mem_root %p", &sp->mem_root));
|
||||||
DBUG_RETURN(sp);
|
DBUG_RETURN(sp);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -566,8 +566,8 @@ sp_head::operator delete(void *ptr, size_t size) throw()
|
|||||||
|
|
||||||
/* Make a copy of main_mem_root as free_root will free the sp */
|
/* Make a copy of main_mem_root as free_root will free the sp */
|
||||||
own_root= sp->main_mem_root;
|
own_root= sp->main_mem_root;
|
||||||
DBUG_PRINT("info", ("mem_root 0x%lx moved to 0x%lx",
|
DBUG_PRINT("info", ("mem_root %p moved to %p",
|
||||||
(ulong) &sp->mem_root, (ulong) &own_root));
|
&sp->mem_root, &own_root));
|
||||||
free_root(&own_root, MYF(0));
|
free_root(&own_root, MYF(0));
|
||||||
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
@@ -1154,9 +1154,9 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
|
|||||||
if (m_next_cached_sp)
|
if (m_next_cached_sp)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info",
|
DBUG_PRINT("info",
|
||||||
("first free for 0x%lx ++: 0x%lx->0x%lx level: %lu flags %x",
|
("first free for %p ++: %p->%p level: %lu flags %x",
|
||||||
(ulong)m_first_instance, (ulong) this,
|
m_first_instance, this,
|
||||||
(ulong) m_next_cached_sp,
|
m_next_cached_sp,
|
||||||
m_next_cached_sp->m_recursion_level,
|
m_next_cached_sp->m_recursion_level,
|
||||||
m_next_cached_sp->m_flags));
|
m_next_cached_sp->m_flags));
|
||||||
}
|
}
|
||||||
@@ -1454,10 +1454,10 @@ sp_head::execute(THD *thd, bool merge_da_on_success)
|
|||||||
}
|
}
|
||||||
m_flags&= ~IS_INVOKED;
|
m_flags&= ~IS_INVOKED;
|
||||||
DBUG_PRINT("info",
|
DBUG_PRINT("info",
|
||||||
("first free for 0x%lx --: 0x%lx->0x%lx, level: %lu, flags %x",
|
("first free for %p --: %p->%p, level: %lu, flags %x",
|
||||||
(ulong) m_first_instance,
|
m_first_instance,
|
||||||
(ulong) m_first_instance->m_first_free_instance,
|
m_first_instance->m_first_free_instance,
|
||||||
(ulong) this, m_recursion_level, m_flags));
|
this, m_recursion_level, m_flags));
|
||||||
/*
|
/*
|
||||||
Check that we have one of following:
|
Check that we have one of following:
|
||||||
|
|
||||||
@@ -2346,8 +2346,8 @@ sp_head::backpatch(sp_label *lab)
|
|||||||
{
|
{
|
||||||
if (bp->lab == lab)
|
if (bp->lab == lab)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("backpatch: (m_ip %d, label 0x%lx <%s>) to dest %d",
|
DBUG_PRINT("info", ("backpatch: (m_ip %d, label %p <%s>) to dest %d",
|
||||||
bp->instr->m_ip, (ulong) lab, lab->name.str, dest));
|
bp->instr->m_ip, lab, lab->name.str, dest));
|
||||||
bp->instr->backpatch(dest, lab->ctx);
|
bp->instr->backpatch(dest, lab->ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2483,8 +2483,8 @@ sp_head::reset_thd_mem_root(THD *thd)
|
|||||||
DBUG_ENTER("sp_head::reset_thd_mem_root");
|
DBUG_ENTER("sp_head::reset_thd_mem_root");
|
||||||
m_thd_root= thd->mem_root;
|
m_thd_root= thd->mem_root;
|
||||||
thd->mem_root= &main_mem_root;
|
thd->mem_root= &main_mem_root;
|
||||||
DBUG_PRINT("info", ("mem_root 0x%lx moved to thd mem root 0x%lx",
|
DBUG_PRINT("info", ("mem_root %p moved to thd mem root %p",
|
||||||
(ulong) &mem_root, (ulong) &thd->mem_root));
|
&mem_root, &thd->mem_root));
|
||||||
free_list= thd->free_list; // Keep the old list
|
free_list= thd->free_list; // Keep the old list
|
||||||
thd->free_list= NULL; // Start a new one
|
thd->free_list= NULL; // Start a new one
|
||||||
m_thd= thd;
|
m_thd= thd;
|
||||||
@@ -2514,8 +2514,8 @@ sp_head::restore_thd_mem_root(THD *thd)
|
|||||||
set_query_arena(thd); // Get new free_list and mem_root
|
set_query_arena(thd); // Get new free_list and mem_root
|
||||||
state= STMT_INITIALIZED_FOR_SP;
|
state= STMT_INITIALIZED_FOR_SP;
|
||||||
|
|
||||||
DBUG_PRINT("info", ("mem_root 0x%lx returned from thd mem root 0x%lx",
|
DBUG_PRINT("info", ("mem_root %p returned from thd mem root %p",
|
||||||
(ulong) &mem_root, (ulong) &thd->mem_root));
|
&mem_root, &thd->mem_root));
|
||||||
thd->free_list= flist; // Restore the old one
|
thd->free_list= flist; // Restore the old one
|
||||||
thd->mem_root= m_thd_root;
|
thd->mem_root= m_thd_root;
|
||||||
m_thd= NULL;
|
m_thd= NULL;
|
||||||
|
@@ -585,7 +585,7 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
DBUG_PRINT("admin", ("table: 0x%lx", (long) table->table));
|
DBUG_PRINT("admin", ("table: %p", table->table));
|
||||||
|
|
||||||
if (prepare_func)
|
if (prepare_func)
|
||||||
{
|
{
|
||||||
|
@@ -716,8 +716,8 @@ void close_thread_tables(THD *thd)
|
|||||||
#ifdef EXTRA_DEBUG
|
#ifdef EXTRA_DEBUG
|
||||||
DBUG_PRINT("tcache", ("open tables:"));
|
DBUG_PRINT("tcache", ("open tables:"));
|
||||||
for (table= thd->open_tables; table; table= table->next)
|
for (table= thd->open_tables; table; table= table->next)
|
||||||
DBUG_PRINT("tcache", ("table: '%s'.'%s' 0x%lx", table->s->db.str,
|
DBUG_PRINT("tcache", ("table: '%s'.'%s' %p", table->s->db.str,
|
||||||
table->s->table_name.str, (long) table));
|
table->s->table_name.str, table));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(ENABLED_DEBUG_SYNC)
|
#if defined(ENABLED_DEBUG_SYNC)
|
||||||
@@ -857,8 +857,8 @@ void close_thread_table(THD *thd, TABLE **table_ptr)
|
|||||||
{
|
{
|
||||||
TABLE *table= *table_ptr;
|
TABLE *table= *table_ptr;
|
||||||
DBUG_ENTER("close_thread_table");
|
DBUG_ENTER("close_thread_table");
|
||||||
DBUG_PRINT("tcache", ("table: '%s'.'%s' 0x%lx", table->s->db.str,
|
DBUG_PRINT("tcache", ("table: '%s'.'%s' %p", table->s->db.str,
|
||||||
table->s->table_name.str, (long) table));
|
table->s->table_name.str, table));
|
||||||
DBUG_ASSERT(!table->file->keyread_enabled());
|
DBUG_ASSERT(!table->file->keyread_enabled());
|
||||||
DBUG_ASSERT(!table->file || table->file->inited == handler::NONE);
|
DBUG_ASSERT(!table->file || table->file->inited == handler::NONE);
|
||||||
|
|
||||||
@@ -1192,8 +1192,8 @@ bool wait_while_table_is_used(THD *thd, TABLE *table,
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("wait_while_table_is_used");
|
DBUG_ENTER("wait_while_table_is_used");
|
||||||
DBUG_ASSERT(!table->s->tmp_table);
|
DBUG_ASSERT(!table->s->tmp_table);
|
||||||
DBUG_PRINT("enter", ("table: '%s' share: 0x%lx db_stat: %u version: %lu",
|
DBUG_PRINT("enter", ("table: '%s' share: %p db_stat: %u version: %lu",
|
||||||
table->s->table_name.str, (ulong) table->s,
|
table->s->table_name.str, table->s,
|
||||||
table->db_stat, table->s->tdc->version));
|
table->db_stat, table->s->tdc->version));
|
||||||
|
|
||||||
if (thd->mdl_context.upgrade_shared_lock(
|
if (thd->mdl_context.upgrade_shared_lock(
|
||||||
@@ -5188,8 +5188,8 @@ find_field_in_view(THD *thd, TABLE_LIST *table_list,
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("find_field_in_view");
|
DBUG_ENTER("find_field_in_view");
|
||||||
DBUG_PRINT("enter",
|
DBUG_PRINT("enter",
|
||||||
("view: '%s', field name: '%s', item name: '%s', ref 0x%lx",
|
("view: '%s', field name: '%s', item name: '%s', ref %p",
|
||||||
table_list->alias, name, item_name, (ulong) ref));
|
table_list->alias, name, item_name, ref));
|
||||||
Field_iterator_view field_it;
|
Field_iterator_view field_it;
|
||||||
field_it.set(table_list);
|
field_it.set(table_list);
|
||||||
Query_arena *arena= 0, backup;
|
Query_arena *arena= 0, backup;
|
||||||
@@ -5290,8 +5290,8 @@ find_field_in_natural_join(THD *thd, TABLE_LIST *table_ref, const char *name,
|
|||||||
Field *UNINIT_VAR(found_field);
|
Field *UNINIT_VAR(found_field);
|
||||||
Query_arena *UNINIT_VAR(arena), backup;
|
Query_arena *UNINIT_VAR(arena), backup;
|
||||||
DBUG_ENTER("find_field_in_natural_join");
|
DBUG_ENTER("find_field_in_natural_join");
|
||||||
DBUG_PRINT("enter", ("field name: '%s', ref 0x%lx",
|
DBUG_PRINT("enter", ("field name: '%s', ref %p",
|
||||||
name, (ulong) ref));
|
name, ref));
|
||||||
DBUG_ASSERT(table_ref->is_natural_join && table_ref->join_columns);
|
DBUG_ASSERT(table_ref->is_natural_join && table_ref->join_columns);
|
||||||
DBUG_ASSERT(*actual_table == NULL);
|
DBUG_ASSERT(*actual_table == NULL);
|
||||||
|
|
||||||
@@ -5521,8 +5521,8 @@ find_field_in_table_ref(THD *thd, TABLE_LIST *table_list,
|
|||||||
DBUG_ASSERT(name);
|
DBUG_ASSERT(name);
|
||||||
DBUG_ASSERT(item_name);
|
DBUG_ASSERT(item_name);
|
||||||
DBUG_PRINT("enter",
|
DBUG_PRINT("enter",
|
||||||
("table: '%s' field name: '%s' item name: '%s' ref 0x%lx",
|
("table: '%s' field name: '%s' item name: '%s' ref %p",
|
||||||
table_list->alias, name, item_name, (ulong) ref));
|
table_list->alias, name, item_name, ref));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Check that the table and database that qualify the current field name
|
Check that the table and database that qualify the current field name
|
||||||
@@ -7412,7 +7412,7 @@ insert_fields(THD *thd, Name_resolution_context *context, const char *db_name,
|
|||||||
bool found;
|
bool found;
|
||||||
char name_buff[SAFE_NAME_LEN+1];
|
char name_buff[SAFE_NAME_LEN+1];
|
||||||
DBUG_ENTER("insert_fields");
|
DBUG_ENTER("insert_fields");
|
||||||
DBUG_PRINT("arena", ("stmt arena: 0x%lx", (ulong)thd->stmt_arena));
|
DBUG_PRINT("arena", ("stmt arena: %p",thd->stmt_arena));
|
||||||
|
|
||||||
if (db_name && lower_case_table_names)
|
if (db_name && lower_case_table_names)
|
||||||
{
|
{
|
||||||
|
@@ -192,8 +192,8 @@ void mysql_client_binlog_statement(THD* thd)
|
|||||||
since it will read from unassigned memory.
|
since it will read from unassigned memory.
|
||||||
*/
|
*/
|
||||||
DBUG_PRINT("info",
|
DBUG_PRINT("info",
|
||||||
("bytes_decoded: %d strptr: 0x%lx endptr: 0x%lx ('%c':%d)",
|
("bytes_decoded: %d strptr: %p endptr: %p ('%c':%d)",
|
||||||
bytes_decoded, (long) strptr, (long) endptr, *endptr,
|
bytes_decoded, strptr, endptr, *endptr,
|
||||||
*endptr));
|
*endptr));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
422
sql/sql_cache.cc
422
sql/sql_cache.cc
@@ -356,27 +356,27 @@ const uchar *query_state_map;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(EXTRA_DEBUG) && !defined(DBUG_OFF)
|
#if defined(EXTRA_DEBUG) && !defined(DBUG_OFF)
|
||||||
#define RW_WLOCK(M) {DBUG_PRINT("lock", ("rwlock wlock 0x%lx",(ulong)(M))); \
|
#define RW_WLOCK(M) {DBUG_PRINT("lock", ("rwlock wlock %p",(M))); \
|
||||||
if (!mysql_rwlock_wrlock(M)) DBUG_PRINT("lock", ("rwlock wlock ok")); \
|
if (!mysql_rwlock_wrlock(M)) DBUG_PRINT("lock", ("rwlock wlock ok")); \
|
||||||
else DBUG_PRINT("lock", ("rwlock wlock FAILED %d", errno)); }
|
else DBUG_PRINT("lock", ("rwlock wlock FAILED %d", errno)); }
|
||||||
#define RW_RLOCK(M) {DBUG_PRINT("lock", ("rwlock rlock 0x%lx", (ulong)(M))); \
|
#define RW_RLOCK(M) {DBUG_PRINT("lock", ("rwlock rlock %p",(M))); \
|
||||||
if (!mysql_rwlock_rdlock(M)) DBUG_PRINT("lock", ("rwlock rlock ok")); \
|
if (!mysql_rwlock_rdlock(M)) DBUG_PRINT("lock", ("rwlock rlock ok")); \
|
||||||
else DBUG_PRINT("lock", ("rwlock wlock FAILED %d", errno)); }
|
else DBUG_PRINT("lock", ("rwlock wlock FAILED %d", errno)); }
|
||||||
#define RW_UNLOCK(M) {DBUG_PRINT("lock", ("rwlock unlock 0x%lx",(ulong)(M))); \
|
#define RW_UNLOCK(M) {DBUG_PRINT("lock", ("rwlock unlock %p",(M))); \
|
||||||
if (!mysql_rwlock_unlock(M)) DBUG_PRINT("lock", ("rwlock unlock ok")); \
|
if (!mysql_rwlock_unlock(M)) DBUG_PRINT("lock", ("rwlock unlock ok")); \
|
||||||
else DBUG_PRINT("lock", ("rwlock unlock FAILED %d", errno)); }
|
else DBUG_PRINT("lock", ("rwlock unlock FAILED %d", errno)); }
|
||||||
#define BLOCK_LOCK_WR(B) {DBUG_PRINT("lock", ("%d LOCK_WR 0x%lx",\
|
#define BLOCK_LOCK_WR(B) {DBUG_PRINT("lock", ("%d LOCK_WR %p",\
|
||||||
__LINE__,(ulong)(B))); \
|
__LINE__,(B))); \
|
||||||
B->query()->lock_writing();}
|
B->query()->lock_writing();}
|
||||||
#define BLOCK_LOCK_RD(B) {DBUG_PRINT("lock", ("%d LOCK_RD 0x%lx",\
|
#define BLOCK_LOCK_RD(B) {DBUG_PRINT("lock", ("%d LOCK_RD %p",\
|
||||||
__LINE__,(ulong)(B))); \
|
__LINE__,(B))); \
|
||||||
B->query()->lock_reading();}
|
B->query()->lock_reading();}
|
||||||
#define BLOCK_UNLOCK_WR(B) { \
|
#define BLOCK_UNLOCK_WR(B) { \
|
||||||
DBUG_PRINT("lock", ("%d UNLOCK_WR 0x%lx",\
|
DBUG_PRINT("lock", ("%d UNLOCK_WR %p",\
|
||||||
__LINE__,(ulong)(B)));B->query()->unlock_writing();}
|
__LINE__,(B)));B->query()->unlock_writing();}
|
||||||
#define BLOCK_UNLOCK_RD(B) { \
|
#define BLOCK_UNLOCK_RD(B) { \
|
||||||
DBUG_PRINT("lock", ("%d UNLOCK_RD 0x%lx",\
|
DBUG_PRINT("lock", ("%d UNLOCK_RD %p",\
|
||||||
__LINE__,(ulong)(B)));B->query()->unlock_reading();}
|
__LINE__,(B)));B->query()->unlock_reading();}
|
||||||
#define DUMP(C) DBUG_EXECUTE("qcache", {\
|
#define DUMP(C) DBUG_EXECUTE("qcache", {\
|
||||||
(C)->cache_dump(); (C)->queries_dump();(C)->tables_dump();})
|
(C)->cache_dump(); (C)->queries_dump();(C)->tables_dump();})
|
||||||
#else
|
#else
|
||||||
@@ -647,7 +647,7 @@ bool Query_cache::try_lock(THD *thd, Cache_try_lock_mode mode)
|
|||||||
else if (mode == TIMEOUT)
|
else if (mode == TIMEOUT)
|
||||||
{
|
{
|
||||||
struct timespec waittime;
|
struct timespec waittime;
|
||||||
set_timespec_nsec(waittime,(ulong)(50000000L)); /* Wait for 50 msec */
|
set_timespec_nsec(waittime,50000000UL); /* Wait for 50 msec */
|
||||||
int res= mysql_cond_timedwait(&COND_cache_status_changed,
|
int res= mysql_cond_timedwait(&COND_cache_status_changed,
|
||||||
&structure_guard_mutex, &waittime);
|
&structure_guard_mutex, &waittime);
|
||||||
if (res == ETIMEDOUT)
|
if (res == ETIMEDOUT)
|
||||||
@@ -821,7 +821,7 @@ inline Query_cache_block * Query_cache_block_table::block()
|
|||||||
void Query_cache_block::init(ulong block_length)
|
void Query_cache_block::init(ulong block_length)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache_block::init");
|
DBUG_ENTER("Query_cache_block::init");
|
||||||
DBUG_PRINT("qcache", ("init block: 0x%lx length: %lu", (ulong) this,
|
DBUG_PRINT("qcache", ("init block: %p length: %lu", this,
|
||||||
block_length));
|
block_length));
|
||||||
length = block_length;
|
length = block_length;
|
||||||
used = 0;
|
used = 0;
|
||||||
@@ -833,8 +833,8 @@ void Query_cache_block::init(ulong block_length)
|
|||||||
void Query_cache_block::destroy()
|
void Query_cache_block::destroy()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache_block::destroy");
|
DBUG_ENTER("Query_cache_block::destroy");
|
||||||
DBUG_PRINT("qcache", ("destroy block 0x%lx, type %d",
|
DBUG_PRINT("qcache", ("destroy block %p, type %d",
|
||||||
(ulong) this, type));
|
this, type));
|
||||||
type = INCOMPLETE;
|
type = INCOMPLETE;
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
@@ -936,7 +936,7 @@ bool Query_cache_query::try_lock_writing()
|
|||||||
DBUG_PRINT("info", ("can't lock rwlock"));
|
DBUG_PRINT("info", ("can't lock rwlock"));
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info", ("rwlock 0x%lx locked", (ulong) &lock));
|
DBUG_PRINT("info", ("rwlock %p locked", &lock));
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -965,9 +965,9 @@ void Query_cache_query::init_n_lock()
|
|||||||
res=0; wri = 0; len = 0; ready= 0;
|
res=0; wri = 0; len = 0; ready= 0;
|
||||||
mysql_rwlock_init(key_rwlock_query_cache_query_lock, &lock);
|
mysql_rwlock_init(key_rwlock_query_cache_query_lock, &lock);
|
||||||
lock_writing();
|
lock_writing();
|
||||||
DBUG_PRINT("qcache", ("inited & locked query for block 0x%lx",
|
DBUG_PRINT("qcache", ("inited & locked query for block %p",
|
||||||
(long) (((uchar*) this) -
|
(uchar*) this -
|
||||||
ALIGN_SIZE(sizeof(Query_cache_block)))));
|
ALIGN_SIZE(sizeof(Query_cache_block))));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -975,9 +975,9 @@ void Query_cache_query::init_n_lock()
|
|||||||
void Query_cache_query::unlock_n_destroy()
|
void Query_cache_query::unlock_n_destroy()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache_query::unlock_n_destroy");
|
DBUG_ENTER("Query_cache_query::unlock_n_destroy");
|
||||||
DBUG_PRINT("qcache", ("destroyed & unlocked query for block 0x%lx",
|
DBUG_PRINT("qcache", ("destroyed & unlocked query for block %p",
|
||||||
(long) (((uchar*) this) -
|
(uchar*) this -
|
||||||
ALIGN_SIZE(sizeof(Query_cache_block)))));
|
ALIGN_SIZE(sizeof(Query_cache_block))));
|
||||||
/*
|
/*
|
||||||
The following call is not needed on system where one can destroy an
|
The following call is not needed on system where one can destroy an
|
||||||
active semaphore
|
active semaphore
|
||||||
@@ -1110,7 +1110,7 @@ Query_cache::insert(THD *thd, Query_cache_tls *query_cache_tls,
|
|||||||
{
|
{
|
||||||
DBUG_PRINT("warning", ("Can't append data"));
|
DBUG_PRINT("warning", ("Can't append data"));
|
||||||
header->result(result);
|
header->result(result);
|
||||||
DBUG_PRINT("qcache", ("free query 0x%lx", (ulong) query_block));
|
DBUG_PRINT("qcache", ("free query %p", query_block));
|
||||||
// The following call will remove the lock on query_block
|
// The following call will remove the lock on query_block
|
||||||
query_cache.free_query(query_block);
|
query_cache.free_query(query_block);
|
||||||
query_cache.refused++;
|
query_cache.refused++;
|
||||||
@@ -1446,7 +1446,7 @@ void Query_cache::store_query(THD *thd, TABLE_LIST *tables_used)
|
|||||||
flags.default_week_format= thd->variables.default_week_format;
|
flags.default_week_format= thd->variables.default_week_format;
|
||||||
DBUG_PRINT("qcache", ("\
|
DBUG_PRINT("qcache", ("\
|
||||||
long %d, 4.1: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
|
long %d, 4.1: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
|
||||||
CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
|
CS client: %u, CS result: %u, CS conn: %u, limit: %llu, TZ: %p, \
|
||||||
sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
|
sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
|
||||||
def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
||||||
(int)flags.client_long_flag,
|
(int)flags.client_long_flag,
|
||||||
@@ -1458,8 +1458,8 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
|||||||
flags.character_set_client_num,
|
flags.character_set_client_num,
|
||||||
flags.character_set_results_num,
|
flags.character_set_results_num,
|
||||||
flags.collation_connection_num,
|
flags.collation_connection_num,
|
||||||
(ulong) flags.limit,
|
(ulonglong)flags.limit,
|
||||||
(ulong) flags.time_zone,
|
flags.time_zone,
|
||||||
flags.sql_mode,
|
flags.sql_mode,
|
||||||
flags.max_sort_length,
|
flags.max_sort_length,
|
||||||
flags.group_concat_max_len,
|
flags.group_concat_max_len,
|
||||||
@@ -1522,7 +1522,7 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
|||||||
/* Check if another thread is processing the same query? */
|
/* Check if another thread is processing the same query? */
|
||||||
Query_cache_block *competitor = (Query_cache_block *)
|
Query_cache_block *competitor = (Query_cache_block *)
|
||||||
my_hash_search(&queries, (uchar*) query, tot_length);
|
my_hash_search(&queries, (uchar*) query, tot_length);
|
||||||
DBUG_PRINT("qcache", ("competitor 0x%lx", (ulong) competitor));
|
DBUG_PRINT("qcache", ("competitor %p", competitor));
|
||||||
if (competitor == 0)
|
if (competitor == 0)
|
||||||
{
|
{
|
||||||
/* Query is not in cache and no one is working with it; Store it */
|
/* Query is not in cache and no one is working with it; Store it */
|
||||||
@@ -1532,8 +1532,8 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
|||||||
Query_cache_block::QUERY, local_tables);
|
Query_cache_block::QUERY, local_tables);
|
||||||
if (query_block != 0)
|
if (query_block != 0)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("query block 0x%lx allocated, %lu",
|
DBUG_PRINT("qcache", ("query block %p allocated, %lu",
|
||||||
(ulong) query_block, query_block->used));
|
query_block, query_block->used));
|
||||||
|
|
||||||
Query_cache_query *header = query_block->query();
|
Query_cache_query *header = query_block->query();
|
||||||
header->init_n_lock();
|
header->init_n_lock();
|
||||||
@@ -1944,7 +1944,7 @@ Query_cache::send_result_to_client(THD *thd, char *org_sql, uint query_length)
|
|||||||
flags.lc_time_names= thd->variables.lc_time_names;
|
flags.lc_time_names= thd->variables.lc_time_names;
|
||||||
DBUG_PRINT("qcache", ("\
|
DBUG_PRINT("qcache", ("\
|
||||||
long %d, 4.1: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
|
long %d, 4.1: %d, eof: %d, bin_proto: %d, more results %d, pkt_nr: %d, \
|
||||||
CS client: %u, CS result: %u, CS conn: %u, limit: %lu, TZ: 0x%lx, \
|
CS client: %u, CS result: %u, CS conn: %u, limit: %llu, TZ: %p, \
|
||||||
sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
|
sql mode: 0x%llx, sort len: %lu, conncat len: %lu, div_precision: %lu, \
|
||||||
def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
||||||
(int)flags.client_long_flag,
|
(int)flags.client_long_flag,
|
||||||
@@ -1956,8 +1956,8 @@ def_week_frmt: %lu, in_trans: %d, autocommit: %d",
|
|||||||
flags.character_set_client_num,
|
flags.character_set_client_num,
|
||||||
flags.character_set_results_num,
|
flags.character_set_results_num,
|
||||||
flags.collation_connection_num,
|
flags.collation_connection_num,
|
||||||
(ulong) flags.limit,
|
(ulonglong) flags.limit,
|
||||||
(ulong) flags.time_zone,
|
flags.time_zone,
|
||||||
flags.sql_mode,
|
flags.sql_mode,
|
||||||
flags.max_sort_length,
|
flags.max_sort_length,
|
||||||
flags.group_concat_max_len,
|
flags.group_concat_max_len,
|
||||||
@@ -1984,7 +1984,7 @@ lookup:
|
|||||||
DBUG_PRINT("qcache", ("No query in query hash or no results"));
|
DBUG_PRINT("qcache", ("No query in query hash or no results"));
|
||||||
goto err_unlock;
|
goto err_unlock;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("qcache", ("Query in query hash 0x%lx", (ulong)query_block));
|
DBUG_PRINT("qcache", ("Query in query hash %p",query_block));
|
||||||
|
|
||||||
#ifdef WITH_WSREP
|
#ifdef WITH_WSREP
|
||||||
if (once_more && WSREP_CLIENT(thd) && wsrep_must_sync_wait(thd))
|
if (once_more && WSREP_CLIENT(thd) && wsrep_must_sync_wait(thd))
|
||||||
@@ -2015,7 +2015,7 @@ lookup:
|
|||||||
BLOCK_UNLOCK_RD(query_block);
|
BLOCK_UNLOCK_RD(query_block);
|
||||||
goto err_unlock;
|
goto err_unlock;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("qcache", ("Query have result 0x%lx", (ulong) query));
|
DBUG_PRINT("qcache", ("Query have result %p", query));
|
||||||
|
|
||||||
if (thd->in_multi_stmt_transaction_mode() &&
|
if (thd->in_multi_stmt_transaction_mode() &&
|
||||||
(query->tables_type() & HA_CACHE_TBL_TRANSACT))
|
(query->tables_type() & HA_CACHE_TBL_TRANSACT))
|
||||||
@@ -2112,9 +2112,9 @@ lookup:
|
|||||||
if (engine_data != table->engine_data())
|
if (engine_data != table->engine_data())
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache",
|
DBUG_PRINT("qcache",
|
||||||
("Handler require invalidation queries of %.*s %lu-%lu",
|
("Handler require invalidation queries of %.*s %llu-%llu",
|
||||||
qcache_se_key_len, qcache_se_key_name,
|
qcache_se_key_len, qcache_se_key_name,
|
||||||
(ulong) engine_data, (ulong) table->engine_data()));
|
engine_data, table->engine_data()));
|
||||||
invalidate_table_internal(thd,
|
invalidate_table_internal(thd,
|
||||||
(uchar *) table->db(),
|
(uchar *) table->db(),
|
||||||
table->key_length());
|
table->key_length());
|
||||||
@@ -2152,9 +2152,9 @@ lookup:
|
|||||||
THD_STAGE_INFO(thd, stage_sending_cached_result_to_client);
|
THD_STAGE_INFO(thd, stage_sending_cached_result_to_client);
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("Results (len: %lu used: %lu headers: %lu)",
|
DBUG_PRINT("qcache", ("Results (len: %lu used: %lu headers: %u)",
|
||||||
result_block->length, result_block->used,
|
result_block->length, result_block->used,
|
||||||
(ulong) (result_block->headers_len()+
|
(uint) (result_block->headers_len()+
|
||||||
ALIGN_SIZE(sizeof(Query_cache_result)))));
|
ALIGN_SIZE(sizeof(Query_cache_result)))));
|
||||||
|
|
||||||
Query_cache_result *result = result_block->result();
|
Query_cache_result *result = result_block->result();
|
||||||
@@ -2192,7 +2192,7 @@ lookup:
|
|||||||
thd->get_stmt_da()->disable_status();
|
thd->get_stmt_da()->disable_status();
|
||||||
|
|
||||||
BLOCK_UNLOCK_RD(query_block);
|
BLOCK_UNLOCK_RD(query_block);
|
||||||
MYSQL_QUERY_CACHE_HIT(thd->query(), (ulong) thd->limit_found_rows);
|
MYSQL_QUERY_CACHE_HIT(thd->query(), thd->limit_found_rows);
|
||||||
DBUG_RETURN(1); // Result sent to client
|
DBUG_RETURN(1); // Result sent to client
|
||||||
|
|
||||||
err_unlock:
|
err_unlock:
|
||||||
@@ -2899,8 +2899,8 @@ my_bool Query_cache::free_old_query()
|
|||||||
void Query_cache::free_query_internal(Query_cache_block *query_block)
|
void Query_cache::free_query_internal(Query_cache_block *query_block)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache::free_query_internal");
|
DBUG_ENTER("Query_cache::free_query_internal");
|
||||||
DBUG_PRINT("qcache", ("free query 0x%lx %lu bytes result",
|
DBUG_PRINT("qcache", ("free query %p %lu bytes result",
|
||||||
(ulong) query_block,
|
query_block,
|
||||||
query_block->query()->length() ));
|
query_block->query()->length() ));
|
||||||
|
|
||||||
queries_in_cache--;
|
queries_in_cache--;
|
||||||
@@ -2969,8 +2969,8 @@ void Query_cache::free_query_internal(Query_cache_block *query_block)
|
|||||||
void Query_cache::free_query(Query_cache_block *query_block)
|
void Query_cache::free_query(Query_cache_block *query_block)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache::free_query");
|
DBUG_ENTER("Query_cache::free_query");
|
||||||
DBUG_PRINT("qcache", ("free query 0x%lx %lu bytes result",
|
DBUG_PRINT("qcache", ("free query %p %lu bytes result",
|
||||||
(ulong) query_block,
|
query_block,
|
||||||
query_block->query()->length() ));
|
query_block->query()->length() ));
|
||||||
|
|
||||||
my_hash_delete(&queries,(uchar *) query_block);
|
my_hash_delete(&queries,(uchar *) query_block);
|
||||||
@@ -3017,8 +3017,8 @@ Query_cache::append_result_data(Query_cache_block **current_block,
|
|||||||
Query_cache_block *query_block)
|
Query_cache_block *query_block)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache::append_result_data");
|
DBUG_ENTER("Query_cache::append_result_data");
|
||||||
DBUG_PRINT("qcache", ("append %lu bytes to 0x%lx query",
|
DBUG_PRINT("qcache", ("append %lu bytes to %p query",
|
||||||
data_len, (long) query_block));
|
data_len, query_block));
|
||||||
|
|
||||||
if (query_block->query()->add(data_len) > query_cache_limit)
|
if (query_block->query()->add(data_len) > query_cache_limit)
|
||||||
{
|
{
|
||||||
@@ -3035,8 +3035,8 @@ Query_cache::append_result_data(Query_cache_block **current_block,
|
|||||||
}
|
}
|
||||||
Query_cache_block *last_block = (*current_block)->prev;
|
Query_cache_block *last_block = (*current_block)->prev;
|
||||||
|
|
||||||
DBUG_PRINT("qcache", ("lastblock 0x%lx len %lu used %lu",
|
DBUG_PRINT("qcache", ("lastblock %p len %lu used %lu",
|
||||||
(ulong) last_block, last_block->length,
|
last_block, last_block->length,
|
||||||
last_block->used));
|
last_block->used));
|
||||||
my_bool success = 1;
|
my_bool success = 1;
|
||||||
ulong last_block_free_space= last_block->length - last_block->used;
|
ulong last_block_free_space= last_block->length - last_block->used;
|
||||||
@@ -3081,8 +3081,8 @@ Query_cache::append_result_data(Query_cache_block **current_block,
|
|||||||
if (success && last_block_free_space > 0)
|
if (success && last_block_free_space > 0)
|
||||||
{
|
{
|
||||||
ulong to_copy = MY_MIN(data_len,last_block_free_space);
|
ulong to_copy = MY_MIN(data_len,last_block_free_space);
|
||||||
DBUG_PRINT("qcache", ("use free space %lub at block 0x%lx to copy %lub",
|
DBUG_PRINT("qcache", ("use free space %lub at block %p to copy %lub",
|
||||||
last_block_free_space, (ulong)last_block, to_copy));
|
last_block_free_space,last_block, to_copy));
|
||||||
memcpy((uchar*) last_block + last_block->used, data, to_copy);
|
memcpy((uchar*) last_block + last_block->used, data, to_copy);
|
||||||
last_block->used+=to_copy;
|
last_block->used+=to_copy;
|
||||||
}
|
}
|
||||||
@@ -3123,8 +3123,8 @@ my_bool Query_cache::write_result_data(Query_cache_block **result_block,
|
|||||||
{
|
{
|
||||||
block->type = type;
|
block->type = type;
|
||||||
ulong length = block->used - headers_len;
|
ulong length = block->used - headers_len;
|
||||||
DBUG_PRINT("qcache", ("write %lu byte in block 0x%lx",length,
|
DBUG_PRINT("qcache", ("write %lu byte in block %p",length,
|
||||||
(ulong)block));
|
block));
|
||||||
memcpy((uchar*) block+headers_len, rest, length);
|
memcpy((uchar*) block+headers_len, rest, length);
|
||||||
rest += length;
|
rest += length;
|
||||||
block = block->next;
|
block = block->next;
|
||||||
@@ -3387,12 +3387,12 @@ Query_cache::register_tables_from_list(THD *thd, TABLE_LIST *tables_used,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache",
|
DBUG_PRINT("qcache",
|
||||||
("table: %s db: %s openinfo: 0x%lx keylen: %lu key: 0x%lx",
|
("table: %s db: %s openinfo: %p keylen: %zu key: %p",
|
||||||
tables_used->table->s->table_name.str,
|
tables_used->table->s->table_name.str,
|
||||||
tables_used->table->s->table_cache_key.str,
|
tables_used->table->s->table_cache_key.str,
|
||||||
(ulong) tables_used->table,
|
tables_used->table,
|
||||||
(ulong) tables_used->table->s->table_cache_key.length,
|
tables_used->table->s->table_cache_key.length,
|
||||||
(ulong) tables_used->table->s->table_cache_key.str));
|
tables_used->table->s->table_cache_key.str));
|
||||||
|
|
||||||
if (!insert_table(thd, tables_used->table->s->table_cache_key.length,
|
if (!insert_table(thd, tables_used->table->s->table_cache_key.length,
|
||||||
tables_used->table->s->table_cache_key.str,
|
tables_used->table->s->table_cache_key.str,
|
||||||
@@ -3429,8 +3429,8 @@ my_bool Query_cache::register_all_tables(THD *thd,
|
|||||||
TABLE_COUNTER_TYPE tables_arg)
|
TABLE_COUNTER_TYPE tables_arg)
|
||||||
{
|
{
|
||||||
TABLE_COUNTER_TYPE n;
|
TABLE_COUNTER_TYPE n;
|
||||||
DBUG_PRINT("qcache", ("register tables block 0x%lx, n %d, header %x",
|
DBUG_PRINT("qcache", ("register tables block %p, n %d, header %x",
|
||||||
(ulong) block, (int) tables_arg,
|
block, (int) tables_arg,
|
||||||
(int) ALIGN_SIZE(sizeof(Query_cache_block))));
|
(int) ALIGN_SIZE(sizeof(Query_cache_block))));
|
||||||
|
|
||||||
Query_cache_block_table *block_table = block->table(0);
|
Query_cache_block_table *block_table = block->table(0);
|
||||||
@@ -3469,8 +3469,8 @@ Query_cache::insert_table(THD *thd, uint key_len, const char *key,
|
|||||||
my_bool hash)
|
my_bool hash)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache::insert_table");
|
DBUG_ENTER("Query_cache::insert_table");
|
||||||
DBUG_PRINT("qcache", ("insert table node 0x%lx, len %d",
|
DBUG_PRINT("qcache", ("insert table node %p, len %d",
|
||||||
(ulong)node, key_len));
|
node, key_len));
|
||||||
|
|
||||||
Query_cache_block *table_block=
|
Query_cache_block *table_block=
|
||||||
(hash ?
|
(hash ?
|
||||||
@@ -3481,11 +3481,11 @@ Query_cache::insert_table(THD *thd, uint key_len, const char *key,
|
|||||||
table_block->table()->engine_data() != engine_data)
|
table_block->table()->engine_data() != engine_data)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache",
|
DBUG_PRINT("qcache",
|
||||||
("Handler require invalidation queries of %s.%s %lu-%lu",
|
("Handler require invalidation queries of %s.%s %llu-%llu",
|
||||||
table_block->table()->db(),
|
table_block->table()->db(),
|
||||||
table_block->table()->table(),
|
table_block->table()->table(),
|
||||||
(ulong) engine_data,
|
engine_data,
|
||||||
(ulong) table_block->table()->engine_data()));
|
table_block->table()->engine_data()));
|
||||||
/*
|
/*
|
||||||
as far as we delete all queries with this table, table block will be
|
as far as we delete all queries with this table, table block will be
|
||||||
deleted, too
|
deleted, too
|
||||||
@@ -3500,8 +3500,8 @@ Query_cache::insert_table(THD *thd, uint key_len, const char *key,
|
|||||||
|
|
||||||
if (table_block == 0)
|
if (table_block == 0)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("new table block from 0x%lx (%u)",
|
DBUG_PRINT("qcache", ("new table block from %p (%u)",
|
||||||
(ulong) key, (int) key_len));
|
key, (int) key_len));
|
||||||
table_block= write_block_data(key_len, (uchar*) key,
|
table_block= write_block_data(key_len, (uchar*) key,
|
||||||
ALIGN_SIZE(sizeof(Query_cache_table)),
|
ALIGN_SIZE(sizeof(Query_cache_table)),
|
||||||
Query_cache_block::TABLE, 1);
|
Query_cache_block::TABLE, 1);
|
||||||
@@ -3710,7 +3710,7 @@ Query_cache::get_free_block(ulong len, my_bool not_less, ulong min)
|
|||||||
if (block != 0)
|
if (block != 0)
|
||||||
exclude_from_free_memory_list(block);
|
exclude_from_free_memory_list(block);
|
||||||
|
|
||||||
DBUG_PRINT("qcache",("getting block 0x%lx", (ulong) block));
|
DBUG_PRINT("qcache",("getting block %p", block));
|
||||||
DBUG_RETURN(block);
|
DBUG_RETURN(block);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3721,9 +3721,9 @@ void Query_cache::free_memory_block(Query_cache_block *block)
|
|||||||
block->used=0;
|
block->used=0;
|
||||||
block->type= Query_cache_block::FREE; // mark block as free in any case
|
block->type= Query_cache_block::FREE; // mark block as free in any case
|
||||||
DBUG_PRINT("qcache",
|
DBUG_PRINT("qcache",
|
||||||
("first_block 0x%lx, block 0x%lx, pnext 0x%lx pprev 0x%lx",
|
("first_block %p, block %p, pnext %p pprev %p",
|
||||||
(ulong) first_block, (ulong) block, (ulong) block->pnext,
|
first_block, block, block->pnext,
|
||||||
(ulong) block->pprev));
|
block->pprev));
|
||||||
|
|
||||||
if (block->pnext != first_block && block->pnext->is_free())
|
if (block->pnext != first_block && block->pnext->is_free())
|
||||||
block = join_free_blocks(block, block->pnext);
|
block = join_free_blocks(block, block->pnext);
|
||||||
@@ -3755,8 +3755,8 @@ void Query_cache::split_block(Query_cache_block *block, ulong len)
|
|||||||
else
|
else
|
||||||
free_memory_block(new_block);
|
free_memory_block(new_block);
|
||||||
|
|
||||||
DBUG_PRINT("qcache", ("split 0x%lx (%lu) new 0x%lx",
|
DBUG_PRINT("qcache", ("split %p (%lu) new %p",
|
||||||
(ulong) block, len, (ulong) new_block));
|
block, len, new_block));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3768,9 +3768,9 @@ Query_cache::join_free_blocks(Query_cache_block *first_block_arg,
|
|||||||
Query_cache_block *second_block;
|
Query_cache_block *second_block;
|
||||||
DBUG_ENTER("Query_cache::join_free_blocks");
|
DBUG_ENTER("Query_cache::join_free_blocks");
|
||||||
DBUG_PRINT("qcache",
|
DBUG_PRINT("qcache",
|
||||||
("join first 0x%lx, pnext 0x%lx, in list 0x%lx",
|
("join first %p, pnext %p, in list %p",
|
||||||
(ulong) first_block_arg, (ulong) first_block_arg->pnext,
|
first_block_arg, first_block_arg->pnext,
|
||||||
(ulong) block_in_list));
|
block_in_list));
|
||||||
|
|
||||||
exclude_from_free_memory_list(block_in_list);
|
exclude_from_free_memory_list(block_in_list);
|
||||||
second_block = first_block_arg->pnext;
|
second_block = first_block_arg->pnext;
|
||||||
@@ -3792,7 +3792,7 @@ my_bool Query_cache::append_next_free_block(Query_cache_block *block,
|
|||||||
{
|
{
|
||||||
Query_cache_block *next_block = block->pnext;
|
Query_cache_block *next_block = block->pnext;
|
||||||
DBUG_ENTER("Query_cache::append_next_free_block");
|
DBUG_ENTER("Query_cache::append_next_free_block");
|
||||||
DBUG_PRINT("enter", ("block 0x%lx, add_size %lu", (ulong) block,
|
DBUG_PRINT("enter", ("block %p, add_size %lu", block,
|
||||||
add_size));
|
add_size));
|
||||||
|
|
||||||
if (next_block != first_block && next_block->is_free())
|
if (next_block != first_block && next_block->is_free())
|
||||||
@@ -3824,8 +3824,8 @@ void Query_cache::exclude_from_free_memory_list(Query_cache_block *free_block)
|
|||||||
bin->number--;
|
bin->number--;
|
||||||
free_memory-=free_block->length;
|
free_memory-=free_block->length;
|
||||||
free_memory_blocks--;
|
free_memory_blocks--;
|
||||||
DBUG_PRINT("qcache",("exclude block 0x%lx, bin 0x%lx", (ulong) free_block,
|
DBUG_PRINT("qcache",("exclude block %p, bin %p", free_block,
|
||||||
(ulong) bin));
|
bin));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3842,8 +3842,8 @@ void Query_cache::insert_into_free_memory_list(Query_cache_block *free_block)
|
|||||||
free_block->data());
|
free_block->data());
|
||||||
*bin_ptr = bins+idx;
|
*bin_ptr = bins+idx;
|
||||||
(*bin_ptr)->number++;
|
(*bin_ptr)->number++;
|
||||||
DBUG_PRINT("qcache",("insert block 0x%lx, bin[%d] 0x%lx",
|
DBUG_PRINT("qcache",("insert block %p, bin[%d] %p",
|
||||||
(ulong) free_block, idx, (ulong) *bin_ptr));
|
free_block, idx, *bin_ptr));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3940,7 +3940,7 @@ Query_cache::double_linked_list_simple_include(Query_cache_block *point,
|
|||||||
list_pointer)
|
list_pointer)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache::double_linked_list_simple_include");
|
DBUG_ENTER("Query_cache::double_linked_list_simple_include");
|
||||||
DBUG_PRINT("qcache", ("including block 0x%lx", (ulong) point));
|
DBUG_PRINT("qcache", ("including block %p", point));
|
||||||
if (*list_pointer == 0)
|
if (*list_pointer == 0)
|
||||||
*list_pointer=point->next=point->prev=point;
|
*list_pointer=point->next=point->prev=point;
|
||||||
else
|
else
|
||||||
@@ -3959,8 +3959,8 @@ Query_cache::double_linked_list_exclude(Query_cache_block *point,
|
|||||||
Query_cache_block **list_pointer)
|
Query_cache_block **list_pointer)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Query_cache::double_linked_list_exclude");
|
DBUG_ENTER("Query_cache::double_linked_list_exclude");
|
||||||
DBUG_PRINT("qcache", ("excluding block 0x%lx, list 0x%lx",
|
DBUG_PRINT("qcache", ("excluding block %p, list %p",
|
||||||
(ulong) point, (ulong) list_pointer));
|
point, list_pointer));
|
||||||
if (point->next == point)
|
if (point->next == point)
|
||||||
*list_pointer = 0; // empty list
|
*list_pointer = 0; // empty list
|
||||||
else
|
else
|
||||||
@@ -4255,7 +4255,7 @@ my_bool Query_cache::move_by_type(uchar **border,
|
|||||||
switch (block->type) {
|
switch (block->type) {
|
||||||
case Query_cache_block::FREE:
|
case Query_cache_block::FREE:
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx FREE", (ulong) block));
|
DBUG_PRINT("qcache", ("block %p FREE", block));
|
||||||
if (*border == 0)
|
if (*border == 0)
|
||||||
{
|
{
|
||||||
*border = (uchar *) block;
|
*border = (uchar *) block;
|
||||||
@@ -4274,7 +4274,7 @@ my_bool Query_cache::move_by_type(uchar **border,
|
|||||||
case Query_cache_block::TABLE:
|
case Query_cache_block::TABLE:
|
||||||
{
|
{
|
||||||
HASH_SEARCH_STATE record_idx;
|
HASH_SEARCH_STATE record_idx;
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx TABLE", (ulong) block));
|
DBUG_PRINT("qcache", ("block %p TABLE", block));
|
||||||
if (*border == 0)
|
if (*border == 0)
|
||||||
break;
|
break;
|
||||||
ulong len = block->length, used = block->used;
|
ulong len = block->length, used = block->used;
|
||||||
@@ -4310,9 +4310,9 @@ my_bool Query_cache::move_by_type(uchar **border,
|
|||||||
nlist_root->prev = tprev;
|
nlist_root->prev = tprev;
|
||||||
tprev->next = nlist_root;
|
tprev->next = nlist_root;
|
||||||
DBUG_PRINT("qcache",
|
DBUG_PRINT("qcache",
|
||||||
("list_root: 0x%lx tnext 0x%lx tprev 0x%lx tprev->next 0x%lx tnext->prev 0x%lx",
|
("list_root: %p tnext %p tprev %p tprev->next %p tnext->prev %p",
|
||||||
(ulong) list_root, (ulong) tnext, (ulong) tprev,
|
list_root, tnext, tprev,
|
||||||
(ulong)tprev->next, (ulong)tnext->prev));
|
tprev->next,tnext->prev));
|
||||||
/*
|
/*
|
||||||
Go through all queries that uses this table and change them to
|
Go through all queries that uses this table and change them to
|
||||||
point to the new table object
|
point to the new table object
|
||||||
@@ -4327,14 +4327,14 @@ my_bool Query_cache::move_by_type(uchar **border,
|
|||||||
/* Fix hash to point at moved block */
|
/* Fix hash to point at moved block */
|
||||||
my_hash_replace(&tables, &record_idx, (uchar*) new_block);
|
my_hash_replace(&tables, &record_idx, (uchar*) new_block);
|
||||||
|
|
||||||
DBUG_PRINT("qcache", ("moved %lu bytes to 0x%lx, new gap at 0x%lx",
|
DBUG_PRINT("qcache", ("moved %lu bytes to %p, new gap at %p",
|
||||||
len, (ulong) new_block, (ulong) *border));
|
len, new_block, *border));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Query_cache_block::QUERY:
|
case Query_cache_block::QUERY:
|
||||||
{
|
{
|
||||||
HASH_SEARCH_STATE record_idx;
|
HASH_SEARCH_STATE record_idx;
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx QUERY", (ulong) block));
|
DBUG_PRINT("qcache", ("block %p QUERY", block));
|
||||||
if (*border == 0)
|
if (*border == 0)
|
||||||
break;
|
break;
|
||||||
BLOCK_LOCK_WR(block);
|
BLOCK_LOCK_WR(block);
|
||||||
@@ -4420,8 +4420,8 @@ my_bool Query_cache::move_by_type(uchar **border,
|
|||||||
}
|
}
|
||||||
/* Fix hash to point at moved block */
|
/* Fix hash to point at moved block */
|
||||||
my_hash_replace(&queries, &record_idx, (uchar*) new_block);
|
my_hash_replace(&queries, &record_idx, (uchar*) new_block);
|
||||||
DBUG_PRINT("qcache", ("moved %lu bytes to 0x%lx, new gap at 0x%lx",
|
DBUG_PRINT("qcache", ("moved %lu bytes to %p, new gap at %p",
|
||||||
len, (ulong) new_block, (ulong) *border));
|
len, new_block, *border));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case Query_cache_block::RES_INCOMPLETE:
|
case Query_cache_block::RES_INCOMPLETE:
|
||||||
@@ -4429,7 +4429,7 @@ my_bool Query_cache::move_by_type(uchar **border,
|
|||||||
case Query_cache_block::RES_CONT:
|
case Query_cache_block::RES_CONT:
|
||||||
case Query_cache_block::RESULT:
|
case Query_cache_block::RESULT:
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx RES* (%d)", (ulong) block,
|
DBUG_PRINT("qcache", ("block %p RES* (%d)", block,
|
||||||
(int) block->type));
|
(int) block->type));
|
||||||
if (*border == 0)
|
if (*border == 0)
|
||||||
break;
|
break;
|
||||||
@@ -4469,13 +4469,13 @@ my_bool Query_cache::move_by_type(uchar **border,
|
|||||||
new_block->length -= free_space;
|
new_block->length -= free_space;
|
||||||
}
|
}
|
||||||
BLOCK_UNLOCK_WR(query_block);
|
BLOCK_UNLOCK_WR(query_block);
|
||||||
DBUG_PRINT("qcache", ("moved %lu bytes to 0x%lx, new gap at 0x%lx",
|
DBUG_PRINT("qcache", ("moved %lu bytes to %p, new gap at %p",
|
||||||
len, (ulong) new_block, (ulong) *border));
|
len, new_block, *border));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
DBUG_PRINT("error", ("unexpected block type %d, block 0x%lx",
|
DBUG_PRINT("error", ("unexpected block type %d, block %p",
|
||||||
(int)block->type, (ulong) block));
|
(int)block->type, block));
|
||||||
ok = 0;
|
ok = 0;
|
||||||
}
|
}
|
||||||
DBUG_RETURN(ok);
|
DBUG_RETURN(ok);
|
||||||
@@ -4676,16 +4676,16 @@ void Query_cache::bins_dump()
|
|||||||
DBUG_PRINT("qcache", ("-------------------------"));
|
DBUG_PRINT("qcache", ("-------------------------"));
|
||||||
for (i=0; i < mem_bin_num; i++)
|
for (i=0; i < mem_bin_num; i++)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("%10lu %3d 0x%lx", bins[i].size, bins[i].number,
|
DBUG_PRINT("qcache", ("%10lu %3d %p", bins[i].size, bins[i].number,
|
||||||
(ulong)&(bins[i])));
|
&(bins[i])));
|
||||||
if (bins[i].free_blocks)
|
if (bins[i].free_blocks)
|
||||||
{
|
{
|
||||||
Query_cache_block *block = bins[i].free_blocks;
|
Query_cache_block *block = bins[i].free_blocks;
|
||||||
do{
|
do{
|
||||||
DBUG_PRINT("qcache", ("\\-- %lu 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx",
|
DBUG_PRINT("qcache", ("\\-- %lu %p %p %p %p %p",
|
||||||
block->length, (ulong)block,
|
block->length,block,
|
||||||
(ulong)block->next, (ulong)block->prev,
|
block->next,block->prev,
|
||||||
(ulong)block->pnext, (ulong)block->pprev));
|
block->pnext,block->pprev));
|
||||||
block = block->next;
|
block = block->next;
|
||||||
} while ( block != bins[i].free_blocks );
|
} while ( block != bins[i].free_blocks );
|
||||||
}
|
}
|
||||||
@@ -4709,11 +4709,11 @@ void Query_cache::cache_dump()
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache",
|
DBUG_PRINT("qcache",
|
||||||
("%10lu %10lu %1d %2d 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx",
|
("%10lu %10lu %1d %2d %p %p %p %p %p",
|
||||||
i->length, i->used, (int)i->type,
|
i->length, i->used, (int)i->type,
|
||||||
i->n_tables, (ulong)i,
|
i->n_tables,i,
|
||||||
(ulong)i->next, (ulong)i->prev, (ulong)i->pnext,
|
i->next,i->prev,i->pnext,
|
||||||
(ulong)i->pprev));
|
i->pprev));
|
||||||
i = i->pnext;
|
i = i->pnext;
|
||||||
} while ( i != first_block );
|
} while ( i != first_block );
|
||||||
DBUG_PRINT("qcache", ("-------------------------------------"));
|
DBUG_PRINT("qcache", ("-------------------------------------"));
|
||||||
@@ -4743,15 +4743,15 @@ void Query_cache::queries_dump()
|
|||||||
Query_cache_query_flags flags;
|
Query_cache_query_flags flags;
|
||||||
memcpy(&flags, str+len, QUERY_CACHE_FLAGS_SIZE);
|
memcpy(&flags, str+len, QUERY_CACHE_FLAGS_SIZE);
|
||||||
str[len]= 0; // make zero ending DB name
|
str[len]= 0; // make zero ending DB name
|
||||||
DBUG_PRINT("qcache", ("F: %u C: %u L: %lu T: '%s' (%lu) '%s' '%s'",
|
DBUG_PRINT("qcache", ("F: %u C: %u L: %llu T: '%s' (%zu) '%s' '%s'",
|
||||||
flags.client_long_flag,
|
flags.client_long_flag,
|
||||||
flags.character_set_client_num,
|
flags.character_set_client_num,
|
||||||
(ulong)flags.limit,
|
flags.limit,
|
||||||
flags.time_zone->get_name()->ptr(),
|
flags.time_zone->get_name()->ptr(),
|
||||||
(ulong) len, str, strend(str)+1));
|
len, str, strend(str)+1));
|
||||||
DBUG_PRINT("qcache", ("-b- 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx", (ulong) block,
|
DBUG_PRINT("qcache", ("-b- %p %p %p %p %p", block,
|
||||||
(ulong) block->next, (ulong) block->prev,
|
block->next, block->prev,
|
||||||
(ulong)block->pnext, (ulong)block->pprev));
|
block->pnext,block->pprev));
|
||||||
memcpy(str + len, &flags, QUERY_CACHE_FLAGS_SIZE); // restore flags
|
memcpy(str + len, &flags, QUERY_CACHE_FLAGS_SIZE); // restore flags
|
||||||
for (TABLE_COUNTER_TYPE t= 0; t < block->n_tables; t++)
|
for (TABLE_COUNTER_TYPE t= 0; t < block->n_tables; t++)
|
||||||
{
|
{
|
||||||
@@ -4765,14 +4765,14 @@ void Query_cache::queries_dump()
|
|||||||
Query_cache_block *result_beg = result_block;
|
Query_cache_block *result_beg = result_block;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("-r- %u %lu/%lu 0x%lx 0x%lx 0x%lx 0x%lx 0x%lx",
|
DBUG_PRINT("qcache", ("-r- %u %lu/%lu %p %p %p %p %p",
|
||||||
(uint) result_block->type,
|
(uint) result_block->type,
|
||||||
result_block->length, result_block->used,
|
result_block->length, result_block->used,
|
||||||
(ulong) result_block,
|
result_block,
|
||||||
(ulong) result_block->next,
|
result_block->next,
|
||||||
(ulong) result_block->prev,
|
result_block->prev,
|
||||||
(ulong) result_block->pnext,
|
result_block->pnext,
|
||||||
(ulong) result_block->pprev));
|
result_block->pprev));
|
||||||
result_block = result_block->next;
|
result_block = result_block->next;
|
||||||
} while ( result_block != result_beg );
|
} while ( result_block != result_beg );
|
||||||
}
|
}
|
||||||
@@ -4851,14 +4851,14 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
if (!block)
|
if (!block)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx, type %u...",
|
DBUG_PRINT("qcache", ("block %p, type %u...",
|
||||||
(ulong) block, (uint) block->type));
|
block, (uint) block->type));
|
||||||
// Check allignment
|
// Check allignment
|
||||||
if ((((long)block) % (long) ALIGN_SIZE(1)) !=
|
if ((((size_t)block) % ALIGN_SIZE(1)) !=
|
||||||
(((long)first_block) % (long)ALIGN_SIZE(1)))
|
(((size_t)first_block) % ALIGN_SIZE(1)))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx do not aligned by %d", (ulong) block,
|
("block %p do not aligned by %d", block,
|
||||||
(int) ALIGN_SIZE(1)));
|
(int) ALIGN_SIZE(1)));
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
@@ -4869,10 +4869,10 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
((uchar*)first_block) + query_cache_size)
|
((uchar*)first_block) + query_cache_size)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx, type %u, ended at 0x%lx, but cache ended at 0x%lx",
|
("block %p, type %u, ended at %p, but cache ended at %p",
|
||||||
(ulong) block, (uint) block->type,
|
block, (uint) block->type,
|
||||||
(ulong) (((uchar*)block) + block->length),
|
(((uchar*)block) + block->length),
|
||||||
(ulong) (((uchar*)first_block) + query_cache_size)));
|
(((uchar*)first_block) + query_cache_size)));
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4880,10 +4880,10 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
if (((uchar*)block) + block->length != ((uchar*)block->pnext))
|
if (((uchar*)block) + block->length != ((uchar*)block->pnext))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx, type %u, ended at 0x%lx, but next block beginning at 0x%lx",
|
("block %p, type %u, ended at %p, but next block beginning at %p",
|
||||||
(ulong) block, (uint) block->type,
|
block, (uint) block->type,
|
||||||
(ulong) (((uchar*)block) + block->length),
|
(((uchar*)block) + block->length),
|
||||||
(ulong) ((uchar*)block->pnext)));
|
((uchar*)block->pnext)));
|
||||||
}
|
}
|
||||||
if (block->type == Query_cache_block::FREE)
|
if (block->type == Query_cache_block::FREE)
|
||||||
free+= block->length;
|
free+= block->length;
|
||||||
@@ -4899,11 +4899,11 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
((uchar*)bin) >= ((uchar*)first_block))
|
((uchar*)bin) >= ((uchar*)first_block))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("free block 0x%lx have bin pointer 0x%lx beyaond of bins array bounds [0x%lx,0x%lx]",
|
("free block %p have bin pointer %p beyaond of bins array bounds [%p,%p]",
|
||||||
(ulong) block,
|
block,
|
||||||
(ulong) bin,
|
bin,
|
||||||
(ulong) bins,
|
bins,
|
||||||
(ulong) first_block));
|
first_block));
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -4950,11 +4950,11 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
((uchar*)query_block) >= (((uchar*)first_block) + query_cache_size))
|
((uchar*)query_block) >= (((uchar*)first_block) + query_cache_size))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("result block 0x%lx have query block pointer 0x%lx beyaond of block pool bounds [0x%lx,0x%lx]",
|
("result block %p have query block pointer %p beyaond of block pool bounds [%p,%p]",
|
||||||
(ulong) block,
|
block,
|
||||||
(ulong) query_block,
|
query_block,
|
||||||
(ulong) first_block,
|
first_block,
|
||||||
(ulong) (((uchar*)first_block) + query_cache_size)));
|
(((uchar*)first_block) + query_cache_size)));
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -4970,8 +4970,8 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
DBUG_PRINT("error", ("block 0x%lx have incorrect type %u",
|
DBUG_PRINT("error", ("block %p have incorrect type %u",
|
||||||
(long) block, block->type));
|
block, block->type));
|
||||||
result = 1;
|
result = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4999,15 +4999,15 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx, type %u...",
|
DBUG_PRINT("qcache", ("block %p, type %u...",
|
||||||
(ulong) block, (uint) block->type));
|
block, (uint) block->type));
|
||||||
size_t length;
|
size_t length;
|
||||||
uchar *key = query_cache_query_get_key((uchar*) block, &length, 0);
|
uchar *key = query_cache_query_get_key((uchar*) block, &length, 0);
|
||||||
uchar* val = my_hash_search(&queries, key, length);
|
uchar* val = my_hash_search(&queries, key, length);
|
||||||
if (((uchar*)block) != val)
|
if (((uchar*)block) != val)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error", ("block 0x%lx found in queries hash like 0x%lx",
|
DBUG_PRINT("error", ("block %p found in queries hash like %p",
|
||||||
(ulong) block, (ulong) val));
|
block, val));
|
||||||
}
|
}
|
||||||
if (in_blocks(block))
|
if (in_blocks(block))
|
||||||
result = 1;
|
result = 1;
|
||||||
@@ -5017,8 +5017,8 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
Query_cache_block * result_block = results;
|
Query_cache_block * result_block = results;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx, type %u...",
|
DBUG_PRINT("qcache", ("block %p, type %u...",
|
||||||
(ulong) block, (uint) block->type));
|
block, (uint) block->type));
|
||||||
if (in_blocks(result_block))
|
if (in_blocks(result_block))
|
||||||
result = 1;
|
result = 1;
|
||||||
|
|
||||||
@@ -5034,15 +5034,15 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx, type %u...",
|
DBUG_PRINT("qcache", ("block %p, type %u...",
|
||||||
(ulong) block, (uint) block->type));
|
block, (uint) block->type));
|
||||||
size_t length;
|
size_t length;
|
||||||
uchar *key = query_cache_table_get_key((uchar*) block, &length, 0);
|
uchar *key = query_cache_table_get_key((uchar*) block, &length, 0);
|
||||||
uchar* val = my_hash_search(&tables, key, length);
|
uchar* val = my_hash_search(&tables, key, length);
|
||||||
if (((uchar*)block) != val)
|
if (((uchar*)block) != val)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error", ("block 0x%lx found in tables hash like 0x%lx",
|
DBUG_PRINT("error", ("block %p found in tables hash like %p",
|
||||||
(ulong) block, (ulong) val));
|
block, val));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (in_blocks(block))
|
if (in_blocks(block))
|
||||||
@@ -5059,8 +5059,8 @@ my_bool Query_cache::check_integrity(bool locked)
|
|||||||
uint count = 0;
|
uint count = 0;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("block 0x%lx, type %u...",
|
DBUG_PRINT("qcache", ("block %p, type %u...",
|
||||||
(ulong) block, (uint) block->type));
|
block, (uint) block->type));
|
||||||
if (in_blocks(block))
|
if (in_blocks(block))
|
||||||
result = 1;
|
result = 1;
|
||||||
|
|
||||||
@@ -5092,13 +5092,13 @@ my_bool Query_cache::in_blocks(Query_cache_block * point)
|
|||||||
if (block->pprev->pnext != block)
|
if (block->pprev->pnext != block)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx in physical list is incorrect linked, prev block 0x%lx refered as next to 0x%lx (check from 0x%lx)",
|
("block %p in physical list is incorrect linked, prev block %p refered as next to %p (check from %p)",
|
||||||
(ulong) block, (ulong) block->pprev,
|
block, block->pprev,
|
||||||
(ulong) block->pprev->pnext,
|
block->pprev->pnext,
|
||||||
(ulong) point));
|
point));
|
||||||
//back trace
|
//back trace
|
||||||
for (; block != point; block = block->pnext)
|
for (; block != point; block = block->pnext)
|
||||||
DBUG_PRINT("error", ("back trace 0x%lx", (ulong) block));
|
DBUG_PRINT("error", ("back trace %p", block));
|
||||||
result = 1;
|
result = 1;
|
||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
@@ -5107,8 +5107,8 @@ my_bool Query_cache::in_blocks(Query_cache_block * point)
|
|||||||
if (block != first_block)
|
if (block != first_block)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx (0x%lx<-->0x%lx) not owned by pysical list",
|
("block %p (%p<-->%p) not owned by pysical list",
|
||||||
(ulong) block, (ulong) block->pprev, (ulong )block->pnext));
|
block, block->pprev, block->pnext));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5120,13 +5120,13 @@ err1:
|
|||||||
if (block->pnext->pprev != block)
|
if (block->pnext->pprev != block)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx in physicel list is incorrect linked, next block 0x%lx refered as prev to 0x%lx (check from 0x%lx)",
|
("block %p in physicel list is incorrect linked, next block %p refered as prev to %p (check from %p)",
|
||||||
(ulong) block, (ulong) block->pnext,
|
block, block->pnext,
|
||||||
(ulong) block->pnext->pprev,
|
block->pnext->pprev,
|
||||||
(ulong) point));
|
point));
|
||||||
//back trace
|
//back trace
|
||||||
for (; block != point; block = block->pprev)
|
for (; block != point; block = block->pprev)
|
||||||
DBUG_PRINT("error", ("back trace 0x%lx", (ulong) block));
|
DBUG_PRINT("error", ("back trace %p", block));
|
||||||
result = 1;
|
result = 1;
|
||||||
goto err2;
|
goto err2;
|
||||||
}
|
}
|
||||||
@@ -5149,13 +5149,13 @@ my_bool Query_cache::in_list(Query_cache_block * root,
|
|||||||
if (block->prev->next != block)
|
if (block->prev->next != block)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx in list '%s' 0x%lx is incorrect linked, prev block 0x%lx refered as next to 0x%lx (check from 0x%lx)",
|
("block %p in list '%s' %p is incorrect linked, prev block %p refered as next to %p (check from %p)",
|
||||||
(ulong) block, name, (ulong) root, (ulong) block->prev,
|
block, name, root, block->prev,
|
||||||
(ulong) block->prev->next,
|
block->prev->next,
|
||||||
(ulong) point));
|
point));
|
||||||
//back trace
|
//back trace
|
||||||
for (; block != point; block = block->next)
|
for (; block != point; block = block->next)
|
||||||
DBUG_PRINT("error", ("back trace 0x%lx", (ulong) block));
|
DBUG_PRINT("error", ("back trace %p", block));
|
||||||
result = 1;
|
result = 1;
|
||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
@@ -5164,10 +5164,10 @@ my_bool Query_cache::in_list(Query_cache_block * root,
|
|||||||
if (block != root)
|
if (block != root)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx (0x%lx<-->0x%lx) not owned by list '%s' 0x%lx",
|
("block %p (%p<-->%p) not owned by list '%s' %p",
|
||||||
(ulong) block,
|
block,
|
||||||
(ulong) block->prev, (ulong) block->next,
|
block->prev, block->next,
|
||||||
name, (ulong) root));
|
name, root));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
err1:
|
err1:
|
||||||
@@ -5178,13 +5178,13 @@ err1:
|
|||||||
if (block->next->prev != block)
|
if (block->next->prev != block)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("block 0x%lx in list '%s' 0x%lx is incorrect linked, next block 0x%lx refered as prev to 0x%lx (check from 0x%lx)",
|
("block %p in list '%s' %p is incorrect linked, next block %p refered as prev to %p (check from %p)",
|
||||||
(ulong) block, name, (ulong) root, (ulong) block->next,
|
block, name, root, block->next,
|
||||||
(ulong) block->next->prev,
|
block->next->prev,
|
||||||
(ulong) point));
|
point));
|
||||||
//back trace
|
//back trace
|
||||||
for (; block != point; block = block->prev)
|
for (; block != point; block = block->prev)
|
||||||
DBUG_PRINT("error", ("back trace 0x%lx", (ulong) block));
|
DBUG_PRINT("error", ("back trace %p", block));
|
||||||
result = 1;
|
result = 1;
|
||||||
goto err2;
|
goto err2;
|
||||||
}
|
}
|
||||||
@@ -5197,13 +5197,13 @@ err2:
|
|||||||
void dump_node(Query_cache_block_table * node,
|
void dump_node(Query_cache_block_table * node,
|
||||||
const char * call, const char * descr)
|
const char * call, const char * descr)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("qcache", ("%s: %s: node: 0x%lx", call, descr, (ulong) node));
|
DBUG_PRINT("qcache", ("%s: %s: node: %p", call, descr, node));
|
||||||
DBUG_PRINT("qcache", ("%s: %s: node block: 0x%lx",
|
DBUG_PRINT("qcache", ("%s: %s: node block: %p",
|
||||||
call, descr, (ulong) node->block()));
|
call, descr, node->block()));
|
||||||
DBUG_PRINT("qcache", ("%s: %s: next: 0x%lx", call, descr,
|
DBUG_PRINT("qcache", ("%s: %s: next: %p", call, descr,
|
||||||
(ulong) node->next));
|
node->next));
|
||||||
DBUG_PRINT("qcache", ("%s: %s: prev: 0x%lx", call, descr,
|
DBUG_PRINT("qcache", ("%s: %s: prev: %p", call, descr,
|
||||||
(ulong) node->prev));
|
node->prev));
|
||||||
}
|
}
|
||||||
|
|
||||||
my_bool Query_cache::in_table_list(Query_cache_block_table * root,
|
my_bool Query_cache::in_table_list(Query_cache_block_table * root,
|
||||||
@@ -5220,17 +5220,17 @@ my_bool Query_cache::in_table_list(Query_cache_block_table * root,
|
|||||||
if (table->prev->next != table)
|
if (table->prev->next != table)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("table 0x%lx(0x%lx) in list '%s' 0x%lx(0x%lx) is incorrect linked, prev table 0x%lx(0x%lx) refered as next to 0x%lx(0x%lx) (check from 0x%lx(0x%lx))",
|
("table %p(%p) in list '%s' %p(%p) is incorrect linked, prev table %p(%p) refered as next to %p(%p) (check from %p(%p))",
|
||||||
(ulong) table, (ulong) table->block(), name,
|
table, table->block(), name,
|
||||||
(ulong) root, (ulong) root->block(),
|
root, root->block(),
|
||||||
(ulong) table->prev, (ulong) table->prev->block(),
|
table->prev, table->prev->block(),
|
||||||
(ulong) table->prev->next,
|
table->prev->next,
|
||||||
(ulong) table->prev->next->block(),
|
table->prev->next->block(),
|
||||||
(ulong) point, (ulong) point->block()));
|
point, point->block()));
|
||||||
//back trace
|
//back trace
|
||||||
for (; table != point; table = table->next)
|
for (; table != point; table = table->next)
|
||||||
DBUG_PRINT("error", ("back trace 0x%lx(0x%lx)",
|
DBUG_PRINT("error", ("back trace %p(%p)",
|
||||||
(ulong) table, (ulong) table->block()));
|
table, table->block()));
|
||||||
result = 1;
|
result = 1;
|
||||||
goto err1;
|
goto err1;
|
||||||
}
|
}
|
||||||
@@ -5239,11 +5239,11 @@ my_bool Query_cache::in_table_list(Query_cache_block_table * root,
|
|||||||
if (table != root)
|
if (table != root)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("table 0x%lx(0x%lx) (0x%lx(0x%lx)<-->0x%lx(0x%lx)) not owned by list '%s' 0x%lx(0x%lx)",
|
("table %p(%p) (%p(%p)<-->%p(%p)) not owned by list '%s' %p(%p)",
|
||||||
(ulong) table, (ulong) table->block(),
|
table, table->block(),
|
||||||
(ulong) table->prev, (ulong) table->prev->block(),
|
table->prev, table->prev->block(),
|
||||||
(ulong) table->next, (ulong) table->next->block(),
|
table->next, table->next->block(),
|
||||||
name, (ulong) root, (ulong) root->block()));
|
name, root, root->block()));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
err1:
|
err1:
|
||||||
@@ -5255,17 +5255,17 @@ err1:
|
|||||||
if (table->next->prev != table)
|
if (table->next->prev != table)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("table 0x%lx(0x%lx) in list '%s' 0x%lx(0x%lx) is incorrect linked, next table 0x%lx(0x%lx) refered as prev to 0x%lx(0x%lx) (check from 0x%lx(0x%lx))",
|
("table %p(%p) in list '%s' %p(%p) is incorrect linked, next table %p(%p) refered as prev to %p(%p) (check from %p(%p))",
|
||||||
(ulong) table, (ulong) table->block(),
|
table, table->block(),
|
||||||
name, (ulong) root, (ulong) root->block(),
|
name, root, root->block(),
|
||||||
(ulong) table->next, (ulong) table->next->block(),
|
table->next, table->next->block(),
|
||||||
(ulong) table->next->prev,
|
table->next->prev,
|
||||||
(ulong) table->next->prev->block(),
|
table->next->prev->block(),
|
||||||
(ulong) point, (ulong) point->block()));
|
point, point->block()));
|
||||||
//back trace
|
//back trace
|
||||||
for (; table != point; table = table->prev)
|
for (; table != point; table = table->prev)
|
||||||
DBUG_PRINT("error", ("back trace 0x%lx(0x%lx)",
|
DBUG_PRINT("error", ("back trace %p(%p)",
|
||||||
(ulong) table, (ulong) table->block()));
|
table, table->block()));
|
||||||
result = 1;
|
result = 1;
|
||||||
goto err2;
|
goto err2;
|
||||||
}
|
}
|
||||||
|
@@ -551,7 +551,7 @@ char *thd_get_error_context_description(THD *thd, char *buffer,
|
|||||||
const char *proc_info= thd->proc_info;
|
const char *proc_info= thd->proc_info;
|
||||||
|
|
||||||
len= my_snprintf(header, sizeof(header),
|
len= my_snprintf(header, sizeof(header),
|
||||||
"MySQL thread id %lu, OS thread handle 0x%lx, query id %lu",
|
"MySQL thread id %lu, OS thread handle %lu, query id %lu",
|
||||||
thd->thread_id, (ulong) thd->real_id, (ulong) thd->query_id);
|
thd->thread_id, (ulong) thd->real_id, (ulong) thd->query_id);
|
||||||
str.length(0);
|
str.length(0);
|
||||||
str.append(header, len);
|
str.append(header, len);
|
||||||
@@ -915,7 +915,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
|
|||||||
by adding the address of the stack.
|
by adding the address of the stack.
|
||||||
*/
|
*/
|
||||||
tmp= (ulong) (my_rnd(&sql_rand) * 0xffffffff);
|
tmp= (ulong) (my_rnd(&sql_rand) * 0xffffffff);
|
||||||
my_rnd_init(&rand, tmp + (ulong) &rand, tmp + (ulong) ::global_query_id);
|
my_rnd_init(&rand, tmp + (ulong)((size_t) &rand), tmp + (ulong) ::global_query_id);
|
||||||
substitute_null_with_insert_id = FALSE;
|
substitute_null_with_insert_id = FALSE;
|
||||||
lock_info.mysql_thd= (void *)this;
|
lock_info.mysql_thd= (void *)this;
|
||||||
|
|
||||||
@@ -3537,7 +3537,7 @@ void Query_arena::free_items()
|
|||||||
{
|
{
|
||||||
next= free_list->next;
|
next= free_list->next;
|
||||||
DBUG_ASSERT(free_list != next);
|
DBUG_ASSERT(free_list != next);
|
||||||
DBUG_PRINT("info", ("free item: 0x%lx", (ulong) free_list));
|
DBUG_PRINT("info", ("free item: %p", free_list));
|
||||||
free_list->delete_self();
|
free_list->delete_self();
|
||||||
}
|
}
|
||||||
/* Postcondition: free_list is 0 */
|
/* Postcondition: free_list is 0 */
|
||||||
@@ -3987,7 +3987,7 @@ int select_materialize_with_stats::send_data(List<Item> &items)
|
|||||||
void TMP_TABLE_PARAM::init()
|
void TMP_TABLE_PARAM::init()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("TMP_TABLE_PARAM::init");
|
DBUG_ENTER("TMP_TABLE_PARAM::init");
|
||||||
DBUG_PRINT("enter", ("this: 0x%lx", (ulong)this));
|
DBUG_PRINT("enter", ("this: %p", this));
|
||||||
field_count= sum_func_count= func_count= hidden_field_count= 0;
|
field_count= sum_func_count= func_count= hidden_field_count= 0;
|
||||||
group_parts= group_length= group_null_parts= 0;
|
group_parts= group_length= group_null_parts= 0;
|
||||||
quick_group= 1;
|
quick_group= 1;
|
||||||
|
@@ -641,7 +641,7 @@ bool mysql_derived_prepare(THD *thd, LEX *lex, TABLE_LIST *derived)
|
|||||||
SELECT_LEX_UNIT *unit= derived->get_unit();
|
SELECT_LEX_UNIT *unit= derived->get_unit();
|
||||||
DBUG_ENTER("mysql_derived_prepare");
|
DBUG_ENTER("mysql_derived_prepare");
|
||||||
bool res= FALSE;
|
bool res= FALSE;
|
||||||
DBUG_PRINT("enter", ("unit 0x%lx", (ulong) unit));
|
DBUG_PRINT("enter", ("unit %p", unit));
|
||||||
|
|
||||||
if (!unit)
|
if (!unit)
|
||||||
DBUG_RETURN(FALSE);
|
DBUG_RETURN(FALSE);
|
||||||
|
@@ -1470,8 +1470,8 @@ bool mysql_prepare_insert(THD *thd, TABLE_LIST *table_list,
|
|||||||
bool res= 0;
|
bool res= 0;
|
||||||
table_map map= 0;
|
table_map map= 0;
|
||||||
DBUG_ENTER("mysql_prepare_insert");
|
DBUG_ENTER("mysql_prepare_insert");
|
||||||
DBUG_PRINT("enter", ("table_list: 0x%lx table: 0x%lx view: %d",
|
DBUG_PRINT("enter", ("table_list: %p table: %p view: %d",
|
||||||
(ulong)table_list, (ulong)table,
|
table_list, table,
|
||||||
(int)insert_into_view));
|
(int)insert_into_view));
|
||||||
/* INSERT should have a SELECT or VALUES clause */
|
/* INSERT should have a SELECT or VALUES clause */
|
||||||
DBUG_ASSERT (!select_insert || !values);
|
DBUG_ASSERT (!select_insert || !values);
|
||||||
|
@@ -759,7 +759,7 @@ void lex_start(THD *thd)
|
|||||||
void lex_end(LEX *lex)
|
void lex_end(LEX *lex)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("lex_end");
|
DBUG_ENTER("lex_end");
|
||||||
DBUG_PRINT("enter", ("lex: 0x%lx", (long) lex));
|
DBUG_PRINT("enter", ("lex: %p", lex));
|
||||||
|
|
||||||
lex_end_stage1(lex);
|
lex_end_stage1(lex);
|
||||||
lex_end_stage2(lex);
|
lex_end_stage2(lex);
|
||||||
@@ -2594,7 +2594,7 @@ bool st_select_lex::add_gorder_to_list(THD *thd, Item *item, bool asc)
|
|||||||
bool st_select_lex::add_item_to_list(THD *thd, Item *item)
|
bool st_select_lex::add_item_to_list(THD *thd, Item *item)
|
||||||
{
|
{
|
||||||
DBUG_ENTER("st_select_lex::add_item_to_list");
|
DBUG_ENTER("st_select_lex::add_item_to_list");
|
||||||
DBUG_PRINT("info", ("Item: 0x%lx", (long) item));
|
DBUG_PRINT("info", ("Item: %p", item));
|
||||||
DBUG_RETURN(item_list.push_back(item, thd->mem_root));
|
DBUG_RETURN(item_list.push_back(item, thd->mem_root));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4657,9 +4657,9 @@ bool LEX::set_arena_for_set_stmt(Query_arena *backup)
|
|||||||
Query_arena_memroot(mem_root_for_set_stmt,
|
Query_arena_memroot(mem_root_for_set_stmt,
|
||||||
Query_arena::STMT_INITIALIZED)))
|
Query_arena::STMT_INITIALIZED)))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
DBUG_PRINT("info", ("mem_root: 0x%lx arena: 0x%lx",
|
DBUG_PRINT("info", ("mem_root: %p arena: %p",
|
||||||
(ulong) mem_root_for_set_stmt,
|
mem_root_for_set_stmt,
|
||||||
(ulong) arena_for_set_stmt));
|
arena_for_set_stmt));
|
||||||
thd->set_n_backup_active_arena(arena_for_set_stmt, backup);
|
thd->set_n_backup_active_arena(arena_for_set_stmt, backup);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
@@ -4670,9 +4670,9 @@ void LEX::reset_arena_for_set_stmt(Query_arena *backup)
|
|||||||
DBUG_ENTER("LEX::reset_arena_for_set_stmt");
|
DBUG_ENTER("LEX::reset_arena_for_set_stmt");
|
||||||
DBUG_ASSERT(arena_for_set_stmt);
|
DBUG_ASSERT(arena_for_set_stmt);
|
||||||
thd->restore_active_arena(arena_for_set_stmt, backup);
|
thd->restore_active_arena(arena_for_set_stmt, backup);
|
||||||
DBUG_PRINT("info", ("mem_root: 0x%lx arena: 0x%lx",
|
DBUG_PRINT("info", ("mem_root: %p arena: %p",
|
||||||
(ulong) arena_for_set_stmt->mem_root,
|
arena_for_set_stmt->mem_root,
|
||||||
(ulong) arena_for_set_stmt));
|
arena_for_set_stmt));
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4682,9 +4682,9 @@ void LEX::free_arena_for_set_stmt()
|
|||||||
DBUG_ENTER("LEX::free_arena_for_set_stmt");
|
DBUG_ENTER("LEX::free_arena_for_set_stmt");
|
||||||
if (!arena_for_set_stmt)
|
if (!arena_for_set_stmt)
|
||||||
return;
|
return;
|
||||||
DBUG_PRINT("info", ("mem_root: 0x%lx arena: 0x%lx",
|
DBUG_PRINT("info", ("mem_root: %p arena: %p",
|
||||||
(ulong) arena_for_set_stmt->mem_root,
|
arena_for_set_stmt->mem_root,
|
||||||
(ulong) arena_for_set_stmt));
|
arena_for_set_stmt));
|
||||||
arena_for_set_stmt->free_items();
|
arena_for_set_stmt->free_items();
|
||||||
delete(arena_for_set_stmt);
|
delete(arena_for_set_stmt);
|
||||||
free_root(mem_root_for_set_stmt, MYF(MY_KEEP_PREALLOC));
|
free_root(mem_root_for_set_stmt, MYF(MY_KEEP_PREALLOC));
|
||||||
|
@@ -159,7 +159,7 @@ void stop_handle_manager()
|
|||||||
if (manager_thread_in_use)
|
if (manager_thread_in_use)
|
||||||
{
|
{
|
||||||
mysql_mutex_lock(&LOCK_manager);
|
mysql_mutex_lock(&LOCK_manager);
|
||||||
DBUG_PRINT("quit", ("initiate shutdown of handle manager thread: 0x%lx",
|
DBUG_PRINT("quit", ("initiate shutdown of handle manager thread: %lu",
|
||||||
(ulong)manager_thread));
|
(ulong)manager_thread));
|
||||||
mysql_cond_signal(&COND_manager);
|
mysql_cond_signal(&COND_manager);
|
||||||
mysql_mutex_unlock(&LOCK_manager);
|
mysql_mutex_unlock(&LOCK_manager);
|
||||||
|
@@ -4884,7 +4884,7 @@ that are reorganised.
|
|||||||
{
|
{
|
||||||
if (!alt_part_info->use_default_partitions)
|
if (!alt_part_info->use_default_partitions)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("part_info: 0x%lx", (long) tab_part_info));
|
DBUG_PRINT("info", ("part_info: %p", tab_part_info));
|
||||||
tab_part_info->use_default_partitions= FALSE;
|
tab_part_info->use_default_partitions= FALSE;
|
||||||
}
|
}
|
||||||
tab_part_info->use_default_num_partitions= FALSE;
|
tab_part_info->use_default_num_partitions= FALSE;
|
||||||
|
@@ -775,7 +775,7 @@ static st_plugin_dl *plugin_dl_add(const LEX_STRING *dl, int report)
|
|||||||
if (global_system_variables.log_warnings > 2)
|
if (global_system_variables.log_warnings > 2)
|
||||||
{
|
{
|
||||||
struct link_map *lm = (struct link_map*) plugin_dl.handle;
|
struct link_map *lm = (struct link_map*) plugin_dl.handle;
|
||||||
sql_print_information("Loaded '%s' with offset 0x%lx", dl->str, lm->l_addr);
|
sql_print_information("Loaded '%s' with offset 0x%zx", dl->str, (size_t)lm->l_addr);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -976,8 +976,8 @@ static plugin_ref intern_plugin_lock(LEX *lex, plugin_ref rc)
|
|||||||
*plugin= pi;
|
*plugin= pi;
|
||||||
#endif
|
#endif
|
||||||
pi->ref_count++;
|
pi->ref_count++;
|
||||||
DBUG_PRINT("lock",("thd: 0x%lx plugin: \"%s\" LOCK ref_count: %d",
|
DBUG_PRINT("lock",("thd: %p plugin: \"%s\" LOCK ref_count: %d",
|
||||||
(long) current_thd, pi->name.str, pi->ref_count));
|
current_thd, pi->name.str, pi->ref_count));
|
||||||
|
|
||||||
if (lex)
|
if (lex)
|
||||||
insert_dynamic(&lex->plugins, (uchar*)&plugin);
|
insert_dynamic(&lex->plugins, (uchar*)&plugin);
|
||||||
@@ -1338,8 +1338,8 @@ static void intern_plugin_unlock(LEX *lex, plugin_ref plugin)
|
|||||||
DBUG_ASSERT(pi->ref_count);
|
DBUG_ASSERT(pi->ref_count);
|
||||||
pi->ref_count--;
|
pi->ref_count--;
|
||||||
|
|
||||||
DBUG_PRINT("lock",("thd: 0x%lx plugin: \"%s\" UNLOCK ref_count: %d",
|
DBUG_PRINT("lock",("thd: %p plugin: \"%s\" UNLOCK ref_count: %d",
|
||||||
(long) current_thd, pi->name.str, pi->ref_count));
|
current_thd, pi->name.str, pi->ref_count));
|
||||||
|
|
||||||
if (pi->state == PLUGIN_IS_DELETED && !pi->ref_count)
|
if (pi->state == PLUGIN_IS_DELETED && !pi->ref_count)
|
||||||
reap_needed= true;
|
reap_needed= true;
|
||||||
@@ -3243,8 +3243,8 @@ static void plugin_vars_free_values(sys_var *vars)
|
|||||||
{
|
{
|
||||||
/* Free the string from global_system_variables. */
|
/* Free the string from global_system_variables. */
|
||||||
char **valptr= (char**) piv->real_value_ptr(NULL, OPT_GLOBAL);
|
char **valptr= (char**) piv->real_value_ptr(NULL, OPT_GLOBAL);
|
||||||
DBUG_PRINT("plugin", ("freeing value for: '%s' addr: 0x%lx",
|
DBUG_PRINT("plugin", ("freeing value for: '%s' addr: %p",
|
||||||
var->name.str, (long) valptr));
|
var->name.str, valptr));
|
||||||
my_free(*valptr);
|
my_free(*valptr);
|
||||||
*valptr= NULL;
|
*valptr= NULL;
|
||||||
}
|
}
|
||||||
|
@@ -3236,7 +3236,7 @@ void mysql_sql_stmt_execute(THD *thd)
|
|||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("info",("stmt: 0x%lx", (long) stmt));
|
DBUG_PRINT("info",("stmt: %p", stmt));
|
||||||
|
|
||||||
if (lex->prepared_stmt_params_fix_fields(thd))
|
if (lex->prepared_stmt_params_fix_fields(thd))
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
@@ -3763,8 +3763,8 @@ void Prepared_statement::setup_set_params()
|
|||||||
Prepared_statement::~Prepared_statement()
|
Prepared_statement::~Prepared_statement()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Prepared_statement::~Prepared_statement");
|
DBUG_ENTER("Prepared_statement::~Prepared_statement");
|
||||||
DBUG_PRINT("enter",("stmt: 0x%lx cursor: 0x%lx",
|
DBUG_PRINT("enter",("stmt: %p cursor: %p",
|
||||||
(long) this, (long) cursor));
|
this, cursor));
|
||||||
delete cursor;
|
delete cursor;
|
||||||
/*
|
/*
|
||||||
We have to call free on the items even if cleanup is called as some items,
|
We have to call free on the items even if cleanup is called as some items,
|
||||||
@@ -3791,7 +3791,7 @@ Query_arena::Type Prepared_statement::type() const
|
|||||||
void Prepared_statement::cleanup_stmt()
|
void Prepared_statement::cleanup_stmt()
|
||||||
{
|
{
|
||||||
DBUG_ENTER("Prepared_statement::cleanup_stmt");
|
DBUG_ENTER("Prepared_statement::cleanup_stmt");
|
||||||
DBUG_PRINT("enter",("stmt: 0x%lx", (long) this));
|
DBUG_PRINT("enter",("stmt: %p", this));
|
||||||
thd->restore_set_statement_var();
|
thd->restore_set_statement_var();
|
||||||
cleanup_items(free_list);
|
cleanup_items(free_list);
|
||||||
thd->cleanup_after_query();
|
thd->cleanup_after_query();
|
||||||
|
@@ -10274,8 +10274,8 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
|||||||
tmp_cond= new (thd->mem_root) Item_func_trig_cond(thd, tmp_cond,
|
tmp_cond= new (thd->mem_root) Item_func_trig_cond(thd, tmp_cond,
|
||||||
&first_inner_tab->
|
&first_inner_tab->
|
||||||
not_null_compl);
|
not_null_compl);
|
||||||
DBUG_PRINT("info", ("Item_func_trig_cond 0x%lx",
|
DBUG_PRINT("info", ("Item_func_trig_cond %p",
|
||||||
(ulong) tmp_cond));
|
tmp_cond));
|
||||||
if (tmp_cond)
|
if (tmp_cond)
|
||||||
tmp_cond->quick_fix_field();
|
tmp_cond->quick_fix_field();
|
||||||
/* Add the predicate to other pushed down predicates */
|
/* Add the predicate to other pushed down predicates */
|
||||||
@@ -10283,8 +10283,8 @@ make_join_select(JOIN *join,SQL_SELECT *select,COND *cond)
|
|||||||
*sel_cond_ref= !(*sel_cond_ref) ?
|
*sel_cond_ref= !(*sel_cond_ref) ?
|
||||||
tmp_cond :
|
tmp_cond :
|
||||||
new (thd->mem_root) Item_cond_and(thd, *sel_cond_ref, tmp_cond);
|
new (thd->mem_root) Item_cond_and(thd, *sel_cond_ref, tmp_cond);
|
||||||
DBUG_PRINT("info", ("Item_cond_and 0x%lx",
|
DBUG_PRINT("info", ("Item_cond_and %p",
|
||||||
(ulong)(*sel_cond_ref)));
|
(*sel_cond_ref)));
|
||||||
if (!(*sel_cond_ref))
|
if (!(*sel_cond_ref))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
(*sel_cond_ref)->quick_fix_field();
|
(*sel_cond_ref)->quick_fix_field();
|
||||||
@@ -20033,9 +20033,9 @@ end_update(JOIN *join, JOIN_TAB *join_tab __attribute__((unused)),
|
|||||||
Item *item= *group->item;
|
Item *item= *group->item;
|
||||||
if (group->fast_field_copier_setup != group->field)
|
if (group->fast_field_copier_setup != group->field)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("new setup 0x%lx -> 0x%lx",
|
DBUG_PRINT("info", ("new setup %p -> %p",
|
||||||
(ulong)group->fast_field_copier_setup,
|
group->fast_field_copier_setup,
|
||||||
(ulong)group->field));
|
group->field));
|
||||||
group->fast_field_copier_setup= group->field;
|
group->fast_field_copier_setup= group->field;
|
||||||
group->fast_field_copier_func=
|
group->fast_field_copier_func=
|
||||||
item->setup_fast_field_copier(group->field);
|
item->setup_fast_field_copier(group->field);
|
||||||
@@ -24667,8 +24667,8 @@ int JOIN::save_explain_data_intern(Explain_query *output,
|
|||||||
JOIN *join= this; /* Legacy: this code used to be a non-member function */
|
JOIN *join= this; /* Legacy: this code used to be a non-member function */
|
||||||
int cur_error= 0;
|
int cur_error= 0;
|
||||||
DBUG_ENTER("JOIN::save_explain_data_intern");
|
DBUG_ENTER("JOIN::save_explain_data_intern");
|
||||||
DBUG_PRINT("info", ("Select 0x%lx, type %s, message %s",
|
DBUG_PRINT("info", ("Select %p, type %s, message %s",
|
||||||
(ulong)join->select_lex, join->select_lex->type,
|
join->select_lex, join->select_lex->type,
|
||||||
message ? message : "NULL"));
|
message ? message : "NULL"));
|
||||||
DBUG_ASSERT(have_query_plan == QEP_AVAILABLE);
|
DBUG_ASSERT(have_query_plan == QEP_AVAILABLE);
|
||||||
/* fake_select_lex is created/printed by Explain_union */
|
/* fake_select_lex is created/printed by Explain_union */
|
||||||
|
@@ -350,8 +350,8 @@ get_server_from_table_to_cache(TABLE *table)
|
|||||||
DBUG_PRINT("info", ("server->socket %s", server->socket));
|
DBUG_PRINT("info", ("server->socket %s", server->socket));
|
||||||
if (my_hash_insert(&servers_cache, (uchar*) server))
|
if (my_hash_insert(&servers_cache, (uchar*) server))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("had a problem inserting server %s at %lx",
|
DBUG_PRINT("info", ("had a problem inserting server %s at %p",
|
||||||
server->server_name, (long unsigned int) server));
|
server->server_name, server));
|
||||||
// error handling needed here
|
// error handling needed here
|
||||||
DBUG_RETURN(TRUE);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
@@ -431,13 +431,13 @@ insert_server_record_into_cache(FOREIGN_SERVER *server)
|
|||||||
We succeded in insertion of the server to the table, now insert
|
We succeded in insertion of the server to the table, now insert
|
||||||
the server to the cache
|
the server to the cache
|
||||||
*/
|
*/
|
||||||
DBUG_PRINT("info", ("inserting server %s at %lx, length %d",
|
DBUG_PRINT("info", ("inserting server %s at %p, length %d",
|
||||||
server->server_name, (long unsigned int) server,
|
server->server_name, server,
|
||||||
server->server_name_length));
|
server->server_name_length));
|
||||||
if (my_hash_insert(&servers_cache, (uchar*) server))
|
if (my_hash_insert(&servers_cache, (uchar*) server))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("had a problem inserting server %s at %lx",
|
DBUG_PRINT("info", ("had a problem inserting server %s at %p",
|
||||||
server->server_name, (long unsigned int) server));
|
server->server_name, server));
|
||||||
// error handling needed here
|
// error handling needed here
|
||||||
error= 1;
|
error= 1;
|
||||||
}
|
}
|
||||||
@@ -804,8 +804,8 @@ int update_server_record_in_cache(FOREIGN_SERVER *existing,
|
|||||||
*/
|
*/
|
||||||
if (my_hash_insert(&servers_cache, (uchar*)altered))
|
if (my_hash_insert(&servers_cache, (uchar*)altered))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("had a problem inserting server %s at %lx",
|
DBUG_PRINT("info", ("had a problem inserting server %s at %p",
|
||||||
altered->server_name, (long unsigned int) altered));
|
altered->server_name,altered));
|
||||||
error= ER_OUT_OF_RESOURCES;
|
error= ER_OUT_OF_RESOURCES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -466,8 +466,8 @@ public:
|
|||||||
}
|
}
|
||||||
bool append(const String &s);
|
bool append(const String &s);
|
||||||
bool append(const char *s);
|
bool append(const char *s);
|
||||||
bool append(const LEX_STRING *ls) { return append(ls->str, ls->length); }
|
bool append(const LEX_STRING *ls) { return append(ls->str, (uint32)ls->length); }
|
||||||
bool append(const LEX_CSTRING *ls) { return append(ls->str, ls->length); }
|
bool append(const LEX_CSTRING *ls) { return append(ls->str, (uint32)ls->length); }
|
||||||
bool append(const char *s, uint32 arg_length);
|
bool append(const char *s, uint32 arg_length);
|
||||||
bool append(const char *s, uint32 arg_length, CHARSET_INFO *cs);
|
bool append(const char *s, uint32 arg_length, CHARSET_INFO *cs);
|
||||||
bool append_ulonglong(ulonglong val);
|
bool append_ulonglong(ulonglong val);
|
||||||
@@ -634,7 +634,7 @@ public:
|
|||||||
}
|
}
|
||||||
bool append_for_single_quote(const char *st)
|
bool append_for_single_quote(const char *st)
|
||||||
{
|
{
|
||||||
return append_for_single_quote(st, strlen(st));
|
return append_for_single_quote(st, (uint)strlen(st));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Swap two string objects. Efficient way to exchange data without memcpy. */
|
/* Swap two string objects. Efficient way to exchange data without memcpy. */
|
||||||
|
@@ -2272,9 +2272,9 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
|||||||
size_t db_length= table->db_length;
|
size_t db_length= table->db_length;
|
||||||
handlerton *table_type= 0;
|
handlerton *table_type= 0;
|
||||||
|
|
||||||
DBUG_PRINT("table", ("table_l: '%s'.'%s' table: 0x%lx s: 0x%lx",
|
DBUG_PRINT("table", ("table_l: '%s'.'%s' table: %p s: %p",
|
||||||
table->db, table->table_name, (long) table->table,
|
table->db, table->table_name, table->table,
|
||||||
table->table ? (long) table->table->s : (long) -1));
|
table->table ? table->table->s : NULL));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
If we are in locked tables mode and are dropping a temporary table,
|
If we are in locked tables mode and are dropping a temporary table,
|
||||||
@@ -2517,8 +2517,8 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists,
|
|||||||
mysql_audit_drop_table(thd, table);
|
mysql_audit_drop_table(thd, table);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("table", ("table: 0x%lx s: 0x%lx", (long) table->table,
|
DBUG_PRINT("table", ("table: %p s: %p", table->table,
|
||||||
table->table ? (long) table->table->s : (long) -1));
|
table->table ? table->table->s : NULL));
|
||||||
}
|
}
|
||||||
DEBUG_SYNC(thd, "rm_table_no_locks_before_binlog");
|
DEBUG_SYNC(thd, "rm_table_no_locks_before_binlog");
|
||||||
thd->thread_specific_used|= (trans_tmp_table_deleted ||
|
thd->thread_specific_used|= (trans_tmp_table_deleted ||
|
||||||
|
@@ -1151,7 +1151,7 @@ bool mysql_make_view(THD *thd, TABLE_SHARE *share, TABLE_LIST *table,
|
|||||||
bool result, view_is_mergeable;
|
bool result, view_is_mergeable;
|
||||||
TABLE_LIST *UNINIT_VAR(view_main_select_tables);
|
TABLE_LIST *UNINIT_VAR(view_main_select_tables);
|
||||||
DBUG_ENTER("mysql_make_view");
|
DBUG_ENTER("mysql_make_view");
|
||||||
DBUG_PRINT("info", ("table: 0x%lx (%s)", (ulong) table, table->table_name));
|
DBUG_PRINT("info", ("table: %p (%s)", table, table->table_name));
|
||||||
|
|
||||||
if (table->required_type == FRMTYPE_TABLE)
|
if (table->required_type == FRMTYPE_TABLE)
|
||||||
{
|
{
|
||||||
|
@@ -158,7 +158,7 @@ uint find_type2(const TYPELIB *typelib, const char *x, uint length,
|
|||||||
int pos;
|
int pos;
|
||||||
const char *j;
|
const char *j;
|
||||||
DBUG_ENTER("find_type2");
|
DBUG_ENTER("find_type2");
|
||||||
DBUG_PRINT("enter",("x: '%.*s' lib: 0x%lx", length, x, (long) typelib));
|
DBUG_PRINT("enter",("x: '%.*s' lib: %p", length, x, typelib));
|
||||||
|
|
||||||
if (!typelib->count)
|
if (!typelib->count)
|
||||||
{
|
{
|
||||||
|
@@ -3001,8 +3001,8 @@ enum open_frm_error open_table_from_share(THD *thd, TABLE_SHARE *share,
|
|||||||
Field **field_ptr;
|
Field **field_ptr;
|
||||||
uint8 save_context_analysis_only= thd->lex->context_analysis_only;
|
uint8 save_context_analysis_only= thd->lex->context_analysis_only;
|
||||||
DBUG_ENTER("open_table_from_share");
|
DBUG_ENTER("open_table_from_share");
|
||||||
DBUG_PRINT("enter",("name: '%s.%s' form: 0x%lx", share->db.str,
|
DBUG_PRINT("enter",("name: '%s.%s' form: %p", share->db.str,
|
||||||
share->table_name.str, (long) outparam));
|
share->table_name.str, outparam));
|
||||||
|
|
||||||
thd->lex->context_analysis_only&= ~CONTEXT_ANALYSIS_ONLY_VIEW; // not a view
|
thd->lex->context_analysis_only&= ~CONTEXT_ANALYSIS_ONLY_VIEW; // not a view
|
||||||
|
|
||||||
@@ -3406,7 +3406,7 @@ int closefrm(register TABLE *table)
|
|||||||
{
|
{
|
||||||
int error=0;
|
int error=0;
|
||||||
DBUG_ENTER("closefrm");
|
DBUG_ENTER("closefrm");
|
||||||
DBUG_PRINT("enter", ("table: 0x%lx", (long) table));
|
DBUG_PRINT("enter", ("table: %p", table));
|
||||||
|
|
||||||
if (table->db_stat)
|
if (table->db_stat)
|
||||||
error=table->file->ha_close();
|
error=table->file->ha_close();
|
||||||
|
@@ -913,8 +913,8 @@ retry:
|
|||||||
}
|
}
|
||||||
|
|
||||||
end:
|
end:
|
||||||
DBUG_PRINT("exit", ("share: 0x%lx ref_count: %u",
|
DBUG_PRINT("exit", ("share: %p ref_count: %u",
|
||||||
(ulong) share, share->tdc->ref_count));
|
share, share->tdc->ref_count));
|
||||||
if (flags & GTS_NOLOCK)
|
if (flags & GTS_NOLOCK)
|
||||||
{
|
{
|
||||||
tdc_release_share(share);
|
tdc_release_share(share);
|
||||||
@@ -945,8 +945,8 @@ void tdc_release_share(TABLE_SHARE *share)
|
|||||||
|
|
||||||
mysql_mutex_lock(&share->tdc->LOCK_table_share);
|
mysql_mutex_lock(&share->tdc->LOCK_table_share);
|
||||||
DBUG_PRINT("enter",
|
DBUG_PRINT("enter",
|
||||||
("share: 0x%lx table: %s.%s ref_count: %u version: %lu",
|
("share: %p table: %s.%s ref_count: %u version: %lu",
|
||||||
(ulong) share, share->db.str, share->table_name.str,
|
share, share->db.str, share->table_name.str,
|
||||||
share->tdc->ref_count, share->tdc->version));
|
share->tdc->ref_count, share->tdc->version));
|
||||||
DBUG_ASSERT(share->tdc->ref_count);
|
DBUG_ASSERT(share->tdc->ref_count);
|
||||||
|
|
||||||
|
@@ -1127,8 +1127,8 @@ TABLE *THD::open_temporary_table(TMP_TABLE_SHARE *share,
|
|||||||
thread_safe_increment32(&slave_open_temp_tables);
|
thread_safe_increment32(&slave_open_temp_tables);
|
||||||
}
|
}
|
||||||
|
|
||||||
DBUG_PRINT("tmptable", ("Opened table: '%s'.'%s' 0x%lx", table->s->db.str,
|
DBUG_PRINT("tmptable", ("Opened table: '%s'.'%s'%p", table->s->db.str,
|
||||||
table->s->table_name.str, (long) table));
|
table->s->table_name.str, table));
|
||||||
DBUG_RETURN(table);
|
DBUG_RETURN(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1221,9 +1221,9 @@ void THD::close_temporary_table(TABLE *table)
|
|||||||
{
|
{
|
||||||
DBUG_ENTER("THD::close_temporary_table");
|
DBUG_ENTER("THD::close_temporary_table");
|
||||||
|
|
||||||
DBUG_PRINT("tmptable", ("closing table: '%s'.'%s' 0x%lx alias: '%s'",
|
DBUG_PRINT("tmptable", ("closing table: '%s'.'%s'%p alias: '%s'",
|
||||||
table->s->db.str, table->s->table_name.str,
|
table->s->db.str, table->s->table_name.str,
|
||||||
(long) table, table->alias.c_ptr()));
|
table, table->alias.c_ptr()));
|
||||||
|
|
||||||
closefrm(table);
|
closefrm(table);
|
||||||
my_free(table);
|
my_free(table);
|
||||||
|
@@ -450,7 +450,7 @@ static void* native_event_get_userdata(native_event *event)
|
|||||||
static int io_poll_create()
|
static int io_poll_create()
|
||||||
{
|
{
|
||||||
HANDLE h= CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, 0);
|
HANDLE h= CreateIoCompletionPort(INVALID_HANDLE_VALUE, 0, 0, 0);
|
||||||
return (int)h;
|
return PtrToInt(h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -476,7 +476,7 @@ int io_poll_start_read(int pollfd, int fd, void *, void *opt)
|
|||||||
|
|
||||||
static int io_poll_associate_fd(int pollfd, int fd, void *data, void *opt)
|
static int io_poll_associate_fd(int pollfd, int fd, void *data, void *opt)
|
||||||
{
|
{
|
||||||
HANDLE h= CreateIoCompletionPort((HANDLE)fd, (HANDLE)pollfd, (ULONG_PTR)data, 0);
|
HANDLE h= CreateIoCompletionPort(IntToPtr(fd), IntToPtr(pollfd), (ULONG_PTR)data, 0);
|
||||||
if (!h)
|
if (!h)
|
||||||
return -1;
|
return -1;
|
||||||
return io_poll_start_read(pollfd,fd, 0, opt);
|
return io_poll_start_read(pollfd,fd, 0, opt);
|
||||||
|
@@ -452,9 +452,9 @@ static uint pack_keys(uchar *keybuff, uint key_count, KEY *keyinfo,
|
|||||||
int2store(pos+6, key->block_size);
|
int2store(pos+6, key->block_size);
|
||||||
pos+=8;
|
pos+=8;
|
||||||
key_parts+=key->user_defined_key_parts;
|
key_parts+=key->user_defined_key_parts;
|
||||||
DBUG_PRINT("loop", ("flags: %lu key_parts: %d key_part: 0x%lx",
|
DBUG_PRINT("loop", ("flags: %lu key_parts: %d key_part: %p",
|
||||||
key->flags, key->user_defined_key_parts,
|
key->flags, key->user_defined_key_parts,
|
||||||
(long) key->key_part));
|
key->key_part));
|
||||||
for (key_part=key->key_part,key_part_end=key_part+key->user_defined_key_parts ;
|
for (key_part=key->key_part,key_part_end=key_part+key->user_defined_key_parts ;
|
||||||
key_part != key_part_end ;
|
key_part != key_part_end ;
|
||||||
key_part++)
|
key_part++)
|
||||||
|
@@ -124,8 +124,8 @@ bool MYSQLDEF::GetServerInfo(PGLOBAL g, const char *server_name)
|
|||||||
DBUG_RETURN(true);
|
DBUG_RETURN(true);
|
||||||
} // endif server
|
} // endif server
|
||||||
|
|
||||||
DBUG_PRINT("info", ("get_server_by_name returned server at %lx",
|
DBUG_PRINT("info", ("get_server_by_name returned server at %p",
|
||||||
(size_t) server));
|
server));
|
||||||
|
|
||||||
// TODO: We need to examine which of these can really be NULL
|
// TODO: We need to examine which of these can really be NULL
|
||||||
Hostname = PlugDup(g, server->host);
|
Hostname = PlugDup(g, server->host);
|
||||||
|
@@ -614,8 +614,8 @@ int get_connection(MEM_ROOT *mem_root, FEDERATED_SHARE *share)
|
|||||||
error_num=1;
|
error_num=1;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info", ("get_server_by_name returned server at %lx",
|
DBUG_PRINT("info", ("get_server_by_name returned server at %p",
|
||||||
(long unsigned int) server));
|
server));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Most of these should never be empty strings, error handling will
|
Most of these should never be empty strings, error handling will
|
||||||
@@ -716,15 +716,15 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATED_SHARE *share, TABLE *table,
|
|||||||
|
|
||||||
share->port= 0;
|
share->port= 0;
|
||||||
share->socket= 0;
|
share->socket= 0;
|
||||||
DBUG_PRINT("info", ("share at %lx", (long unsigned int) share));
|
DBUG_PRINT("info", ("share at %p", share));
|
||||||
DBUG_PRINT("info", ("Length: %u", (uint) table->s->connect_string.length));
|
DBUG_PRINT("info", ("Length: %u", (uint) table->s->connect_string.length));
|
||||||
DBUG_PRINT("info", ("String: '%.*s'", (int) table->s->connect_string.length,
|
DBUG_PRINT("info", ("String: '%.*s'", (int) table->s->connect_string.length,
|
||||||
table->s->connect_string.str));
|
table->s->connect_string.str));
|
||||||
share->connection_string= strmake_root(mem_root, table->s->connect_string.str,
|
share->connection_string= strmake_root(mem_root, table->s->connect_string.str,
|
||||||
table->s->connect_string.length);
|
table->s->connect_string.length);
|
||||||
|
|
||||||
DBUG_PRINT("info",("parse_url alloced share->connection_string %lx",
|
DBUG_PRINT("info",("parse_url alloced share->connection_string %p",
|
||||||
(long unsigned int) share->connection_string));
|
share->connection_string));
|
||||||
|
|
||||||
DBUG_PRINT("info",("share->connection_string %s",share->connection_string));
|
DBUG_PRINT("info",("share->connection_string %s",share->connection_string));
|
||||||
/*
|
/*
|
||||||
@@ -737,9 +737,9 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATED_SHARE *share, TABLE *table,
|
|||||||
|
|
||||||
DBUG_PRINT("info",
|
DBUG_PRINT("info",
|
||||||
("share->connection_string %s internal format \
|
("share->connection_string %s internal format \
|
||||||
share->connection_string %lx",
|
share->connection_string %p",
|
||||||
share->connection_string,
|
share->connection_string,
|
||||||
(long unsigned int) share->connection_string));
|
share->connection_string));
|
||||||
|
|
||||||
/* ok, so we do a little parsing, but not completely! */
|
/* ok, so we do a little parsing, but not completely! */
|
||||||
share->parsed= FALSE;
|
share->parsed= FALSE;
|
||||||
@@ -793,8 +793,8 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATED_SHARE *share, TABLE *table,
|
|||||||
// Add a null for later termination of table name
|
// Add a null for later termination of table name
|
||||||
share->connection_string[table->s->connect_string.length]= 0;
|
share->connection_string[table->s->connect_string.length]= 0;
|
||||||
share->scheme= share->connection_string;
|
share->scheme= share->connection_string;
|
||||||
DBUG_PRINT("info",("parse_url alloced share->scheme %lx",
|
DBUG_PRINT("info",("parse_url alloced share->scheme %p",
|
||||||
(long unsigned int) share->scheme));
|
share->scheme));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
remove addition of null terminator and store length
|
remove addition of null terminator and store length
|
||||||
|
@@ -553,8 +553,8 @@ int get_connection(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share)
|
|||||||
error_num=1;
|
error_num=1;
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info", ("get_server_by_name returned server at %lx",
|
DBUG_PRINT("info", ("get_server_by_name returned server at %p",
|
||||||
(long unsigned int) server));
|
server));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Most of these should never be empty strings, error handling will
|
Most of these should never be empty strings, error handling will
|
||||||
@@ -655,15 +655,15 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share,
|
|||||||
|
|
||||||
share->port= 0;
|
share->port= 0;
|
||||||
share->socket= 0;
|
share->socket= 0;
|
||||||
DBUG_PRINT("info", ("share at %lx", (long unsigned int) share));
|
DBUG_PRINT("info", ("share at %p", share));
|
||||||
DBUG_PRINT("info", ("Length: %u", (uint) table_s->connect_string.length));
|
DBUG_PRINT("info", ("Length: %u", (uint) table_s->connect_string.length));
|
||||||
DBUG_PRINT("info", ("String: '%.*s'", (int) table_s->connect_string.length,
|
DBUG_PRINT("info", ("String: '%.*s'", (int) table_s->connect_string.length,
|
||||||
table_s->connect_string.str));
|
table_s->connect_string.str));
|
||||||
share->connection_string= strmake_root(mem_root, table_s->connect_string.str,
|
share->connection_string= strmake_root(mem_root, table_s->connect_string.str,
|
||||||
table_s->connect_string.length);
|
table_s->connect_string.length);
|
||||||
|
|
||||||
DBUG_PRINT("info",("parse_url alloced share->connection_string %lx",
|
DBUG_PRINT("info",("parse_url alloced share->connection_string %p",
|
||||||
(long unsigned int) share->connection_string));
|
share->connection_string));
|
||||||
|
|
||||||
DBUG_PRINT("info",("share->connection_string: %s",share->connection_string));
|
DBUG_PRINT("info",("share->connection_string: %s",share->connection_string));
|
||||||
/*
|
/*
|
||||||
@@ -676,9 +676,9 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share,
|
|||||||
|
|
||||||
DBUG_PRINT("info",
|
DBUG_PRINT("info",
|
||||||
("share->connection_string: %s internal format "
|
("share->connection_string: %s internal format "
|
||||||
"share->connection_string: %lx",
|
"share->connection_string: %p",
|
||||||
share->connection_string,
|
share->connection_string,
|
||||||
(ulong) share->connection_string));
|
share->connection_string));
|
||||||
|
|
||||||
/* ok, so we do a little parsing, but not completely! */
|
/* ok, so we do a little parsing, but not completely! */
|
||||||
share->parsed= FALSE;
|
share->parsed= FALSE;
|
||||||
@@ -731,8 +731,8 @@ static int parse_url(MEM_ROOT *mem_root, FEDERATEDX_SHARE *share,
|
|||||||
// Add a null for later termination of table name
|
// Add a null for later termination of table name
|
||||||
share->connection_string[table_s->connect_string.length]= 0;
|
share->connection_string[table_s->connect_string.length]= 0;
|
||||||
share->scheme= share->connection_string;
|
share->scheme= share->connection_string;
|
||||||
DBUG_PRINT("info",("parse_url alloced share->scheme: %lx",
|
DBUG_PRINT("info",("parse_url alloced share->scheme: %p",
|
||||||
(ulong) share->scheme));
|
share->scheme));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Remove addition of null terminator and store length
|
Remove addition of null terminator and store length
|
||||||
|
@@ -790,7 +790,7 @@ buf_page_is_checksum_valid_none(
|
|||||||
&& srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_NONE) {
|
&& srv_checksum_algorithm == SRV_CHECKSUM_ALGORITHM_STRICT_NONE) {
|
||||||
fprintf(log_file,
|
fprintf(log_file,
|
||||||
"page::%llu; none checksum: calculated"
|
"page::%llu; none checksum: calculated"
|
||||||
" = " ULINTPF "; recorded checksum_field1 = " ULINTPF
|
" = %lu; recorded checksum_field1 = " ULINTPF
|
||||||
" recorded checksum_field2 = " ULINTPF "\n",
|
" recorded checksum_field2 = " ULINTPF "\n",
|
||||||
cur_page_num, BUF_NO_CHECKSUM_MAGIC,
|
cur_page_num, BUF_NO_CHECKSUM_MAGIC,
|
||||||
checksum_field1, checksum_field2);
|
checksum_field1, checksum_field2);
|
||||||
|
@@ -7531,9 +7531,9 @@ AIO::to_file(FILE* file) const
|
|||||||
|
|
||||||
fprintf(file,
|
fprintf(file,
|
||||||
"%s IO for %s (offset=" UINT64PF
|
"%s IO for %s (offset=" UINT64PF
|
||||||
", size=" ULINTPF ")\n",
|
", size=%lu)\n",
|
||||||
slot.type.is_read() ? "read" : "write",
|
slot.type.is_read() ? "read" : "write",
|
||||||
slot.name, slot.offset, slot.len);
|
slot.name, slot.offset, (unsigned long)(slot.len));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -620,8 +620,8 @@ static int table2maria(TABLE *table_arg, data_file_type row_type,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBUG_PRINT("loop", ("found: 0x%lx recpos: %d minpos: %d length: %d",
|
DBUG_PRINT("loop", ("found: %p recpos: %d minpos: %d length: %d",
|
||||||
(long) found, recpos, minpos, length));
|
found, recpos, minpos, length));
|
||||||
if (!found)
|
if (!found)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@@ -864,8 +864,8 @@ static void _ma_print_bitmap_changes(MARIA_FILE_BITMAP *bitmap)
|
|||||||
|
|
||||||
end= bitmap->map + bitmap->used_size;
|
end= bitmap->map + bitmap->used_size;
|
||||||
DBUG_LOCK_FILE;
|
DBUG_LOCK_FILE;
|
||||||
fprintf(DBUG_FILE,"\nBitmap page changes at page: %lu bitmap: 0x%lx\n",
|
fprintf(DBUG_FILE,"\nBitmap page changes at page: %lu bitmap: %p\n",
|
||||||
(ulong) bitmap->page, (long) bitmap->map);
|
(ulong) bitmap->page, bitmap->map);
|
||||||
|
|
||||||
page= (ulong) bitmap->page+1;
|
page= (ulong) bitmap->page+1;
|
||||||
for (pos= bitmap->map, org_pos= bitmap->map + bitmap->block_size ;
|
for (pos= bitmap->map, org_pos= bitmap->map + bitmap->block_size ;
|
||||||
|
@@ -2519,8 +2519,8 @@ static int maria_drop_all_indexes(HA_CHECK *param, MARIA_HA *info,
|
|||||||
DBUG_PRINT("repair", ("creating missing indexes"));
|
DBUG_PRINT("repair", ("creating missing indexes"));
|
||||||
for (i= 0; i < share->base.keys; i++)
|
for (i= 0; i < share->base.keys; i++)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("repair", ("index #: %u key_root: 0x%lx active: %d",
|
DBUG_PRINT("repair", ("index #: %u key_root:%lld active: %d",
|
||||||
i, (long) state->key_root[i],
|
i, state->key_root[i],
|
||||||
maria_is_key_active(state->key_map, i)));
|
maria_is_key_active(state->key_map, i)));
|
||||||
if ((state->key_root[i] != HA_OFFSET_ERROR) &&
|
if ((state->key_root[i] != HA_OFFSET_ERROR) &&
|
||||||
!maria_is_key_active(state->key_map, i))
|
!maria_is_key_active(state->key_map, i))
|
||||||
@@ -4477,8 +4477,8 @@ int maria_repair_parallel(HA_CHECK *param, register MARIA_HA *info,
|
|||||||
*/
|
*/
|
||||||
sort_param[i].read_cache= ((rep_quick || !i) ? param->read_cache :
|
sort_param[i].read_cache= ((rep_quick || !i) ? param->read_cache :
|
||||||
new_data_cache);
|
new_data_cache);
|
||||||
DBUG_PRINT("io_cache_share", ("thread: %u read_cache: 0x%lx",
|
DBUG_PRINT("io_cache_share", ("thread: %u read_cache: %p",
|
||||||
i, (long) &sort_param[i].read_cache));
|
i, &sort_param[i].read_cache));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
two approaches: the same amount of memory for each thread
|
two approaches: the same amount of memory for each thread
|
||||||
|
@@ -170,7 +170,7 @@ static int really_execute_checkpoint(void)
|
|||||||
"Horizon" is a lower bound of the LSN of the next log record.
|
"Horizon" is a lower bound of the LSN of the next log record.
|
||||||
*/
|
*/
|
||||||
checkpoint_start_log_horizon= translog_get_horizon();
|
checkpoint_start_log_horizon= translog_get_horizon();
|
||||||
DBUG_PRINT("info",("checkpoint_start_log_horizon (%lu,0x%lx)",
|
DBUG_PRINT("info",("checkpoint_start_log_horizon " LSN_FMT,
|
||||||
LSN_IN_PARTS(checkpoint_start_log_horizon)));
|
LSN_IN_PARTS(checkpoint_start_log_horizon)));
|
||||||
lsn_store(checkpoint_start_log_horizon_char, checkpoint_start_log_horizon);
|
lsn_store(checkpoint_start_log_horizon_char, checkpoint_start_log_horizon);
|
||||||
|
|
||||||
@@ -333,10 +333,11 @@ int ma_checkpoint_init(ulong interval)
|
|||||||
else if (interval > 0)
|
else if (interval > 0)
|
||||||
{
|
{
|
||||||
compile_time_assert(sizeof(void *) >= sizeof(ulong));
|
compile_time_assert(sizeof(void *) >= sizeof(ulong));
|
||||||
|
size_t intv= interval;
|
||||||
if ((res= mysql_thread_create(key_thread_checkpoint,
|
if ((res= mysql_thread_create(key_thread_checkpoint,
|
||||||
&checkpoint_control.thread, NULL,
|
&checkpoint_control.thread, NULL,
|
||||||
ma_checkpoint_background,
|
ma_checkpoint_background,
|
||||||
(void*) interval)))
|
(void*) intv)))
|
||||||
checkpoint_control.killed= TRUE;
|
checkpoint_control.killed= TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -375,7 +376,7 @@ static void flush_all_tables(int what_to_flush)
|
|||||||
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET|
|
MA_STATE_INFO_WRITE_DONT_MOVE_OFFSET|
|
||||||
MA_STATE_INFO_WRITE_LOCK);
|
MA_STATE_INFO_WRITE_LOCK);
|
||||||
DBUG_PRINT("maria_flush_states",
|
DBUG_PRINT("maria_flush_states",
|
||||||
("is_of_horizon: LSN (%lu,0x%lx)",
|
("is_of_horizon: LSN " LSN_FMT,
|
||||||
LSN_IN_PARTS(info->s->state.is_of_horizon)));
|
LSN_IN_PARTS(info->s->state.is_of_horizon)));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
@@ -546,8 +547,8 @@ pthread_handler_t ma_checkpoint_background(void *arg)
|
|||||||
right after "case 0", thus having 'dfile' unset. So the thread cares only
|
right after "case 0", thus having 'dfile' unset. So the thread cares only
|
||||||
about the interval's value when it started.
|
about the interval's value when it started.
|
||||||
*/
|
*/
|
||||||
const ulong interval= (ulong)arg;
|
const size_t interval= (size_t)arg;
|
||||||
uint sleeps, sleep_time;
|
size_t sleeps, sleep_time;
|
||||||
TRANSLOG_ADDRESS log_horizon_at_last_checkpoint=
|
TRANSLOG_ADDRESS log_horizon_at_last_checkpoint=
|
||||||
translog_get_horizon();
|
translog_get_horizon();
|
||||||
ulonglong pagecache_flushes_at_last_checkpoint=
|
ulonglong pagecache_flushes_at_last_checkpoint=
|
||||||
|
@@ -30,9 +30,9 @@ int maria_close(register MARIA_HA *info)
|
|||||||
MARIA_SHARE *share= info->s;
|
MARIA_SHARE *share= info->s;
|
||||||
my_bool internal_table= share->internal_table;
|
my_bool internal_table= share->internal_table;
|
||||||
DBUG_ENTER("maria_close");
|
DBUG_ENTER("maria_close");
|
||||||
DBUG_PRINT("enter",("name: '%s' base: 0x%lx reopen: %u locks: %u",
|
DBUG_PRINT("enter",("name: '%s' base: %p reopen: %u locks: %u",
|
||||||
share->open_file_name.str,
|
share->open_file_name.str,
|
||||||
(long) info, (uint) share->reopen,
|
info, (uint) share->reopen,
|
||||||
(uint) share->tot_locks));
|
(uint) share->tot_locks));
|
||||||
|
|
||||||
/* Check that we have unlocked key delete-links properly */
|
/* Check that we have unlocked key delete-links properly */
|
||||||
|
@@ -121,7 +121,7 @@ int maria_begin(MARIA_HA *info)
|
|||||||
if (unlikely(!trn))
|
if (unlikely(!trn))
|
||||||
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
|
DBUG_RETURN(HA_ERR_OUT_OF_MEM);
|
||||||
|
|
||||||
DBUG_PRINT("info", ("TRN set to 0x%lx", (ulong) trn));
|
DBUG_PRINT("info", ("TRN set to %p", trn));
|
||||||
_ma_set_trn_for_table(info, trn);
|
_ma_set_trn_for_table(info, trn);
|
||||||
}
|
}
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
|
@@ -146,6 +146,8 @@ static CONTROL_FILE_ERROR create_control_file(const char *name,
|
|||||||
{
|
{
|
||||||
uint32 sum;
|
uint32 sum;
|
||||||
uchar buffer[CF_CREATE_TIME_TOTAL_SIZE];
|
uchar buffer[CF_CREATE_TIME_TOTAL_SIZE];
|
||||||
|
ulong rnd1,rnd2;
|
||||||
|
|
||||||
DBUG_ENTER("maria_create_control_file");
|
DBUG_ENTER("maria_create_control_file");
|
||||||
|
|
||||||
if ((control_file_fd= mysql_file_create(key_file_control, name, 0,
|
if ((control_file_fd= mysql_file_create(key_file_control, name, 0,
|
||||||
@@ -157,7 +159,9 @@ static CONTROL_FILE_ERROR create_control_file(const char *name,
|
|||||||
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE;
|
cf_changeable_size= CF_CHANGEABLE_TOTAL_SIZE;
|
||||||
|
|
||||||
/* Create unique uuid for the control file */
|
/* Create unique uuid for the control file */
|
||||||
my_uuid_init((ulong) &buffer, (ulong) &maria_uuid);
|
my_random_bytes((uchar *)&rnd1, sizeof (rnd1));
|
||||||
|
my_random_bytes((uchar *)&rnd2, sizeof (rnd2));
|
||||||
|
my_uuid_init(rnd1, rnd2);
|
||||||
my_uuid(maria_uuid);
|
my_uuid(maria_uuid);
|
||||||
|
|
||||||
/* Prepare and write the file header */
|
/* Prepare and write the file header */
|
||||||
|
@@ -559,9 +559,9 @@ static int del(MARIA_HA *info, MARIA_KEY *key,
|
|||||||
MARIA_KEY ret_key;
|
MARIA_KEY ret_key;
|
||||||
MARIA_PAGE next_page;
|
MARIA_PAGE next_page;
|
||||||
DBUG_ENTER("del");
|
DBUG_ENTER("del");
|
||||||
DBUG_PRINT("enter",("leaf_page: %lu keypos: 0x%lx",
|
DBUG_PRINT("enter",("leaf_page: %lu keypos: %p",
|
||||||
(ulong) (leaf_page->pos / share->block_size),
|
(ulong) (leaf_page->pos / share->block_size),
|
||||||
(ulong) keypos));
|
keypos));
|
||||||
DBUG_DUMP("leaf_buff", leaf_page->buff, leaf_page->size);
|
DBUG_DUMP("leaf_buff", leaf_page->buff, leaf_page->size);
|
||||||
|
|
||||||
page_flag= leaf_page->flag;
|
page_flag= leaf_page->flag;
|
||||||
@@ -773,9 +773,9 @@ static int underflow(MARIA_HA *info, MARIA_KEYDEF *keyinfo,
|
|||||||
MARIA_KEY tmp_key, anc_key, leaf_key;
|
MARIA_KEY tmp_key, anc_key, leaf_key;
|
||||||
MARIA_PAGE next_page;
|
MARIA_PAGE next_page;
|
||||||
DBUG_ENTER("underflow");
|
DBUG_ENTER("underflow");
|
||||||
DBUG_PRINT("enter",("leaf_page: %lu keypos: 0x%lx",
|
DBUG_PRINT("enter",("leaf_page: %lu keypos: %p",
|
||||||
(ulong) (leaf_page->pos / share->block_size),
|
(ulong) (leaf_page->pos / share->block_size),
|
||||||
(ulong) keypos));
|
keypos));
|
||||||
DBUG_DUMP("anc_buff", anc_page->buff, anc_page->size);
|
DBUG_DUMP("anc_buff", anc_page->buff, anc_page->size);
|
||||||
DBUG_DUMP("leaf_buff", leaf_page->buff, leaf_page->size);
|
DBUG_DUMP("leaf_buff", leaf_page->buff, leaf_page->size);
|
||||||
|
|
||||||
@@ -918,8 +918,8 @@ static int underflow(MARIA_HA *info, MARIA_KEYDEF *keyinfo,
|
|||||||
|
|
||||||
anc_end_pos= anc_buff + new_anc_length;
|
anc_end_pos= anc_buff + new_anc_length;
|
||||||
|
|
||||||
DBUG_PRINT("test",("anc_buff: 0x%lx anc_end_pos: 0x%lx",
|
DBUG_PRINT("test",("anc_buff:%p anc_end_pos:%p",
|
||||||
(long) anc_buff, (long) anc_end_pos));
|
anc_buff, anc_end_pos));
|
||||||
|
|
||||||
if (!first_key && !_ma_get_last_key(&anc_key, anc_page, keypos))
|
if (!first_key && !_ma_get_last_key(&anc_key, anc_page, keypos))
|
||||||
goto err;
|
goto err;
|
||||||
@@ -1308,8 +1308,8 @@ static uint remove_key(MARIA_KEYDEF *keyinfo, uint page_flag, uint nod_flag,
|
|||||||
int s_length;
|
int s_length;
|
||||||
uchar *start;
|
uchar *start;
|
||||||
DBUG_ENTER("remove_key");
|
DBUG_ENTER("remove_key");
|
||||||
DBUG_PRINT("enter", ("keypos: 0x%lx page_end: 0x%lx",
|
DBUG_PRINT("enter", ("keypos:%p page_end: %p",
|
||||||
(long) keypos, (long) page_end));
|
keypos, page_end));
|
||||||
|
|
||||||
start= s_temp->key_pos= keypos;
|
start= s_temp->key_pos= keypos;
|
||||||
s_temp->changed_length= 0;
|
s_temp->changed_length= 0;
|
||||||
|
@@ -1343,8 +1343,8 @@ ulong _ma_rec_unpack(register MARIA_HA *info, register uchar *to, uchar *from,
|
|||||||
|
|
||||||
err:
|
err:
|
||||||
_ma_set_fatal_error(info->s, HA_ERR_WRONG_IN_RECORD);
|
_ma_set_fatal_error(info->s, HA_ERR_WRONG_IN_RECORD);
|
||||||
DBUG_PRINT("error",("to_end: 0x%lx -> 0x%lx from_end: 0x%lx -> 0x%lx",
|
DBUG_PRINT("error",("to_end: %p -> %p from_end: %p -> %p",
|
||||||
(long) to, (long) to_end, (long) from, (long) from_end));
|
to, to_end, from, from_end));
|
||||||
DBUG_DUMP("from", info->rec_buff, info->s->base.min_pack_length);
|
DBUG_DUMP("from", info->rec_buff, info->s->base.min_pack_length);
|
||||||
DBUG_RETURN(MY_FILE_ERROR);
|
DBUG_RETURN(MY_FILE_ERROR);
|
||||||
} /* _ma_rec_unpack */
|
} /* _ma_rec_unpack */
|
||||||
|
@@ -54,8 +54,8 @@ int maria_assign_to_pagecache(MARIA_HA *info,
|
|||||||
MARIA_SHARE* share= info->s;
|
MARIA_SHARE* share= info->s;
|
||||||
DBUG_ENTER("maria_assign_to_pagecache");
|
DBUG_ENTER("maria_assign_to_pagecache");
|
||||||
DBUG_PRINT("enter",
|
DBUG_PRINT("enter",
|
||||||
("old_pagecache_handle: 0x%lx new_pagecache_handle: 0x%lx",
|
("old_pagecache_handle:%p new_pagecache_handle:%p",
|
||||||
(long) share->pagecache, (long) pagecache));
|
share->pagecache, pagecache));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Skip operation if we didn't change key cache. This can happen if we
|
Skip operation if we didn't change key cache. This can happen if we
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -47,7 +47,8 @@ typedef TRANSLOG_ADDRESS LSN;
|
|||||||
#define LSN_FILE_NO_PART(L) ((L) & ((int64)0xFFFFFF00000000LL))
|
#define LSN_FILE_NO_PART(L) ((L) & ((int64)0xFFFFFF00000000LL))
|
||||||
|
|
||||||
/* Parts of LSN for printing */
|
/* Parts of LSN for printing */
|
||||||
#define LSN_IN_PARTS(L) (ulong)LSN_FILE_NO(L),(ulong)LSN_OFFSET(L)
|
#define LSN_IN_PARTS(L) (uint)LSN_FILE_NO(L),(uint)LSN_OFFSET(L)
|
||||||
|
#define LSN_FMT "(%u,0x%x)"
|
||||||
|
|
||||||
/* Gets record offset of a LSN/log address */
|
/* Gets record offset of a LSN/log address */
|
||||||
#define LSN_OFFSET(L) (ulong) ((L) & 0xFFFFFFFFL)
|
#define LSN_OFFSET(L) (ulong) ((L) & 0xFFFFFFFFL)
|
||||||
|
@@ -1383,7 +1383,7 @@ uint _ma_state_info_write(MARIA_SHARE *share, uint pWrite)
|
|||||||
is too new). Recovery does it by itself.
|
is too new). Recovery does it by itself.
|
||||||
*/
|
*/
|
||||||
share->state.is_of_horizon= translog_get_horizon();
|
share->state.is_of_horizon= translog_get_horizon();
|
||||||
DBUG_PRINT("info", ("is_of_horizon set to LSN (%lu,0x%lx)",
|
DBUG_PRINT("info", ("is_of_horizon set to LSN " LSN_FMT,
|
||||||
LSN_IN_PARTS(share->state.is_of_horizon)));
|
LSN_IN_PARTS(share->state.is_of_horizon)));
|
||||||
}
|
}
|
||||||
res= _ma_state_info_write_sub(share->kfile.file, &share->state, pWrite);
|
res= _ma_state_info_write_sub(share->kfile.file, &share->state, pWrite);
|
||||||
|
@@ -544,8 +544,8 @@ my_bool _ma_compact_keypage(MARIA_PAGE *ma_page, TrID min_read_from)
|
|||||||
{
|
{
|
||||||
if (!(page= (*ma_page->keyinfo->skip_key)(&key, 0, 0, page)))
|
if (!(page= (*ma_page->keyinfo->skip_key)(&key, 0, 0, page)))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",("Couldn't find last key: page_pos: 0x%lx",
|
DBUG_PRINT("error",("Couldn't find last key: page_pos: %p",
|
||||||
(long) page));
|
page));
|
||||||
_ma_set_fatal_error(share, HA_ERR_CRASHED);
|
_ma_set_fatal_error(share, HA_ERR_CRASHED);
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
}
|
}
|
||||||
|
@@ -97,10 +97,10 @@
|
|||||||
|
|
||||||
#define PCBLOCK_INFO(B) \
|
#define PCBLOCK_INFO(B) \
|
||||||
DBUG_PRINT("info", \
|
DBUG_PRINT("info", \
|
||||||
("block: 0x%lx fd: %lu page: %lu status: 0x%x " \
|
("block: %p fd: %lu page: %lu status: 0x%x " \
|
||||||
"hshL: 0x%lx requests: %u/%u wrlocks: %u rdlocks: %u " \
|
"hshL: %p requests: %u/%u wrlocks: %u rdlocks: %u " \
|
||||||
"rdlocks_q: %u pins: %u type: %s", \
|
"rdlocks_q: %u pins: %u type: %s", \
|
||||||
(ulong)(B), \
|
(B), \
|
||||||
(ulong)((B)->hash_link ? \
|
(ulong)((B)->hash_link ? \
|
||||||
(B)->hash_link->file.file : \
|
(B)->hash_link->file.file : \
|
||||||
0), \
|
0), \
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
(B)->hash_link->pageno : \
|
(B)->hash_link->pageno : \
|
||||||
0), \
|
0), \
|
||||||
(uint) (B)->status, \
|
(uint) (B)->status, \
|
||||||
(ulong)(B)->hash_link, \
|
(B)->hash_link, \
|
||||||
(uint) (B)->requests, \
|
(uint) (B)->requests, \
|
||||||
(uint)((B)->hash_link ? \
|
(uint)((B)->hash_link ? \
|
||||||
(B)->hash_link->requests : \
|
(B)->hash_link->requests : \
|
||||||
@@ -659,9 +659,9 @@ static my_bool pagecache_fwrite(PAGECACHE *pagecache,
|
|||||||
/* Todo: Integrate this with write_callback so we have only one callback */
|
/* Todo: Integrate this with write_callback so we have only one callback */
|
||||||
if ((*filedesc->flush_log_callback)(&args))
|
if ((*filedesc->flush_log_callback)(&args))
|
||||||
DBUG_RETURN(1);
|
DBUG_RETURN(1);
|
||||||
DBUG_PRINT("info", ("pre_write_hook: 0x%lx data: 0x%lx",
|
DBUG_PRINT("info", ("pre_write_hook:%p data: %p",
|
||||||
(ulong) filedesc->pre_write_hook,
|
filedesc->pre_write_hook,
|
||||||
(ulong) filedesc->callback_data));
|
filedesc->callback_data));
|
||||||
if ((*filedesc->pre_write_hook)(&args))
|
if ((*filedesc->pre_write_hook)(&args))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error", ("write callback problem"));
|
DBUG_PRINT("error", ("write callback problem"));
|
||||||
@@ -2789,7 +2789,7 @@ static void check_and_set_lsn(PAGECACHE *pagecache,
|
|||||||
*/
|
*/
|
||||||
DBUG_ASSERT((block->type == PAGECACHE_LSN_PAGE) || maria_in_recovery);
|
DBUG_ASSERT((block->type == PAGECACHE_LSN_PAGE) || maria_in_recovery);
|
||||||
old= lsn_korr(block->buffer);
|
old= lsn_korr(block->buffer);
|
||||||
DBUG_PRINT("info", ("old lsn: (%lu, 0x%lx) new lsn: (%lu, 0x%lx)",
|
DBUG_PRINT("info", ("old lsn: " LSN_FMT " new lsn: " LSN_FMT,
|
||||||
LSN_IN_PARTS(old), LSN_IN_PARTS(lsn)));
|
LSN_IN_PARTS(old), LSN_IN_PARTS(lsn)));
|
||||||
if (cmp_translog_addr(lsn, old) > 0)
|
if (cmp_translog_addr(lsn, old) > 0)
|
||||||
{
|
{
|
||||||
@@ -3832,8 +3832,8 @@ restart:
|
|||||||
block= page_link->block;
|
block= page_link->block;
|
||||||
if (block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH))
|
if (block->status & (PCBLOCK_REASSIGNED | PCBLOCK_IN_SWITCH))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("info", ("Block 0x%0lx already is %s",
|
DBUG_PRINT("info", ("Block %p already is %s",
|
||||||
(ulong) block,
|
block,
|
||||||
((block->status & PCBLOCK_REASSIGNED) ?
|
((block->status & PCBLOCK_REASSIGNED) ?
|
||||||
"reassigned" : "in switch")));
|
"reassigned" : "in switch")));
|
||||||
PCBLOCK_INFO(block);
|
PCBLOCK_INFO(block);
|
||||||
|
@@ -558,7 +558,7 @@ static void display_record_position(const LOG_DESC *log_desc,
|
|||||||
form a group, so we indent below the group's end record
|
form a group, so we indent below the group's end record
|
||||||
*/
|
*/
|
||||||
tprint(tracef,
|
tprint(tracef,
|
||||||
"%sRec#%u LSN (%lu,0x%lx) short_trid %u %s(num_type:%u) len %lu\n",
|
"%sRec#%u LSN " LSN_FMT " short_trid %u %s(num_type:%u) len %lu\n",
|
||||||
number ? "" : " ", number, LSN_IN_PARTS(rec->lsn),
|
number ? "" : " ", number, LSN_IN_PARTS(rec->lsn),
|
||||||
rec->short_trid, log_desc->name, rec->type,
|
rec->short_trid, log_desc->name, rec->type,
|
||||||
(ulong)rec->record_length);
|
(ulong)rec->record_length);
|
||||||
@@ -617,7 +617,7 @@ prototype_redo_exec_hook(LONG_TRANSACTION_ID)
|
|||||||
llstr(long_trid, llbuf);
|
llstr(long_trid, llbuf);
|
||||||
eprint(tracef, "Found an old transaction long_trid %s short_trid %u"
|
eprint(tracef, "Found an old transaction long_trid %s short_trid %u"
|
||||||
" with same short id as this new transaction, and has neither"
|
" with same short id as this new transaction, and has neither"
|
||||||
" committed nor rollback (undo_lsn: (%lu,0x%lx))",
|
" committed nor rollback (undo_lsn: " LSN_FMT ")",
|
||||||
llbuf, sid, LSN_IN_PARTS(ulsn));
|
llbuf, sid, LSN_IN_PARTS(ulsn));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
@@ -640,7 +640,7 @@ static void new_transaction(uint16 sid, TrID long_id, LSN undo_lsn,
|
|||||||
all_active_trans[sid].long_trid= long_id;
|
all_active_trans[sid].long_trid= long_id;
|
||||||
llstr(long_id, llbuf);
|
llstr(long_id, llbuf);
|
||||||
tprint(tracef, "Transaction long_trid %s short_trid %u starts,"
|
tprint(tracef, "Transaction long_trid %s short_trid %u starts,"
|
||||||
" undo_lsn (%lu,0x%lx) first_undo_lsn (%lu,0x%lx)\n",
|
" undo_lsn " LSN_FMT " first_undo_lsn " LSN_FMT "\n",
|
||||||
llbuf, sid, LSN_IN_PARTS(undo_lsn), LSN_IN_PARTS(first_undo_lsn));
|
llbuf, sid, LSN_IN_PARTS(undo_lsn), LSN_IN_PARTS(first_undo_lsn));
|
||||||
all_active_trans[sid].undo_lsn= undo_lsn;
|
all_active_trans[sid].undo_lsn= undo_lsn;
|
||||||
all_active_trans[sid].first_undo_lsn= first_undo_lsn;
|
all_active_trans[sid].first_undo_lsn= first_undo_lsn;
|
||||||
@@ -833,7 +833,7 @@ prototype_redo_exec_hook(REDO_CREATE_TABLE)
|
|||||||
}
|
}
|
||||||
if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0)
|
if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0)
|
||||||
{
|
{
|
||||||
tprint(tracef, "Table '%s' has create_rename_lsn (%lu,0x%lx) more "
|
tprint(tracef, "Table '%s' has create_rename_lsn " LSN_FMT " more "
|
||||||
"recent than record, ignoring creation",
|
"recent than record, ignoring creation",
|
||||||
name, LSN_IN_PARTS(share->state.create_rename_lsn));
|
name, LSN_IN_PARTS(share->state.create_rename_lsn));
|
||||||
error= 0;
|
error= 0;
|
||||||
@@ -1009,7 +1009,7 @@ prototype_redo_exec_hook(REDO_RENAME_TABLE)
|
|||||||
}
|
}
|
||||||
if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0)
|
if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0)
|
||||||
{
|
{
|
||||||
tprint(tracef, ", has create_rename_lsn (%lu,0x%lx) more recent than"
|
tprint(tracef, ", has create_rename_lsn " LSN_FMT " more recent than"
|
||||||
" record, ignoring renaming",
|
" record, ignoring renaming",
|
||||||
LSN_IN_PARTS(share->state.create_rename_lsn));
|
LSN_IN_PARTS(share->state.create_rename_lsn));
|
||||||
error= 0;
|
error= 0;
|
||||||
@@ -1064,7 +1064,7 @@ prototype_redo_exec_hook(REDO_RENAME_TABLE)
|
|||||||
}
|
}
|
||||||
if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0)
|
if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0)
|
||||||
{
|
{
|
||||||
tprint(tracef, ", has create_rename_lsn (%lu,0x%lx) more recent than"
|
tprint(tracef, ", has create_rename_lsn " LSN_FMT " more recent than"
|
||||||
" record, ignoring renaming",
|
" record, ignoring renaming",
|
||||||
LSN_IN_PARTS(share->state.create_rename_lsn));
|
LSN_IN_PARTS(share->state.create_rename_lsn));
|
||||||
/*
|
/*
|
||||||
@@ -1233,7 +1233,7 @@ prototype_redo_exec_hook(REDO_DROP_TABLE)
|
|||||||
}
|
}
|
||||||
if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0)
|
if (cmp_translog_addr(share->state.create_rename_lsn, rec->lsn) >= 0)
|
||||||
{
|
{
|
||||||
tprint(tracef, ", has create_rename_lsn (%lu,0x%lx) more recent than"
|
tprint(tracef, ", has create_rename_lsn " LSN_FMT " more recent than"
|
||||||
" record, ignoring removal",
|
" record, ignoring removal",
|
||||||
LSN_IN_PARTS(share->state.create_rename_lsn));
|
LSN_IN_PARTS(share->state.create_rename_lsn));
|
||||||
error= 0;
|
error= 0;
|
||||||
@@ -1403,8 +1403,8 @@ static int new_table(uint16 sid, const char *name, LSN lsn_of_file_id)
|
|||||||
}
|
}
|
||||||
if (cmp_translog_addr(lsn_of_file_id, share->state.create_rename_lsn) <= 0)
|
if (cmp_translog_addr(lsn_of_file_id, share->state.create_rename_lsn) <= 0)
|
||||||
{
|
{
|
||||||
tprint(tracef, ", has create_rename_lsn (%lu,0x%lx) more recent than"
|
tprint(tracef, ", has create_rename_lsn " LSN_FMT " more recent than"
|
||||||
" LOGREC_FILE_ID's LSN (%lu,0x%lx), ignoring open request",
|
" LOGREC_FILE_ID's LSN " LSN_FMT ", ignoring open request",
|
||||||
LSN_IN_PARTS(share->state.create_rename_lsn),
|
LSN_IN_PARTS(share->state.create_rename_lsn),
|
||||||
LSN_IN_PARTS(lsn_of_file_id));
|
LSN_IN_PARTS(lsn_of_file_id));
|
||||||
recovery_warnings++;
|
recovery_warnings++;
|
||||||
@@ -1873,7 +1873,7 @@ prototype_redo_exec_hook(UNDO_ROW_INSERT)
|
|||||||
share= info->s;
|
share= info->s;
|
||||||
if (cmp_translog_addr(rec->lsn, share->state.is_of_horizon) >= 0)
|
if (cmp_translog_addr(rec->lsn, share->state.is_of_horizon) >= 0)
|
||||||
{
|
{
|
||||||
tprint(tracef, " state has LSN (%lu,0x%lx) older than record, updating"
|
tprint(tracef, " state has LSN " LSN_FMT " older than record, updating"
|
||||||
" rows' count\n", LSN_IN_PARTS(share->state.is_of_horizon));
|
" rows' count\n", LSN_IN_PARTS(share->state.is_of_horizon));
|
||||||
share->state.state.records++;
|
share->state.state.records++;
|
||||||
if (share->calc_checksum)
|
if (share->calc_checksum)
|
||||||
@@ -2136,7 +2136,7 @@ prototype_redo_exec_hook(CLR_END)
|
|||||||
if (info == NULL)
|
if (info == NULL)
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
share= info->s;
|
share= info->s;
|
||||||
tprint(tracef, " CLR_END was about %s, undo_lsn now LSN (%lu,0x%lx)\n",
|
tprint(tracef, " CLR_END was about %s, undo_lsn now LSN " LSN_FMT "\n",
|
||||||
log_desc->name, LSN_IN_PARTS(previous_undo_lsn));
|
log_desc->name, LSN_IN_PARTS(previous_undo_lsn));
|
||||||
|
|
||||||
enlarge_buffer(rec);
|
enlarge_buffer(rec);
|
||||||
@@ -2296,7 +2296,7 @@ prototype_undo_exec_hook(UNDO_ROW_INSERT)
|
|||||||
info->trn= 0;
|
info->trn= 0;
|
||||||
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
||||||
tprint(tracef, " rows' count %lu\n", (ulong)info->s->state.state.records);
|
tprint(tracef, " rows' count %lu\n", (ulong)info->s->state.state.records);
|
||||||
tprint(tracef, " undo_lsn now LSN (%lu,0x%lx)\n",
|
tprint(tracef, " undo_lsn now LSN " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(trn->undo_lsn));
|
LSN_IN_PARTS(trn->undo_lsn));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -2335,7 +2335,7 @@ prototype_undo_exec_hook(UNDO_ROW_DELETE)
|
|||||||
rec->record_length -
|
rec->record_length -
|
||||||
(LSN_STORE_SIZE + FILEID_STORE_SIZE));
|
(LSN_STORE_SIZE + FILEID_STORE_SIZE));
|
||||||
info->trn= 0;
|
info->trn= 0;
|
||||||
tprint(tracef, " rows' count %lu\n undo_lsn now LSN (%lu,0x%lx)\n",
|
tprint(tracef, " rows' count %lu\n undo_lsn now LSN " LSN_FMT "\n",
|
||||||
(ulong)share->state.state.records, LSN_IN_PARTS(trn->undo_lsn));
|
(ulong)share->state.state.records, LSN_IN_PARTS(trn->undo_lsn));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -2374,7 +2374,7 @@ prototype_undo_exec_hook(UNDO_ROW_UPDATE)
|
|||||||
rec->record_length -
|
rec->record_length -
|
||||||
(LSN_STORE_SIZE + FILEID_STORE_SIZE));
|
(LSN_STORE_SIZE + FILEID_STORE_SIZE));
|
||||||
info->trn= 0;
|
info->trn= 0;
|
||||||
tprint(tracef, " undo_lsn now LSN (%lu,0x%lx)\n",
|
tprint(tracef, " undo_lsn now LSN " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(trn->undo_lsn));
|
LSN_IN_PARTS(trn->undo_lsn));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -2415,7 +2415,7 @@ prototype_undo_exec_hook(UNDO_KEY_INSERT)
|
|||||||
FILEID_STORE_SIZE);
|
FILEID_STORE_SIZE);
|
||||||
info->trn= 0;
|
info->trn= 0;
|
||||||
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
||||||
tprint(tracef, " undo_lsn now LSN (%lu,0x%lx)\n",
|
tprint(tracef, " undo_lsn now LSN " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(trn->undo_lsn));
|
LSN_IN_PARTS(trn->undo_lsn));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -2456,7 +2456,7 @@ prototype_undo_exec_hook(UNDO_KEY_DELETE)
|
|||||||
FILEID_STORE_SIZE, FALSE);
|
FILEID_STORE_SIZE, FALSE);
|
||||||
info->trn= 0;
|
info->trn= 0;
|
||||||
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
||||||
tprint(tracef, " undo_lsn now LSN (%lu,0x%lx)\n",
|
tprint(tracef, " undo_lsn now LSN " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(trn->undo_lsn));
|
LSN_IN_PARTS(trn->undo_lsn));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -2497,7 +2497,7 @@ prototype_undo_exec_hook(UNDO_KEY_DELETE_WITH_ROOT)
|
|||||||
FILEID_STORE_SIZE, TRUE);
|
FILEID_STORE_SIZE, TRUE);
|
||||||
info->trn= 0;
|
info->trn= 0;
|
||||||
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
||||||
tprint(tracef, " undo_lsn now LSN (%lu,0x%lx)\n",
|
tprint(tracef, " undo_lsn now LSN " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(trn->undo_lsn));
|
LSN_IN_PARTS(trn->undo_lsn));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -2525,7 +2525,7 @@ prototype_undo_exec_hook(UNDO_BULK_INSERT)
|
|||||||
error= _ma_apply_undo_bulk_insert(info, previous_undo_lsn);
|
error= _ma_apply_undo_bulk_insert(info, previous_undo_lsn);
|
||||||
info->trn= 0;
|
info->trn= 0;
|
||||||
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
/* trn->undo_lsn is updated in an inwrite_hook when writing the CLR_END */
|
||||||
tprint(tracef, " undo_lsn now LSN (%lu,0x%lx)\n",
|
tprint(tracef, " undo_lsn now LSN " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(trn->undo_lsn));
|
LSN_IN_PARTS(trn->undo_lsn));
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
@@ -2663,7 +2663,7 @@ static int run_redo_phase(LSN lsn, LSN lsn_end, enum maria_apply_log_way apply)
|
|||||||
if (lsn_end != LSN_IMPOSSIBLE && rec2.lsn >= lsn_end)
|
if (lsn_end != LSN_IMPOSSIBLE && rec2.lsn >= lsn_end)
|
||||||
{
|
{
|
||||||
tprint(tracef,
|
tprint(tracef,
|
||||||
"lsn_end reached at (%lu,0x%lx). "
|
"lsn_end reached at " LSN_FMT ". "
|
||||||
"Skipping rest of redo entries",
|
"Skipping rest of redo entries",
|
||||||
LSN_IN_PARTS(rec2.lsn));
|
LSN_IN_PARTS(rec2.lsn));
|
||||||
translog_destroy_scanner(&scanner);
|
translog_destroy_scanner(&scanner);
|
||||||
@@ -2818,7 +2818,7 @@ static uint end_of_redo_phase(my_bool prepare_for_undo_phase)
|
|||||||
TRN *trn;
|
TRN *trn;
|
||||||
if (gslsn != LSN_IMPOSSIBLE)
|
if (gslsn != LSN_IMPOSSIBLE)
|
||||||
{
|
{
|
||||||
tprint(tracef, "Group at LSN (%lu,0x%lx) short_trid %u incomplete\n",
|
tprint(tracef, "Group at LSN " LSN_FMT " short_trid %u incomplete\n",
|
||||||
LSN_IN_PARTS(gslsn), sid);
|
LSN_IN_PARTS(gslsn), sid);
|
||||||
all_active_trans[sid].group_start_lsn= LSN_IMPOSSIBLE;
|
all_active_trans[sid].group_start_lsn= LSN_IMPOSSIBLE;
|
||||||
}
|
}
|
||||||
@@ -3109,7 +3109,7 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const
|
|||||||
table was).
|
table was).
|
||||||
*/
|
*/
|
||||||
DBUG_ASSERT(cmp_translog_addr(rec->lsn, checkpoint_start) < 0);
|
DBUG_ASSERT(cmp_translog_addr(rec->lsn, checkpoint_start) < 0);
|
||||||
tprint(tracef, ", table's LOGREC_FILE_ID has LSN (%lu,0x%lx) more recent"
|
tprint(tracef, ", table's LOGREC_FILE_ID has LSN " LSN_FMT " more recent"
|
||||||
" than record, skipping record",
|
" than record, skipping record",
|
||||||
LSN_IN_PARTS(share->lsn_of_file_id));
|
LSN_IN_PARTS(share->lsn_of_file_id));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3117,7 +3117,7 @@ static MARIA_HA *get_MARIA_HA_from_REDO_record(const
|
|||||||
if (cmp_translog_addr(rec->lsn, share->state.skip_redo_lsn) <= 0)
|
if (cmp_translog_addr(rec->lsn, share->state.skip_redo_lsn) <= 0)
|
||||||
{
|
{
|
||||||
/* probably a bulk insert repair */
|
/* probably a bulk insert repair */
|
||||||
tprint(tracef, ", has skip_redo_lsn (%lu,0x%lx) more recent than"
|
tprint(tracef, ", has skip_redo_lsn " LSN_FMT " more recent than"
|
||||||
" record, skipping record\n",
|
" record, skipping record\n",
|
||||||
LSN_IN_PARTS(share->state.skip_redo_lsn));
|
LSN_IN_PARTS(share->state.skip_redo_lsn));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3176,7 +3176,7 @@ static MARIA_HA *get_MARIA_HA_from_UNDO_record(const
|
|||||||
|
|
||||||
if (cmp_translog_addr(rec->lsn, share->lsn_of_file_id) <= 0)
|
if (cmp_translog_addr(rec->lsn, share->lsn_of_file_id) <= 0)
|
||||||
{
|
{
|
||||||
tprint(tracef, ", table's LOGREC_FILE_ID has LSN (%lu,0x%lx) more recent"
|
tprint(tracef, ", table's LOGREC_FILE_ID has LSN " LSN_FMT " more recent"
|
||||||
" than record, skipping record",
|
" than record, skipping record",
|
||||||
LSN_IN_PARTS(share->lsn_of_file_id));
|
LSN_IN_PARTS(share->lsn_of_file_id));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3185,7 +3185,7 @@ static MARIA_HA *get_MARIA_HA_from_UNDO_record(const
|
|||||||
cmp_translog_addr(rec->lsn, share->state.skip_redo_lsn) <= 0)
|
cmp_translog_addr(rec->lsn, share->state.skip_redo_lsn) <= 0)
|
||||||
{
|
{
|
||||||
/* probably a bulk insert repair */
|
/* probably a bulk insert repair */
|
||||||
tprint(tracef, ", has skip_redo_lsn (%lu,0x%lx) more recent than"
|
tprint(tracef, ", has skip_redo_lsn " LSN_FMT " more recent than"
|
||||||
" record, skipping record\n",
|
" record, skipping record\n",
|
||||||
LSN_IN_PARTS(share->state.skip_redo_lsn));
|
LSN_IN_PARTS(share->state.skip_redo_lsn));
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -3220,12 +3220,12 @@ static LSN parse_checkpoint_record(LSN lsn)
|
|||||||
LSN minimum_rec_lsn_of_active_transactions, minimum_rec_lsn_of_dirty_pages;
|
LSN minimum_rec_lsn_of_active_transactions, minimum_rec_lsn_of_dirty_pages;
|
||||||
struct st_dirty_page *next_dirty_page_in_pool;
|
struct st_dirty_page *next_dirty_page_in_pool;
|
||||||
|
|
||||||
tprint(tracef, "Loading data from checkpoint record at LSN (%lu,0x%lx)\n",
|
tprint(tracef, "Loading data from checkpoint record at LSN " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(lsn));
|
LSN_IN_PARTS(lsn));
|
||||||
if ((len= translog_read_record_header(lsn, &rec)) == RECHEADER_READ_ERROR ||
|
if ((len= translog_read_record_header(lsn, &rec)) == RECHEADER_READ_ERROR ||
|
||||||
rec.type != LOGREC_CHECKPOINT)
|
rec.type != LOGREC_CHECKPOINT)
|
||||||
{
|
{
|
||||||
eprint(tracef, "Cannot find checkpoint record at LSN (%lu,0x%lx)",
|
eprint(tracef, "Cannot find checkpoint record at LSN " LSN_FMT,
|
||||||
LSN_IN_PARTS(lsn));
|
LSN_IN_PARTS(lsn));
|
||||||
return LSN_ERROR;
|
return LSN_ERROR;
|
||||||
}
|
}
|
||||||
@@ -3243,7 +3243,7 @@ static LSN parse_checkpoint_record(LSN lsn)
|
|||||||
ptr= log_record_buffer.str;
|
ptr= log_record_buffer.str;
|
||||||
start_address= lsn_korr(ptr);
|
start_address= lsn_korr(ptr);
|
||||||
ptr+= LSN_STORE_SIZE;
|
ptr+= LSN_STORE_SIZE;
|
||||||
tprint(tracef, "Checkpoint record has start_horizon at (%lu,0x%lx)\n",
|
tprint(tracef, "Checkpoint record has start_horizon at " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(start_address));
|
LSN_IN_PARTS(start_address));
|
||||||
|
|
||||||
/* transactions */
|
/* transactions */
|
||||||
@@ -3261,7 +3261,7 @@ static LSN parse_checkpoint_record(LSN lsn)
|
|||||||
takes to write one or a few rows, roughly).
|
takes to write one or a few rows, roughly).
|
||||||
*/
|
*/
|
||||||
tprint(tracef, "Checkpoint record has min_rec_lsn of active transactions"
|
tprint(tracef, "Checkpoint record has min_rec_lsn of active transactions"
|
||||||
" at (%lu,0x%lx)\n",
|
" at " LSN_FMT "\n",
|
||||||
LSN_IN_PARTS(minimum_rec_lsn_of_active_transactions));
|
LSN_IN_PARTS(minimum_rec_lsn_of_active_transactions));
|
||||||
set_if_smaller(start_address, minimum_rec_lsn_of_active_transactions);
|
set_if_smaller(start_address, minimum_rec_lsn_of_active_transactions);
|
||||||
|
|
||||||
@@ -3372,7 +3372,7 @@ static LSN parse_checkpoint_record(LSN lsn)
|
|||||||
start_address= checkpoint_start=
|
start_address= checkpoint_start=
|
||||||
translog_next_LSN(start_address, LSN_IMPOSSIBLE);
|
translog_next_LSN(start_address, LSN_IMPOSSIBLE);
|
||||||
tprint(tracef, "Checkpoint record start_horizon now adjusted to"
|
tprint(tracef, "Checkpoint record start_horizon now adjusted to"
|
||||||
" LSN (%lu,0x%lx)\n", LSN_IN_PARTS(start_address));
|
" LSN " LSN_FMT "\n", LSN_IN_PARTS(start_address));
|
||||||
if (checkpoint_start == LSN_IMPOSSIBLE)
|
if (checkpoint_start == LSN_IMPOSSIBLE)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -3383,10 +3383,10 @@ static LSN parse_checkpoint_record(LSN lsn)
|
|||||||
}
|
}
|
||||||
/* now, where the REDO phase should start reading log: */
|
/* now, where the REDO phase should start reading log: */
|
||||||
tprint(tracef, "Checkpoint has min_rec_lsn of dirty pages at"
|
tprint(tracef, "Checkpoint has min_rec_lsn of dirty pages at"
|
||||||
" LSN (%lu,0x%lx)\n", LSN_IN_PARTS(minimum_rec_lsn_of_dirty_pages));
|
" LSN " LSN_FMT "\n", LSN_IN_PARTS(minimum_rec_lsn_of_dirty_pages));
|
||||||
set_if_smaller(start_address, minimum_rec_lsn_of_dirty_pages);
|
set_if_smaller(start_address, minimum_rec_lsn_of_dirty_pages);
|
||||||
DBUG_PRINT("info",
|
DBUG_PRINT("info",
|
||||||
("checkpoint_start: (%lu,0x%lx) start_address: (%lu,0x%lx)",
|
("checkpoint_start: " LSN_FMT " start_address: " LSN_FMT,
|
||||||
LSN_IN_PARTS(checkpoint_start), LSN_IN_PARTS(start_address)));
|
LSN_IN_PARTS(checkpoint_start), LSN_IN_PARTS(start_address)));
|
||||||
return start_address;
|
return start_address;
|
||||||
}
|
}
|
||||||
|
@@ -36,8 +36,8 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data,
|
|||||||
MARIA_KEY key;
|
MARIA_KEY key;
|
||||||
ICP_RESULT icp_res= ICP_MATCH;
|
ICP_RESULT icp_res= ICP_MATCH;
|
||||||
DBUG_ENTER("maria_rkey");
|
DBUG_ENTER("maria_rkey");
|
||||||
DBUG_PRINT("enter", ("base: 0x%lx buf: 0x%lx inx: %d search_flag: %d",
|
DBUG_PRINT("enter", ("base:%p buf:%p inx: %d search_flag: %d",
|
||||||
(long) info, (long) buf, inx, search_flag));
|
info, buf, inx, search_flag));
|
||||||
|
|
||||||
if ((inx = _ma_check_index(info,inx)) < 0)
|
if ((inx = _ma_check_index(info,inx)) < 0)
|
||||||
DBUG_RETURN(my_errno);
|
DBUG_RETURN(my_errno);
|
||||||
|
@@ -308,7 +308,7 @@ static my_bool _ma_log_rt_split(MARIA_PAGE *page,
|
|||||||
uint translog_parts, extra_length= 0;
|
uint translog_parts, extra_length= 0;
|
||||||
my_off_t page_pos;
|
my_off_t page_pos;
|
||||||
DBUG_ENTER("_ma_log_rt_split");
|
DBUG_ENTER("_ma_log_rt_split");
|
||||||
DBUG_PRINT("enter", ("page: %lu", (ulong) page));
|
DBUG_PRINT("enter", ("page: %p", page));
|
||||||
|
|
||||||
DBUG_ASSERT(share->now_transactional);
|
DBUG_ASSERT(share->now_transactional);
|
||||||
page_pos= page->pos / share->block_size;
|
page_pos= page->pos / share->block_size;
|
||||||
|
@@ -380,8 +380,8 @@ int _ma_seq_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
|||||||
{
|
{
|
||||||
_ma_set_fatal_error(share, HA_ERR_CRASHED);
|
_ma_set_fatal_error(share, HA_ERR_CRASHED);
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("Found wrong key: length: %u page: 0x%lx end: 0x%lx",
|
("Found wrong key: length: %u page: %p end: %p",
|
||||||
length, (long) page, (long) end));
|
length, page, end));
|
||||||
DBUG_RETURN(MARIA_FOUND_WRONG_KEY);
|
DBUG_RETURN(MARIA_FOUND_WRONG_KEY);
|
||||||
}
|
}
|
||||||
if ((flag= ha_key_cmp(keyinfo->seg, t_buff, key->data,
|
if ((flag= ha_key_cmp(keyinfo->seg, t_buff, key->data,
|
||||||
@@ -389,15 +389,15 @@ int _ma_seq_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
|||||||
comp_flag | tmp_key.flag,
|
comp_flag | tmp_key.flag,
|
||||||
not_used)) >= 0)
|
not_used)) >= 0)
|
||||||
break;
|
break;
|
||||||
DBUG_PRINT("loop_extra",("page: 0x%lx key: '%s' flag: %d",
|
DBUG_PRINT("loop_extra",("page:%p key: '%s' flag: %d",
|
||||||
(long) page, t_buff, flag));
|
page, t_buff, flag));
|
||||||
memcpy(buff,t_buff,length);
|
memcpy(buff,t_buff,length);
|
||||||
*ret_pos=page;
|
*ret_pos=page;
|
||||||
}
|
}
|
||||||
if (flag == 0)
|
if (flag == 0)
|
||||||
memcpy(buff,t_buff,length); /* Result is first key */
|
memcpy(buff,t_buff,length); /* Result is first key */
|
||||||
*last_key= page == end;
|
*last_key= page == end;
|
||||||
DBUG_PRINT("exit",("flag: %d ret_pos: 0x%lx", flag, (long) *ret_pos));
|
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
|
||||||
DBUG_RETURN(flag);
|
DBUG_RETURN(flag);
|
||||||
} /* _ma_seq_search */
|
} /* _ma_seq_search */
|
||||||
|
|
||||||
@@ -555,8 +555,8 @@ int _ma_prefix_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
|||||||
{
|
{
|
||||||
_ma_set_fatal_error(share, HA_ERR_CRASHED);
|
_ma_set_fatal_error(share, HA_ERR_CRASHED);
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("Found wrong key: length: %u page: 0x%lx end: %lx",
|
("Found wrong key: length: %u page: %p end: %p",
|
||||||
length, (long) page, (long) end));
|
length, page, end));
|
||||||
DBUG_RETURN(MARIA_FOUND_WRONG_KEY);
|
DBUG_RETURN(MARIA_FOUND_WRONG_KEY);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -692,7 +692,7 @@ int _ma_prefix_search(const MARIA_KEY *key, const MARIA_PAGE *ma_page,
|
|||||||
|
|
||||||
*last_key= page == end;
|
*last_key= page == end;
|
||||||
|
|
||||||
DBUG_PRINT("exit",("flag: %d ret_pos: 0x%lx", flag, (long) *ret_pos));
|
DBUG_PRINT("exit",("flag: %d ret_pos: %p", flag, *ret_pos));
|
||||||
DBUG_RETURN(flag);
|
DBUG_RETURN(flag);
|
||||||
} /* _ma_prefix_search */
|
} /* _ma_prefix_search */
|
||||||
|
|
||||||
@@ -1047,8 +1047,8 @@ uint _ma_get_pack_key(MARIA_KEY *int_key, uint page_flag,
|
|||||||
if (length > keyseg->length)
|
if (length > keyseg->length)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("Found too long null packed key: %u of %u at 0x%lx",
|
("Found too long null packed key: %u of %u at %p",
|
||||||
length, keyseg->length, (long) *page_pos));
|
length, keyseg->length, *page_pos));
|
||||||
DBUG_DUMP("key", *page_pos, 16);
|
DBUG_DUMP("key", *page_pos, 16);
|
||||||
_ma_set_fatal_error(keyinfo->share, HA_ERR_CRASHED);
|
_ma_set_fatal_error(keyinfo->share, HA_ERR_CRASHED);
|
||||||
return 0;
|
return 0;
|
||||||
@@ -1104,8 +1104,8 @@ uint _ma_get_pack_key(MARIA_KEY *int_key, uint page_flag,
|
|||||||
}
|
}
|
||||||
if (length > (uint) keyseg->length)
|
if (length > (uint) keyseg->length)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",("Found too long packed key: %u of %u at 0x%lx",
|
DBUG_PRINT("error",("Found too long packed key: %u of %u at %p",
|
||||||
length, keyseg->length, (long) *page_pos));
|
length, keyseg->length, *page_pos));
|
||||||
DBUG_DUMP("key", *page_pos, 16);
|
DBUG_DUMP("key", *page_pos, 16);
|
||||||
_ma_set_fatal_error(keyinfo->share, HA_ERR_CRASHED);
|
_ma_set_fatal_error(keyinfo->share, HA_ERR_CRASHED);
|
||||||
return 0; /* Error */
|
return 0; /* Error */
|
||||||
@@ -1263,8 +1263,8 @@ uint _ma_get_binary_pack_key(MARIA_KEY *int_key, uint page_flag, uint nod_flag,
|
|||||||
if (length > keyinfo->maxlength)
|
if (length > keyinfo->maxlength)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",
|
DBUG_PRINT("error",
|
||||||
("Found too long binary packed key: %u of %u at 0x%lx",
|
("Found too long binary packed key: %u of %u at %p",
|
||||||
length, keyinfo->maxlength, (long) *page_pos));
|
length, keyinfo->maxlength, *page_pos));
|
||||||
DBUG_DUMP("key", *page_pos, 16);
|
DBUG_DUMP("key", *page_pos, 16);
|
||||||
_ma_set_fatal_error(keyinfo->share, HA_ERR_CRASHED);
|
_ma_set_fatal_error(keyinfo->share, HA_ERR_CRASHED);
|
||||||
DBUG_RETURN(0); /* Wrong key */
|
DBUG_RETURN(0); /* Wrong key */
|
||||||
@@ -1325,8 +1325,8 @@ uint _ma_get_binary_pack_key(MARIA_KEY *int_key, uint page_flag, uint nod_flag,
|
|||||||
from=page; from_end=page_end;
|
from=page; from_end=page_end;
|
||||||
}
|
}
|
||||||
DBUG_ASSERT((int) length >= 0);
|
DBUG_ASSERT((int) length >= 0);
|
||||||
DBUG_PRINT("info",("key: 0x%lx from: 0x%lx length: %u",
|
DBUG_PRINT("info",("key: %p from: %p length: %u",
|
||||||
(long) key, (long) from, length));
|
key, from, length));
|
||||||
memmove(key, from, (size_t) length);
|
memmove(key, from, (size_t) length);
|
||||||
key+=length;
|
key+=length;
|
||||||
from+=length;
|
from+=length;
|
||||||
@@ -1452,7 +1452,7 @@ uchar *_ma_get_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *keypos)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBUG_PRINT("exit",("page: 0x%lx length: %u", (long) page,
|
DBUG_PRINT("exit",("page: %p length: %u", page,
|
||||||
key->data_length + key->ref_length));
|
key->data_length + key->ref_length));
|
||||||
DBUG_RETURN(page);
|
DBUG_RETURN(page);
|
||||||
} /* _ma_get_key */
|
} /* _ma_get_key */
|
||||||
@@ -1522,8 +1522,8 @@ uchar *_ma_get_last_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *endpos)
|
|||||||
uchar *lastpos, *page;
|
uchar *lastpos, *page;
|
||||||
MARIA_KEYDEF *keyinfo= key->keyinfo;
|
MARIA_KEYDEF *keyinfo= key->keyinfo;
|
||||||
DBUG_ENTER("_ma_get_last_key");
|
DBUG_ENTER("_ma_get_last_key");
|
||||||
DBUG_PRINT("enter",("page: 0x%lx endpos: 0x%lx", (long) ma_page->buff,
|
DBUG_PRINT("enter",("page: %p endpos: %p", ma_page->buff,
|
||||||
(long) endpos));
|
endpos));
|
||||||
|
|
||||||
page_flag= ma_page->flag;
|
page_flag= ma_page->flag;
|
||||||
nod_flag= ma_page->node;
|
nod_flag= ma_page->node;
|
||||||
@@ -1548,14 +1548,14 @@ uchar *_ma_get_last_key(MARIA_KEY *key, MARIA_PAGE *ma_page, uchar *endpos)
|
|||||||
lastpos= page;
|
lastpos= page;
|
||||||
if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page))
|
if (!(*keyinfo->get_key)(key, page_flag, nod_flag, &page))
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",("Couldn't find last key: page: 0x%lx",
|
DBUG_PRINT("error",("Couldn't find last key: page: %p",
|
||||||
(long) page));
|
page));
|
||||||
_ma_set_fatal_error(keyinfo->share, HA_ERR_CRASHED);
|
_ma_set_fatal_error(keyinfo->share, HA_ERR_CRASHED);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DBUG_PRINT("exit",("lastpos: 0x%lx length: %u", (ulong) lastpos,
|
DBUG_PRINT("exit",("lastpos: %p length: %u", lastpos,
|
||||||
key->data_length + key->ref_length));
|
key->data_length + key->ref_length));
|
||||||
DBUG_RETURN(lastpos);
|
DBUG_RETURN(lastpos);
|
||||||
} /* _ma_get_last_key */
|
} /* _ma_get_last_key */
|
||||||
@@ -1654,9 +1654,9 @@ int _ma_search_next(register MARIA_HA *info, MARIA_KEY *key,
|
|||||||
MARIA_KEY tmp_key;
|
MARIA_KEY tmp_key;
|
||||||
MARIA_PAGE page;
|
MARIA_PAGE page;
|
||||||
DBUG_ENTER("_ma_search_next");
|
DBUG_ENTER("_ma_search_next");
|
||||||
DBUG_PRINT("enter",("nextflag: %u lastpos: %lu int_keypos: 0x%lx page_changed %d keyread_buff_used: %d",
|
DBUG_PRINT("enter",("nextflag: %u lastpos: %lu int_keypos:%p page_changed %d keyread_buff_used: %d",
|
||||||
nextflag, (ulong) info->cur_row.lastpos,
|
nextflag, (ulong) info->cur_row.lastpos,
|
||||||
(ulong) info->int_keypos,
|
info->int_keypos,
|
||||||
info->page_changed, info->keyread_buff_used));
|
info->page_changed, info->keyread_buff_used));
|
||||||
DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, key););
|
DBUG_EXECUTE("key", _ma_print_key(DBUG_FILE, key););
|
||||||
|
|
||||||
@@ -2142,8 +2142,8 @@ _ma_calc_var_pack_key_length(const MARIA_KEY *int_key, uint nod_flag,
|
|||||||
ref_length=0;
|
ref_length=0;
|
||||||
next_length_pack=0;
|
next_length_pack=0;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("test",("length: %d next_key: 0x%lx", length,
|
DBUG_PRINT("test",("length: %d next_key: %p", length,
|
||||||
(long) next_key));
|
next_key));
|
||||||
|
|
||||||
{
|
{
|
||||||
uint tmp_length;
|
uint tmp_length;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user