diff options
-rw-r--r-- | configure.in | 3 | ||||
-rw-r--r-- | heap/hp_test2.c | 2 | ||||
-rw-r--r-- | libmysql/libmysql.c | 2 | ||||
-rw-r--r-- | myisam/mi_check.c | 20 | ||||
-rw-r--r-- | myisam/mi_delete.c | 22 | ||||
-rw-r--r-- | myisam/mi_dynrec.c | 6 | ||||
-rw-r--r-- | myisam/mi_key.c | 2 | ||||
-rw-r--r-- | myisam/mi_open.c | 2 | ||||
-rw-r--r-- | myisam/mi_packrec.c | 2 | ||||
-rw-r--r-- | myisam/mi_page.c | 4 | ||||
-rw-r--r-- | myisam/mi_search.c | 8 | ||||
-rw-r--r-- | myisam/mi_statrec.c | 4 | ||||
-rw-r--r-- | myisam/mi_test1.c | 1 | ||||
-rw-r--r-- | myisam/mi_test2.c | 6 | ||||
-rw-r--r-- | myisam/mi_test3.c | 2 | ||||
-rw-r--r-- | myisam/mi_write.c | 8 | ||||
-rw-r--r-- | myisammrg/myrg_rkey.c | 2 | ||||
-rw-r--r-- | ndb/src/ndbapi/DictCache.cpp | 2 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbBlob.cpp | 8 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbOperationDefine.cpp | 2 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbOperationInt.cpp | 2 | ||||
-rw-r--r-- | ndb/src/ndbapi/NdbOperationSearch.cpp | 2 | ||||
-rw-r--r-- | sql-common/client.c | 2 | ||||
-rw-r--r-- | sql/ha_federated.cc | 2 | ||||
-rw-r--r-- | sql/ha_innodb.cc | 2 | ||||
-rw-r--r-- | sql/ha_ndbcluster.cc | 34 | ||||
-rw-r--r-- | sql/ha_ndbcluster_cond.cc | 2 |
27 files changed, 75 insertions, 79 deletions
diff --git a/configure.in b/configure.in index fdec3bb3a6c..9c35dbcc7c7 100644 --- a/configure.in +++ b/configure.in @@ -1763,15 +1763,18 @@ AC_ARG_WITH(debug, if test "$with_debug" = "yes" then # Medium debug. + AC_DEFINE([DBUG_ON], [1], [Use libdbug]) CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS" CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DDBUG_ON -DSAFE_MUTEX $CXXFLAGS" elif test "$with_debug" = "full" then # Full debug. Very slow in some cases + AC_DEFINE([DBUG_ON], [1], [Use libdbug]) CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS" CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS" else # Optimized version. No debug + AC_DEFINE([DBUG_OFF], [1], [Don't use libdbug]) CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS" CXXFLAGS="$OPTIMIZE_CXXFLAGS -DDBUG_OFF $CXXFLAGS" fi diff --git a/heap/hp_test2.c b/heap/hp_test2.c index 7b756ae10a4..73cad6c2043 100644 --- a/heap/hp_test2.c +++ b/heap/hp_test2.c @@ -617,7 +617,6 @@ err: static int get_options(int argc,char *argv[]) { char *pos,*progname; - DEBUGGER_OFF; progname= argv[0]; @@ -646,7 +645,6 @@ static int get_options(int argc,char *argv[]) printf("Usage: %s [-?ABIKLsWv] [-m#] [-t#]\n",progname); exit(0); case '#': - DEBUGGER_ON; DBUG_PUSH (++pos); break; } diff --git a/libmysql/libmysql.c b/libmysql/libmysql.c index bcbaf9f1822..dd66a325169 100644 --- a/libmysql/libmysql.c +++ b/libmysql/libmysql.c @@ -2444,7 +2444,7 @@ static my_bool execute(MYSQL_STMT *stmt, char *packet, ulong length) my_bool res; DBUG_ENTER("execute"); - DBUG_DUMP("packet", packet, length); + DBUG_DUMP("packet", (uchar*)packet, length); mysql->last_used_con= mysql; int4store(buff, stmt->stmt_id); /* Send stmt id to server */ diff --git a/myisam/mi_check.c b/myisam/mi_check.c index 4407a787950..7ed4f3a9f03 100644 --- a/myisam/mi_check.c +++ b/myisam/mi_check.c @@ -741,7 +741,7 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, char llbuff[22]; uint diff_pos[2]; DBUG_ENTER("chk_index"); - DBUG_DUMP("buff",(byte*) buff,mi_getint(buff)); + DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); /* TODO: implement appropriate check for RTree keys */ if (keyinfo->flag & HA_SPATIAL) @@ -799,9 +799,9 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, (flag=ha_key_cmp(keyinfo->seg,info->lastkey,key,key_length, comp_flag, diff_pos)) >=0) { - DBUG_DUMP("old",(byte*) info->lastkey, info->lastkey_length); - DBUG_DUMP("new",(byte*) key, key_length); - DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos)); + DBUG_DUMP("old",(uchar*) info->lastkey, info->lastkey_length); + DBUG_DUMP("new",(uchar*) key, key_length); + DBUG_DUMP("new_in_page",(uchar*) old_keypos,(uint) (keypos-old_keypos)); if (comp_flag & SEARCH_FIND && flag == 0) mi_check_print_error(param,"Found duplicated key at page %s",llstr(page,llbuff)); @@ -870,8 +870,8 @@ static int chk_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, DBUG_PRINT("test",("page: %s record: %s filelength: %s", llstr(page,llbuff),llstr(record,llbuff2), llstr(info->state->data_file_length,llbuff3))); - DBUG_DUMP("key",(byte*) key,key_length); - DBUG_DUMP("new_in_page",(char*) old_keypos,(uint) (keypos-old_keypos)); + DBUG_DUMP("key",(uchar*) key,key_length); + DBUG_DUMP("new_in_page",(uchar*) old_keypos,(uint) (keypos-old_keypos)); goto err; } param->record_checksum+=(ha_checksum) record; @@ -1631,7 +1631,7 @@ int mi_repair(MI_CHECK *param, register MI_INFO *info, { if (my_errno != HA_ERR_FOUND_DUPP_KEY) goto err; - DBUG_DUMP("record",(byte*) sort_param.record,share->base.pack_reclength); + DBUG_DUMP("record",(uchar*) sort_param.record,share->base.pack_reclength); mi_check_print_info(param,"Duplicate key %2d for record at %10s against new record at %10s", info->errkey+1, llstr(sort_param.start_recpos,llbuff), @@ -2062,7 +2062,7 @@ static int sort_one_index(MI_CHECK *param, MI_INFO *info, MI_KEYDEF *keyinfo, ("From page: %ld, keyoffset: %lu used_length: %d", (ulong) pagepos, (ulong) (keypos - buff), (int) used_length)); - DBUG_DUMP("buff",(byte*) buff,used_length); + DBUG_DUMP("buff",(uchar*) buff,used_length); goto err; } } @@ -4024,7 +4024,7 @@ static int sort_insert_key(MI_SORT_PARAM *sort_param, else if (my_pwrite(info->s->kfile,(byte*) anc_buff, (uint) keyinfo->block_length,filepos, param->myf_rw)) DBUG_RETURN(1); - DBUG_DUMP("buff",(byte*) anc_buff,mi_getint(anc_buff)); + DBUG_DUMP("buff",(uchar*) anc_buff,mi_getint(anc_buff)); /* Write separator-key to block in next level */ if (sort_insert_key(sort_param,key_block+1,key_block->lastkey,filepos)) @@ -4129,7 +4129,7 @@ int flush_pending_blocks(MI_SORT_PARAM *sort_param) else if (my_pwrite(info->s->kfile,(byte*) key_block->buff, (uint) keyinfo->block_length,filepos, myf_rw)) DBUG_RETURN(1); - DBUG_DUMP("buff",(byte*) key_block->buff,length); + DBUG_DUMP("buff",(uchar*) key_block->buff,length); nod_flag=1; } info->s->state.key_root[sort_param->key]=filepos; /* Last is root for tree */ diff --git a/myisam/mi_delete.c b/myisam/mi_delete.c index 409930ff7fb..ca8a537b322 100644 --- a/myisam/mi_delete.c +++ b/myisam/mi_delete.c @@ -223,7 +223,7 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, my_off_t leaf_page,next_block; uchar lastkey[MI_MAX_KEY_BUFF]; DBUG_ENTER("d_search"); - DBUG_DUMP("page",(byte*) anc_buff,mi_getint(anc_buff)); + DBUG_DUMP("page",(uchar*) anc_buff,mi_getint(anc_buff)); search_key_length= (comp_flag & SEARCH_FIND) ? key_length : USE_WHOLE_KEY; flag=(*keyinfo->bin_search)(info,keyinfo,anc_buff,key, search_key_length, @@ -381,7 +381,7 @@ static int d_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, ret_value|=_mi_write_keypage(info,keyinfo,page,DFLT_INIT_HITS,anc_buff); else { - DBUG_DUMP("page",(byte*) anc_buff,mi_getint(anc_buff)); + DBUG_DUMP("page",(uchar*) anc_buff,mi_getint(anc_buff)); } my_afree((byte*) leaf_buff); DBUG_PRINT("exit",("Return: %d",ret_value)); @@ -411,7 +411,7 @@ static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, DBUG_ENTER("del"); DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx", (long) leaf_page, (ulong) keypos)); - DBUG_DUMP("leaf_buff",(byte*) leaf_buff,mi_getint(leaf_buff)); + DBUG_DUMP("leaf_buff",(uchar*) leaf_buff,mi_getint(leaf_buff)); endpos=leaf_buff+mi_getint(leaf_buff); if (!(key_start=_mi_get_last_key(info,keyinfo,leaf_buff,keybuff,endpos, @@ -428,7 +428,7 @@ static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key, ret_value= -1; else { - DBUG_DUMP("next_page",(byte*) next_buff,mi_getint(next_buff)); + DBUG_DUMP("next_page",(uchar*) next_buff,mi_getint(next_buff)); if ((ret_value=del(info,keyinfo,key,anc_buff,next_page,next_buff, keypos,next_block,ret_key)) >0) { @@ -517,8 +517,8 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, DBUG_ENTER("underflow"); DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx",(long) leaf_page, (ulong) keypos)); - DBUG_DUMP("anc_buff",(byte*) anc_buff,mi_getint(anc_buff)); - DBUG_DUMP("leaf_buff",(byte*) leaf_buff,mi_getint(leaf_buff)); + DBUG_DUMP("anc_buff",(uchar*) anc_buff,mi_getint(anc_buff)); + DBUG_DUMP("leaf_buff",(uchar*) leaf_buff,mi_getint(leaf_buff)); buff=info->buff; info->buff_used=1; @@ -554,7 +554,7 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,buff,0)) goto err; buff_length=mi_getint(buff); - DBUG_DUMP("next",(byte*) buff,buff_length); + DBUG_DUMP("next",(uchar*) buff,buff_length); /* find keys to make a big key-page */ bmove((byte*) next_keypos-key_reflength,(byte*) buff+2, @@ -659,7 +659,7 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, goto err; buff_length=mi_getint(buff); endpos=buff+buff_length; - DBUG_DUMP("prev",(byte*) buff,buff_length); + DBUG_DUMP("prev",(uchar*) buff,buff_length); /* find keys to make a big key-page */ bmove((byte*) next_keypos - key_reflength,(byte*) leaf_buff+2, @@ -715,8 +715,8 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, goto err; _mi_kpointer(info,leaf_key+key_length,leaf_page); /* Save key in anc_buff */ - DBUG_DUMP("anc_buff",(byte*) anc_buff,anc_length); - DBUG_DUMP("key_to_anc",(byte*) leaf_key,key_length); + DBUG_DUMP("anc_buff",(uchar*) anc_buff,anc_length); + DBUG_DUMP("key_to_anc",(uchar*) leaf_key,key_length); temp_pos=anc_buff+anc_length; t_length=(*keyinfo->pack_key)(keyinfo,key_reflength, @@ -737,7 +737,7 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo, bmove((byte*) leaf_buff+2,(byte*) half_pos-nod_flag,(size_t) nod_flag); if (!(length=(*keyinfo->get_key)(keyinfo,nod_flag,&half_pos,leaf_key))) goto err; - DBUG_DUMP("key_to_leaf",(byte*) leaf_key,length); + DBUG_DUMP("key_to_leaf",(uchar*) leaf_key,length); t_length=(*keyinfo->pack_key)(keyinfo,nod_flag, (uchar*) 0, (uchar*) 0, (uchar*) 0, leaf_key, &s_temp); length=(uint) ((buff+buff_length)-half_pos); diff --git a/myisam/mi_dynrec.c b/myisam/mi_dynrec.c index 67d40ec50bf..3542a82be59 100644 --- a/myisam/mi_dynrec.c +++ b/myisam/mi_dynrec.c @@ -509,7 +509,7 @@ int _mi_write_part_record(MI_INFO *info, } length= *reclength+head_length; /* Write only what is needed */ } - DBUG_DUMP("header",(byte*) temp,head_length); + DBUG_DUMP("header",(uchar*) temp,head_length); /* Make a long block for one write */ record_end= *record+length-head_length; @@ -1137,7 +1137,7 @@ err: my_errno= HA_ERR_WRONG_IN_RECORD; DBUG_PRINT("error",("to_end: 0x%lx -> 0x%lx from_end: 0x%lx -> 0x%lx", (long) to, (long) to_end, (long) from, (long) from_end)); - DBUG_DUMP("from",(byte*) info->rec_buff,info->s->base.min_pack_length); + DBUG_DUMP("from",(uchar*) info->rec_buff,info->s->base.min_pack_length); DBUG_RETURN(MY_FILE_ERROR); } /* _mi_rec_unpack */ @@ -1698,7 +1698,7 @@ uint _mi_get_block_info(MI_BLOCK_INFO *info, File file, my_off_t filepos) sizeof(info->header)) goto err; } - DBUG_DUMP("header",(byte*) header,MI_BLOCK_INFO_HEADER_LENGTH); + DBUG_DUMP("header",(uchar*) header,MI_BLOCK_INFO_HEADER_LENGTH); if (info->second_read) { if (info->header[0] <= 6 || info->header[0] == 13) diff --git a/myisam/mi_key.c b/myisam/mi_key.c index 377972b5a5f..90bd6f5a717 100644 --- a/myisam/mi_key.c +++ b/myisam/mi_key.c @@ -189,7 +189,7 @@ uint _mi_make_key(register MI_INFO *info, uint keynr, uchar *key, } _mi_dpointer(info,key,filepos); DBUG_PRINT("exit",("keynr: %d",keynr)); - DBUG_DUMP("key",(byte*) start,(uint) (key-start)+keyseg->length); + DBUG_DUMP("key",(uchar*) start,(uint) (key-start)+keyseg->length); DBUG_EXECUTE("key", _mi_print_key(DBUG_FILE,info->s->keyinfo[keynr].seg,start, (uint) (key-start));); diff --git a/myisam/mi_open.c b/myisam/mi_open.c index c014b45cec5..6865708a941 100644 --- a/myisam/mi_open.c +++ b/myisam/mi_open.c @@ -130,7 +130,7 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) (byte*) myisam_file_magic, 4)) { DBUG_PRINT("error",("Wrong header in %s",name_buff)); - DBUG_DUMP("error_dump",(char*) share->state.header.file_version, + DBUG_DUMP("error_dump",(uchar*) share->state.header.file_version, head_length); my_errno=HA_ERR_NOT_A_TABLE; goto err; diff --git a/myisam/mi_packrec.c b/myisam/mi_packrec.c index 81fc4d046e7..63d624a1445 100644 --- a/myisam/mi_packrec.c +++ b/myisam/mi_packrec.c @@ -1368,7 +1368,7 @@ uint _mi_pack_get_block_info(MI_INFO *myisam, MI_BIT_BUFF *bit_buff, VOID(my_seek(file,filepos,MY_SEEK_SET,MYF(0))); if (my_read(file,(char*) header,ref_length,MYF(MY_NABP))) return BLOCK_FATAL_ERROR; - DBUG_DUMP("header",(byte*) header,ref_length); + DBUG_DUMP("header",(uchar*) header,ref_length); } head_length= read_pack_length((uint) myisam->s->pack.version, header, &info->rec_len); diff --git a/myisam/mi_page.c b/myisam/mi_page.c index eb26cf52ed2..27cddaefb1e 100644 --- a/myisam/mi_page.c +++ b/myisam/mi_page.c @@ -49,7 +49,7 @@ uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo, { DBUG_PRINT("error",("page %lu had wrong page length: %u", (ulong) page, page_size)); - DBUG_DUMP("page", (char*) tmp, keyinfo->block_length); + DBUG_DUMP("page", (uchar*) tmp, keyinfo->block_length); info->last_keypage = HA_OFFSET_ERROR; mi_print_error(info->s, HA_ERR_CRASHED); my_errno = HA_ERR_CRASHED; @@ -80,7 +80,7 @@ int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo, DBUG_RETURN((-1)); } DBUG_PRINT("page",("write page at: %lu",(long) page)); - DBUG_DUMP("buff",(byte*) buff,mi_getint(buff)); + DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); #endif if ((length=keyinfo->block_length) > IO_SIZE*2 && diff --git a/myisam/mi_search.c b/myisam/mi_search.c index 7016a3a6876..530be5e042f 100644 --- a/myisam/mi_search.c +++ b/myisam/mi_search.c @@ -78,7 +78,7 @@ int _mi_search(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (!(buff=_mi_fetch_keypage(info,keyinfo,pos,DFLT_INIT_HITS,info->buff, test(!(nextflag & SEARCH_SAVE_BUFF))))) goto err; - DBUG_DUMP("page",(byte*) buff,mi_getint(buff)); + DBUG_DUMP("page",(uchar*) buff,mi_getint(buff)); flag=(*keyinfo->bin_search)(info,keyinfo,buff,key,key_len,nextflag, &keypos,lastkey, &last_key); @@ -814,7 +814,7 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, DBUG_PRINT("error", ("Found too long null packed key: %u of %u at %lx", length, keyseg->length, (long) *page_pos)); - DBUG_DUMP("key",(char*) *page_pos,16); + DBUG_DUMP("key",(uchar*) *page_pos,16); mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; @@ -871,7 +871,7 @@ uint _mi_get_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, { DBUG_PRINT("error",("Found too long packed key: %u of %u at %lx", length, keyseg->length, (long) *page_pos)); - DBUG_DUMP("key",(char*) *page_pos,16); + DBUG_DUMP("key",(uchar*) *page_pos,16); mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; return 0; /* Error */ @@ -942,7 +942,7 @@ uint _mi_get_binary_pack_key(register MI_KEYDEF *keyinfo, uint nod_flag, { DBUG_PRINT("error",("Found too long binary packed key: %u of %u at %lx", length, keyinfo->maxlength, (long) *page_pos)); - DBUG_DUMP("key",(char*) *page_pos,16); + DBUG_DUMP("key",(uchar*) *page_pos,16); mi_print_error(keyinfo->share, HA_ERR_CRASHED); my_errno=HA_ERR_CRASHED; DBUG_RETURN(0); /* Wrong key */ diff --git a/myisam/mi_statrec.c b/myisam/mi_statrec.c index f88e5b02bcf..70a09895a3f 100644 --- a/myisam/mi_statrec.c +++ b/myisam/mi_statrec.c @@ -137,8 +137,8 @@ int _mi_cmp_static_record(register MI_INFO *info, register const byte *old) if (memcmp((byte*) info->rec_buff, (byte*) old, (uint) info->s->base.reclength)) { - DBUG_DUMP("read",old,info->s->base.reclength); - DBUG_DUMP("disk",info->rec_buff,info->s->base.reclength); + DBUG_DUMP("read",(uchar *)old,info->s->base.reclength); + DBUG_DUMP("disk",(uchar *)info->rec_buff,info->s->base.reclength); my_errno=HA_ERR_RECORD_CHANGED; /* Record have changed */ DBUG_RETURN(1); } diff --git a/myisam/mi_test1.c b/myisam/mi_test1.c index 3540ac0f580..380f9f412b7 100644 --- a/myisam/mi_test1.c +++ b/myisam/mi_test1.c @@ -647,7 +647,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), printf("test1 Ver 1.2 \n"); exit(0); case '#': - DEBUGGER_ON; DBUG_PUSH (argument); break; case '?': diff --git a/myisam/mi_test2.c b/myisam/mi_test2.c index 5aa9250cf18..3c88ffce2db 100644 --- a/myisam/mi_test2.c +++ b/myisam/mi_test2.c @@ -449,8 +449,8 @@ int main(int argc, char *argv[]) bcmp(read_record2,read_record3,reclength)) { printf("Can't find last record\n"); - DBUG_DUMP("record2",(byte*) read_record2,reclength); - DBUG_DUMP("record3",(byte*) read_record3,reclength); + DBUG_DUMP("record2",(uchar*) read_record2,reclength); + DBUG_DUMP("record3",(uchar*) read_record3,reclength); goto end; } ant=1; @@ -863,7 +863,6 @@ err: static void get_options(int argc, char **argv) { char *pos,*progname; - DEBUGGER_OFF; progname= argv[0]; @@ -976,7 +975,6 @@ static void get_options(int argc, char **argv) progname); exit(0); case '#': - DEBUGGER_ON; DBUG_PUSH (++pos); break; default: diff --git a/myisam/mi_test3.c b/myisam/mi_test3.c index dd798f1a161..cc86f21a28e 100644 --- a/myisam/mi_test3.c +++ b/myisam/mi_test3.c @@ -119,7 +119,6 @@ int main(int argc,char **argv) static void get_options(int argc, char **argv) { char *pos,*progname; - DEBUGGER_OFF; progname= argv[0]; @@ -149,7 +148,6 @@ static void get_options(int argc, char **argv) printf("Usage: %s [-?lKA] [-f#] [-t#]\n",progname); exit(0); case '#': - DEBUGGER_ON; DBUG_PUSH (++pos); break; default: diff --git a/myisam/mi_write.c b/myisam/mi_write.c index 967fbdc2330..4f11fc78ccf 100644 --- a/myisam/mi_write.c +++ b/myisam/mi_write.c @@ -476,7 +476,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (key_pos != anc_buff+2+nod_flag && (keyinfo->flag & (HA_BINARY_PACK_KEY | HA_PACK_KEY))) { - DBUG_DUMP("prev_key",(byte*) key_buff,_mi_keylength(keyinfo,key_buff)); + DBUG_DUMP("prev_key",(uchar*) key_buff,_mi_keylength(keyinfo,key_buff)); } if (keyinfo->flag & HA_PACK_KEY) { @@ -583,7 +583,7 @@ int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo, MI_KEY_PARAM s_temp; DBUG_ENTER("mi_split_page"); LINT_INIT(after_key); - DBUG_DUMP("buff",(byte*) buff,mi_getint(buff)); + DBUG_DUMP("buff",(uchar*) buff,mi_getint(buff)); if (info->s->keyinfo+info->lastinx == keyinfo) info->page_changed=1; /* Info->buff is used */ @@ -630,7 +630,7 @@ int _mi_split_page(register MI_INFO *info, register MI_KEYDEF *keyinfo, if (_mi_write_keypage(info,keyinfo,new_pos,DFLT_INIT_HITS,info->buff)) DBUG_RETURN(-1); - DBUG_DUMP("key",(byte*) key,_mi_keylength(keyinfo,key)); + DBUG_DUMP("key",(uchar*) key,_mi_keylength(keyinfo,key)); DBUG_RETURN(2); /* Middle key up */ } /* _mi_split_page */ @@ -784,7 +784,7 @@ static int _mi_balance_page(register MI_INFO *info, MI_KEYDEF *keyinfo, if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,info->buff,0)) goto err; - DBUG_DUMP("next",(byte*) info->buff,mi_getint(info->buff)); + DBUG_DUMP("next",(uchar*) info->buff,mi_getint(info->buff)); /* Test if there is room to share keys */ diff --git a/myisammrg/myrg_rkey.c b/myisammrg/myrg_rkey.c index 0f9e9a9b822..627839331c6 100644 --- a/myisammrg/myrg_rkey.c +++ b/myisammrg/myrg_rkey.c @@ -92,6 +92,6 @@ int myrg_rkey(MYRG_INFO *info,byte *buf,int inx, const byte *key, mi->once_flags|= RRND_PRESERVE_LASTINX; DBUG_PRINT("info", ("using table no: %d", (int) (info->current_table - info->open_tables + 1))); - DBUG_DUMP("result key", (byte*) mi->lastkey, mi->lastkey_length); + DBUG_DUMP("result key", (uchar*) mi->lastkey, mi->lastkey_length); DBUG_RETURN(_myrg_mi_read_record(mi,buf)); } diff --git a/ndb/src/ndbapi/DictCache.cpp b/ndb/src/ndbapi/DictCache.cpp index 9234b6b5219..7a528c9e74a 100644 --- a/ndb/src/ndbapi/DictCache.cpp +++ b/ndb/src/ndbapi/DictCache.cpp @@ -294,7 +294,7 @@ GlobalDictCache::drop(NdbTableImpl * tab) ver.m_refCount--; ver.m_status = DROPPED; if(ver.m_refCount == 0){ - DBUG_PRINT("info", ("refCount is zero, deleting m_impl")) + DBUG_PRINT("info", ("refCount is zero, deleting m_impl")); delete ver.m_impl; vers->erase(i); } diff --git a/ndb/src/ndbapi/NdbBlob.cpp b/ndb/src/ndbapi/NdbBlob.cpp index 611d0396f96..8a854bf9a42 100644 --- a/ndb/src/ndbapi/NdbBlob.cpp +++ b/ndb/src/ndbapi/NdbBlob.cpp @@ -338,7 +338,7 @@ int NdbBlob::setTableKeyValue(NdbOperation* anOp) { DBUG_ENTER("NdbBlob::setTableKeyValue"); - DBUG_DUMP("info", theKeyBuf.data, 4 * theTable->m_keyLenInWords); + DBUG_DUMP("info", (uchar*)theKeyBuf.data, 4 * theTable->m_keyLenInWords); const Uint32* data = (const Uint32*)theKeyBuf.data; const unsigned columns = theTable->m_columns.size(); unsigned pos = 0; @@ -362,7 +362,8 @@ int NdbBlob::setAccessKeyValue(NdbOperation* anOp) { DBUG_ENTER("NdbBlob::setAccessKeyValue"); - DBUG_DUMP("info", theAccessKeyBuf.data, 4 * theAccessTable->m_keyLenInWords); + DBUG_DUMP("info", (uchar*)theAccessKeyBuf.data, + 4 * theAccessTable->m_keyLenInWords); const Uint32* data = (const Uint32*)theAccessKeyBuf.data; const unsigned columns = theAccessTable->m_columns.size(); unsigned pos = 0; @@ -387,7 +388,8 @@ NdbBlob::setPartKeyValue(NdbOperation* anOp, Uint32 part) { DBUG_ENTER("NdbBlob::setPartKeyValue"); DBUG_PRINT("info", ("dist=%u part=%u key=", getDistKey(part), part)); - DBUG_DUMP("info", theKeyBuf.data, 4 * theTable->m_keyLenInWords); + DBUG_DUMP("info", (uchar *)theKeyBuf.data, + 4 * theTable->m_keyLenInWords); // TODO use attr ids after compatibility with 4.1.7 not needed if (anOp->equal("PK", theKeyBuf.data) == -1 || anOp->equal("DIST", getDistKey(part)) == -1 || diff --git a/ndb/src/ndbapi/NdbOperationDefine.cpp b/ndb/src/ndbapi/NdbOperationDefine.cpp index cd357bb44c1..5db0d9f098e 100644 --- a/ndb/src/ndbapi/NdbOperationDefine.cpp +++ b/ndb/src/ndbapi/NdbOperationDefine.cpp @@ -440,7 +440,7 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo, theOperationType, (long) aValuePassed, len)); if (aValuePassed != NULL) - DBUG_DUMP("value", (char*)aValuePassed, len); + DBUG_DUMP("value", (uchar*)aValuePassed, len); int tReturnCode; Uint32 tAttrId; diff --git a/ndb/src/ndbapi/NdbOperationInt.cpp b/ndb/src/ndbapi/NdbOperationInt.cpp index 24e77363fb5..624b15b46f3 100644 --- a/ndb/src/ndbapi/NdbOperationInt.cpp +++ b/ndb/src/ndbapi/NdbOperationInt.cpp @@ -1017,7 +1017,7 @@ NdbOperation::branch_col(Uint32 type, DBUG_PRINT("enter", ("type: %u col:%u val: 0x%lx len: %u label: %u", type, ColId, (long) val, len, Label)); if (val != NULL) - DBUG_DUMP("value", (char*)val, len); + DBUG_DUMP("value", (uchar*)val, len); if (initial_interpreterCheck() == -1) DBUG_RETURN(-1); diff --git a/ndb/src/ndbapi/NdbOperationSearch.cpp b/ndb/src/ndbapi/NdbOperationSearch.cpp index 7f8659916dc..4bdbf135396 100644 --- a/ndb/src/ndbapi/NdbOperationSearch.cpp +++ b/ndb/src/ndbapi/NdbOperationSearch.cpp @@ -62,7 +62,7 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo, theOperationType, (long) aValuePassed, aVariableKeyLen)); if (aValuePassed != NULL) - DBUG_DUMP("value", (char*)aValuePassed, aVariableKeyLen); + DBUG_DUMP("value", (uchar*)aValuePassed, aVariableKeyLen); register Uint32 tAttrId; diff --git a/sql-common/client.c b/sql-common/client.c index 88774ce61e1..519deac2bc5 100644 --- a/sql-common/client.c +++ b/sql-common/client.c @@ -2113,7 +2113,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user, /* Check if version of protocol matches current one */ mysql->protocol_version= net->read_pos[0]; - DBUG_DUMP("packet",(char*) net->read_pos,10); + DBUG_DUMP("packet",(uchar*) net->read_pos,10); DBUG_PRINT("info",("mysql protocol version %d, server=%d", PROTOCOL_VERSION, mysql->protocol_version)); if (mysql->protocol_version != PROTOCOL_VERSION) diff --git a/sql/ha_federated.cc b/sql/ha_federated.cc index 7a7d65a3d34..2ccfeba74cb 100644 --- a/sql/ha_federated.cc +++ b/sql/ha_federated.cc @@ -1095,7 +1095,7 @@ bool ha_federated::create_where_from_key(String *to, uint store_length= key_part->store_length; uint part_length= min(store_length, length); needs_quotes= 1; - DBUG_DUMP("key, start of loop", ptr, length); + DBUG_DUMP("key, start of loop", (uchar *)ptr, length); if (key_part->null_bit) { diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index a2de8ea1d0b..1be6137460b 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -4250,7 +4250,7 @@ ha_innobase::rnd_pos( int error; uint keynr = active_index; DBUG_ENTER("rnd_pos"); - DBUG_DUMP("key", pos, ref_length); + DBUG_DUMP("key", (uchar *)pos, ref_length); statistic_increment(current_thd->status_var.ha_read_rnd_count, &LOCK_status); diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index e3ab2b67e26..0a75b328ca0 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -677,7 +677,7 @@ int ha_ndbcluster::set_ndb_key(NdbOperation *ndb_op, Field *field, DBUG_PRINT("enter", ("%d: %s, ndb_type: %u, len=%d", fieldnr, field->field_name, field->type(), pack_len)); - DBUG_DUMP("key", (char*)field_ptr, pack_len); + DBUG_DUMP("key", (uchar*)field_ptr, pack_len); DBUG_ASSERT(ndb_supported_type(field->type())); DBUG_ASSERT(! (field->flags & BLOB_FLAG)); @@ -699,7 +699,7 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, DBUG_PRINT("enter", ("%d: %s, type: %u, len=%d, is_null=%s", fieldnr, field->field_name, field->type(), pack_len, field->is_null()?"Y":"N")); - DBUG_DUMP("value", (char*) field_ptr, pack_len); + DBUG_DUMP("value", (uchar*) field_ptr, pack_len); DBUG_ASSERT(ndb_supported_type(field->type())); { @@ -737,7 +737,7 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, // Set value to NULL DBUG_RETURN((ndb_op->setValue(fieldnr, (char*)NULL, pack_len) != 0)); DBUG_PRINT("info", ("bit field")); - DBUG_DUMP("value", (char*)&bits, pack_len); + DBUG_DUMP("value", (uchar*)&bits, pack_len); #ifdef WORDS_BIGENDIAN /* store lsw first */ bits = ((bits >> 32) & 0x00000000FFFFFFFFLL) @@ -768,7 +768,7 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, DBUG_PRINT("value", ("set blob ptr: %p len: %u", blob_ptr, blob_len)); - DBUG_DUMP("value", (char*)blob_ptr, min(blob_len, 26)); + DBUG_DUMP("value", (uchar*)blob_ptr, min(blob_len, 26)); if (set_blob_value) *set_blob_value= TRUE; @@ -1007,8 +1007,8 @@ int ha_ndbcluster::get_metadata(const char *path) ("metadata, pack_length: %d getFrmLength: %d memcmp: %d", pack_length, tab->getFrmLength(), memcmp(pack_data, tab->getFrmData(), pack_length))); - DBUG_DUMP("pack_data", (char*)pack_data, pack_length); - DBUG_DUMP("frm", (char*)tab->getFrmData(), tab->getFrmLength()); + DBUG_DUMP("pack_data", (uchar*)pack_data, pack_length); + DBUG_DUMP("frm", (uchar*)tab->getFrmData(), tab->getFrmLength()); error= 3; invalidating_ndb_table= FALSE; } @@ -1502,7 +1502,7 @@ int ha_ndbcluster::pk_read(const byte *key, uint key_len, byte *buf) int res; DBUG_ENTER("pk_read"); DBUG_PRINT("enter", ("key_len: %u", key_len)); - DBUG_DUMP("key", (char*)key, key_len); + DBUG_DUMP("key", (uchar*)key, key_len); NdbOperation::LockMode lm= (NdbOperation::LockMode)get_ndb_lock_type(m_lock.type); @@ -1514,7 +1514,7 @@ int ha_ndbcluster::pk_read(const byte *key, uint key_len, byte *buf) { // This table has no primary key, use "hidden" primary key DBUG_PRINT("info", ("Using hidden key")); - DBUG_DUMP("key", (char*)key, 8); + DBUG_DUMP("key", (uchar*)key, 8); if (set_hidden_key(op, no_fields, key)) ERR_RETURN(trans->getNdbError()); @@ -1797,7 +1797,7 @@ int ha_ndbcluster::unique_index_read(const byte *key, NdbIndexOperation *op; DBUG_ENTER("ha_ndbcluster::unique_index_read"); DBUG_PRINT("enter", ("key_len: %u, index: %u", key_len, active_index)); - DBUG_DUMP("key", (char*)key, key_len); + DBUG_DUMP("key", (uchar*)key, key_len); NdbOperation::LockMode lm= (NdbOperation::LockMode)get_ndb_lock_type(m_lock.type); @@ -2126,7 +2126,7 @@ int ha_ndbcluster::set_bounds(NdbIndexScanOperation *op, { DBUG_PRINT("info", ("key %d:%d offset=%d length=%d last=%d bound=%d", j, i, tot_len, part_len, p.part_last, p.bound_type)); - DBUG_DUMP("info", (const char*)p.part_ptr, part_store_len); + DBUG_DUMP("info", (const uchar*)p.part_ptr, part_store_len); // Set bound if not cancelled via type -1 if (p.bound_type != -1) @@ -2644,7 +2644,7 @@ int ha_ndbcluster::update_row(const byte *old_data, byte *new_data) // Require that the PK for this record has previously been // read into m_ref - DBUG_DUMP("key", m_ref, NDB_HIDDEN_PRIMARY_KEY_LENGTH); + DBUG_DUMP("key", (uchar *)m_ref, NDB_HIDDEN_PRIMARY_KEY_LENGTH); if (set_hidden_key(op, table->s->fields, m_ref)) ERR_RETURN(op->getNdbError()); @@ -2864,8 +2864,6 @@ void ha_ndbcluster::print_results() DBUG_ENTER("print_results"); #ifndef DBUG_OFF - if (!_db_on_) - DBUG_VOID_RETURN; char buf_type[MAX_FIELD_WIDTH], buf_val[MAX_FIELD_WIDTH]; String type(buf_type, sizeof(buf_type), &my_charset_bin); @@ -3341,7 +3339,7 @@ void ha_ndbcluster::position(const byte *record) memcpy(ref, m_ref, ref_length); } - DBUG_DUMP("ref", (char*)ref, ref_length); + DBUG_DUMP("ref", (uchar*)ref, ref_length); DBUG_VOID_RETURN; } @@ -6132,14 +6130,14 @@ ha_ndbcluster::register_query_cache_table(THD *thd, if (!is_autocommit) { - DBUG_PRINT("exit", ("Can't register table during transaction")) + DBUG_PRINT("exit", ("Can't register table during transaction")); DBUG_RETURN(FALSE); } if (ndb_get_commitcount(thd, m_dbname, m_tabname, &commit_count)) { *engine_data= 0; - DBUG_PRINT("exit", ("Error, could not get commitcount")) + DBUG_PRINT("exit", ("Error, could not get commitcount")); DBUG_RETURN(FALSE); } *engine_data= commit_count; @@ -6263,7 +6261,7 @@ static int packfrm(const void *data, uint len, } DBUG_PRINT("info", ("org_len: %lu comp_len: %lu", org_len, comp_len)); - DBUG_DUMP("compressed", (char*)data, org_len); + DBUG_DUMP("compressed", (uchar*)data, org_len); error= 2; blob_len= sizeof(frm_blob_struct::frm_blob_header)+org_len; @@ -6307,7 +6305,7 @@ static int unpackfrm(const void **unpack_data, uint *unpack_len, DBUG_PRINT("blob",("ver: %lu complen: %lu orglen: %lu", ver,complen,orglen)); - DBUG_DUMP("blob->data", (char*) blob->data, complen); + DBUG_DUMP("blob->data", (uchar*) blob->data, complen); if (ver != 1) { diff --git a/sql/ha_ndbcluster_cond.cc b/sql/ha_ndbcluster_cond.cc index f5b41959b40..37e710acff4 100644 --- a/sql/ha_ndbcluster_cond.cc +++ b/sql/ha_ndbcluster_cond.cc @@ -1419,7 +1419,7 @@ int ha_ndbcluster_cond::generate_scan_filter_from_key(NdbScanOperation *op, uint32 pack_len= field->pack_length(); const byte* ptr= key; DBUG_PRINT("info", ("Filtering value for %s", field->field_name)); - DBUG_DUMP("key", (char*)ptr, pack_len); + DBUG_DUMP("key", (uchar*)ptr, pack_len); if (key_part->null_bit) { DBUG_PRINT("info", ("Generating ISNULL filter")); |