Commit f7d0dfd9 authored by unknown's avatar unknown
Browse files

Changed %lx -> 0x%lx (for easier comparison of debug files)

Cosmetic cleanups
Don't call 'delete_elements' on copy_funcs as this causes elements to be freed twice


mysys/hash.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/list.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/mf_iocache.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/mf_keycache.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
  Changed debug messages to be more consistent with other mysys files.
mysys/mf_keycaches.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_alloc.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_fopen.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_fstream.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_getwd.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_lib.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_lwrite.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_malloc.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_pread.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_read.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_realloc.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/my_write.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/safemalloc.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/thr_alarm.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/thr_lock.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/thr_mutex.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/tree.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
mysys/typelib.c:
  Changed %lx -> 0x%lx (for easier comparison of debug files)
sql/examples/ha_archive.cc:
  Changed to return error number for some functions (instead of -1)
  Updated function comments & some other minor cleanups
  Ensure that free_share() and gzclose() are always called
  Use 'TRUE' and 'FALSE' instead of 'true' and 'false'
  Removed some compiler warnings
sql/examples/ha_archive.h:
  Fixed to use new prototypes for records_in_range
sql/sql_select.cc:
  Don't call 'delete_elements' on copy_funcs
parent bf95f919
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ _hash_init(HASH *hash,CHARSET_INFO *charset,
	   void (*free_element)(void*),uint flags CALLER_INFO_PROTO)
{
  DBUG_ENTER("hash_init");
  DBUG_PRINT("enter",("hash: %lx  size: %d",hash,size));
  DBUG_PRINT("enter",("hash: 0x%lx  size: %d",hash,size));

  hash->records=0;
  if (my_init_dynamic_array_ci(&hash->array,sizeof(HASH_LINK),size,0))
@@ -565,7 +565,7 @@ my_bool hash_check(HASH *hash)
	if ((rec_link=hash_rec_mask(hash,hash_info,blength,records)) != i)
	{
	  DBUG_PRINT("error",
		     ("Record in wrong link at %d: Start %d  Record: %lx  Record-link %d", idx,i,hash_info->data,rec_link));
		     ("Record in wrong link at %d: Start %d  Record: 0x%lx  Record-link %d", idx,i,hash_info->data,rec_link));
	  error=1;
	}
	else
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
LIST *list_add(LIST *root, LIST *element)
{
  DBUG_ENTER("list_add");
  DBUG_PRINT("enter",("root: %lx  element: %lx", root, element));
  DBUG_PRINT("enter",("root: 0x%lx  element: %lx", root, element));
  if (root)
  {
    if (root->prev)			/* If add in mid of list */
+2 −2
Original line number Diff line number Diff line
@@ -140,7 +140,7 @@ int init_io_cache(IO_CACHE *info, File file, uint cachesize,
  uint min_cache;
  my_off_t end_of_file= ~(my_off_t) 0;
  DBUG_ENTER("init_io_cache");
  DBUG_PRINT("enter",("cache: %lx  type: %d  pos: %ld",
  DBUG_PRINT("enter",("cache: 0x%lx  type: %d  pos: %ld",
		      (ulong) info, (int) type, (ulong) seek_offset));

  info->file= file;
@@ -290,7 +290,7 @@ my_bool reinit_io_cache(IO_CACHE *info, enum cache_type type,
			pbool clear_cache)
{
  DBUG_ENTER("reinit_io_cache");
  DBUG_PRINT("enter",("cache: %lx type: %d  seek_offset: %lu  clear_cache: %d",
  DBUG_PRINT("enter",("cache: 0x%lx type: %d  seek_offset: %lu  clear_cache: %d",
		      (ulong) info, type, (ulong) seek_offset,
		      (int) clear_cache));

+16 −15
Original line number Diff line number Diff line
@@ -401,8 +401,8 @@ int init_key_cache(KEY_CACHE *keycache, uint key_cache_block_size,
    keycache->waiting_for_hash_link.last_thread= NULL;
    keycache->waiting_for_block.last_thread= NULL;
    DBUG_PRINT("exit",
	       ("disk_blocks: %d  block_root: %lx  hash_entries: %d\
 hash_root: %lx hash_links: %d hash_link_root %lx",
	       ("disk_blocks: %d  block_root: 0x%lx  hash_entries: %d\
 hash_root: 0x%lx  hash_links: %d  hash_link_root: 0x%lx",
		keycache->disk_blocks, keycache->block_root,
		keycache->hash_entries, keycache->hash_root,
		keycache->hash_links, keycache->hash_link_root));
@@ -596,7 +596,7 @@ void change_key_cache_param(KEY_CACHE *keycache, uint division_limit,
void end_key_cache(KEY_CACHE *keycache, my_bool cleanup)
{
  DBUG_ENTER("end_key_cache");
  DBUG_PRINT("enter", ("key_cache: %lx", keycache));
  DBUG_PRINT("enter", ("key_cache: 0x%lx", keycache));

  if (!keycache->key_cache_inited)
    DBUG_VOID_RETURN;
@@ -1109,7 +1109,7 @@ static inline void link_hash(HASH_LINK **start, HASH_LINK *hash_link)

static void unlink_hash(KEY_CACHE *keycache, HASH_LINK *hash_link)
{
  KEYCACHE_DBUG_PRINT("unlink_hash", ("file %u, filepos %lu #requests=%u",
  KEYCACHE_DBUG_PRINT("unlink_hash", ("fd: %u  pos_ %lu  #requests=%u",
      (uint) hash_link->file,(ulong) hash_link->diskpos, hash_link->requests));
  KEYCACHE_DBUG_ASSERT(hash_link->requests == 0);
  if ((*hash_link->prev= hash_link->next))
@@ -1167,7 +1167,7 @@ static HASH_LINK *get_hash_link(KEY_CACHE *keycache,
  int cnt;
#endif

  KEYCACHE_DBUG_PRINT("get_hash_link", ("file %u, filepos %lu",
  KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u  pos: %lu",
                      (uint) file,(ulong) filepos));

restart:
@@ -1193,7 +1193,7 @@ static HASH_LINK *get_hash_link(KEY_CACHE *keycache,
      for (i=0, hash_link= *start ;
           i < cnt ; i++, hash_link= hash_link->next)
      {
        KEYCACHE_DBUG_PRINT("get_hash_link", ("file %u, filepos %lu",
        KEYCACHE_DBUG_PRINT("get_hash_link", ("fd: %u  pos: %lu",
            (uint) hash_link->file,(ulong) hash_link->diskpos));
      }
    }
@@ -1285,10 +1285,11 @@ static BLOCK_LINK *find_key_block(KEY_CACHE *keycache,

  DBUG_ENTER("find_key_block");
  KEYCACHE_THREAD_TRACE("find_key_block:begin");
  DBUG_PRINT("enter", ("file %u, filepos %lu, wrmode %lu",
               (uint) file, (ulong) filepos, (uint) wrmode));
  KEYCACHE_DBUG_PRINT("find_key_block", ("file %u, filepos %lu, wrmode %lu",
  DBUG_PRINT("enter", ("fd: %u  pos %lu  wrmode: %lu",
                       (uint) file, (ulong) filepos, (uint) wrmode));
  KEYCACHE_DBUG_PRINT("find_key_block", ("fd: %u  pos: %lu  wrmode: %lu",
                                         (uint) file, (ulong) filepos,
                                         (uint) wrmode));
#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
  DBUG_EXECUTE("check_keycache2",
               test_key_cache(keycache, "start of find_key_block", 0););
@@ -1542,7 +1543,7 @@ static BLOCK_LINK *find_key_block(KEY_CACHE *keycache,
  KEYCACHE_DBUG_ASSERT(page_status != -1);
  *page_st=page_status;
  KEYCACHE_DBUG_PRINT("find_key_block",
                      ("file %u, filepos %lu, page_status %lu",
                      ("fd: %u  pos %lu  page_status %lu",
                      (uint) file,(ulong) filepos,(uint) page_status));

#if !defined(DBUG_OFF) && defined(EXTRA_DEBUG)
@@ -1678,7 +1679,7 @@ byte *key_cache_read(KEY_CACHE *keycache,
  uint offset= 0;
  byte *start= buff;
  DBUG_ENTER("key_cache_read");
  DBUG_PRINT("enter", ("file %u, filepos %lu, length %u",
  DBUG_PRINT("enter", ("fd: %u  pos: %lu  length: %u",
               (uint) file, (ulong) filepos, length));

  if (keycache->can_be_used)
@@ -1814,7 +1815,7 @@ int key_cache_insert(KEY_CACHE *keycache,
                     byte *buff, uint length)
{
  DBUG_ENTER("key_cache_insert");
  DBUG_PRINT("enter", ("file %u, filepos %lu, length %u",
  DBUG_PRINT("enter", ("fd: %u  pos: %lu  length: %u",
               (uint) file,(ulong) filepos, length));

  if (keycache->can_be_used)
@@ -1926,7 +1927,7 @@ int key_cache_write(KEY_CACHE *keycache,
  int error=0;
  DBUG_ENTER("key_cache_write");
  DBUG_PRINT("enter",
	     ("file %u  filepos %lu  length  %u  block_length %u  key_block_length: %u",
	     ("fd: %u  pos: %lu  length: %u  block_length: %u  key_block_length: %u",
	      (uint) file, (ulong) filepos, length, block_length,
	      keycache ? keycache->key_cache_block_size : 0));

@@ -2396,7 +2397,7 @@ int flush_key_blocks(KEY_CACHE *keycache,
{
  int res;
  DBUG_ENTER("flush_key_blocks");
  DBUG_PRINT("enter", ("keycache: %lx", keycache));
  DBUG_PRINT("enter", ("keycache: 0x%lx", keycache));

  if (keycache->disk_blocks <= 0)
    DBUG_RETURN(0);
+2 −2
Original line number Diff line number Diff line
@@ -159,7 +159,7 @@ static byte *safe_hash_search(SAFE_HASH *hash, const byte *key, uint length)
    result= hash->default_value;
  else
    result= ((SAFE_HASH_ENTRY*) result)->data;
  DBUG_PRINT("exit",("data: %lx", result));
  DBUG_PRINT("exit",("data: 0x%lx", result));
  DBUG_RETURN(result);
}

@@ -190,7 +190,7 @@ static my_bool safe_hash_set(SAFE_HASH *hash, const byte *key, uint length,
  SAFE_HASH_ENTRY *entry;
  my_bool error= 0;
  DBUG_ENTER("safe_hash_set");
  DBUG_PRINT("enter",("key: %.*s  data: %lx", length, key, data));
  DBUG_PRINT("enter",("key: %.*s  data: 0x%lx", length, key, data));

  rw_wrlock(&hash->mutex);
  entry= (SAFE_HASH_ENTRY*) hash_search(&hash->hash, key, length);
Loading