summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <monty@nosik.monty.fi>2006-11-22 14:11:36 +0200
committerunknown <monty@nosik.monty.fi>2006-11-22 14:11:36 +0200
commitb8fe9fb47f6b30aa72c16642ca51d84650169817 (patch)
treebd11d4efaf1d6469e7f29237347f12cdf71e605a /storage
parent7463704e1c706ea8e76e4d0022383dfd776e458e (diff)
parent886965303155d1c2fbd90e3606fd192d4ba7741b (diff)
downloadmariadb-git-b8fe9fb47f6b30aa72c16642ca51d84650169817.tar.gz
Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1 BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-my_lread.c: Auto merged BitKeeper/deleted/.del-my_lwrite.c: Auto merged client/mysqlbinlog.cc: Auto merged client/mysqldump.c: Auto merged cmd-line-utils/readline/complete.c: Auto merged extra/yassl/src/ssl.cpp: Auto merged libmysql/libmysql.c: Auto merged libmysqld/libmysqld.c: Auto merged mysql-test/mysql-test-run-shell.sh: Auto merged mysql-test/t/create.test: Auto merged mysql-test/t/csv.test: Auto merged mysql-test/t/ctype_cp1250_ch.test: Auto merged mysql-test/t/ctype_ucs.test: Auto merged mysql-test/t/func_sapdb.test: Auto merged mysql-test/t/func_str.test: Auto merged mysql-test/t/grant.test: Auto merged mysql-test/t/group_min_max.test: Auto merged mysql-test/t/innodb.test: Auto merged mysql-test/t/join.test: Auto merged mysql-test/t/select.test: Auto merged mysql-test/t/sp-prelocking.test: Auto merged mysql-test/t/strict.test: Auto merged mysql-test/t/subselect.test: Auto merged mysql-test/t/type_newdecimal.test: Auto merged mysql-test/t/view_grant.test: Auto merged mysys/default.c: Auto merged mysys/mf_iocache.c: Auto merged mysys/mf_keycache.c: Auto merged mysys/my_alloc.c: Auto merged mysys/my_dup.c: Auto merged mysys/my_getwd.c: Auto merged mysys/my_handler.c: Auto merged mysys/my_lib.c: Auto merged mysys/my_malloc.c: Auto merged mysys/my_pread.c: Auto merged mysys/my_seek.c: Auto merged mysys/safemalloc.c: Auto merged sql/Makefile.am: Auto merged sql/filesort.cc: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_subselect.cc: Auto merged sql/log_event.cc: Auto merged sql/net_serv.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_repl.cc: Auto merged sql-common/client.c: Auto merged sql-common/my_time.c: Auto merged sql/sql_select.cc: Auto merged sql/sql_update.cc: Auto merged sql/strfunc.cc: Auto merged sql/tztime.cc: Auto merged sql/unireg.cc: Auto merged storage/heap/_check.c: Auto merged storage/heap/hp_delete.c: Auto merged storage/heap/hp_hash.c: Auto merged storage/heap/hp_open.c: Auto merged storage/heap/hp_rkey.c: Auto merged storage/heap/hp_rrnd.c: Auto merged storage/heap/hp_write.c: Auto merged storage/myisam/ha_myisam.cc: Auto merged storage/myisam/mi_close.c: Auto merged storage/myisam/mi_delete.c: Auto merged storage/myisam/mi_dynrec.c: Auto merged storage/myisam/mi_keycache.c: Auto merged storage/myisam/mi_page.c: Auto merged storage/myisam/mi_statrec.c: Auto merged storage/myisam/mi_test2.c: Auto merged storage/myisam/mi_write.c: Auto merged storage/myisam/myisampack.c: Auto merged storage/myisammrg/ha_myisammrg.cc: Auto merged storage/myisammrg/myrg_extra.c: Auto merged storage/ndb/include/logger/LogHandler.hpp: Auto merged storage/ndb/include/util/OutputStream.hpp: Auto merged storage/ndb/src/common/debugger/EventLogger.cpp: Auto merged storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp: Auto merged storage/ndb/src/common/logger/LogHandler.cpp: Auto merged storage/ndb/src/common/portlib/NdbMutex.c: Auto merged storage/ndb/src/common/portlib/NdbThread.c: Auto merged storage/ndb/src/common/transporter/Transporter.cpp: Auto merged storage/ndb/src/cw/cpcd/CPCD.hpp: Auto merged storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp: Auto merged storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Auto merged storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp: Auto merged storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp: Auto merged storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.cpp: Auto merged storage/ndb/src/kernel/error/ErrorReporter.hpp: Auto merged storage/ndb/src/kernel/error/ndbd_exit_codes.c: Auto merged storage/ndb/src/kernel/vm/TransporterCallback.cpp: Auto merged storage/ndb/src/mgmapi/mgmapi.cpp: Auto merged storage/ndb/src/mgmclient/CommandInterpreter.cpp: Auto merged storage/ndb/src/mgmsrv/MgmtSrvr.cpp: Auto merged storage/ndb/src/mgmsrv/Services.cpp: Auto merged storage/ndb/src/ndbapi/ClusterMgr.cpp: Auto merged storage/ndb/src/ndbapi/DictCache.cpp: Auto merged storage/ndb/src/ndbapi/Ndb.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationExec.cpp: Auto merged storage/ndb/src/ndbapi/NdbOperationInt.cpp: Auto merged storage/ndb/src/ndbapi/NdbTransaction.cpp: Auto merged storage/ndb/src/ndbapi/Ndbif.cpp: Auto merged storage/ndb/tools/drop_index.cpp: Auto merged storage/ndb/tools/drop_tab.cpp: Auto merged storage/ndb/tools/ndb_condig.cpp: Auto merged tests/mysql_client_test.c: Auto merged vio/viossl.c: Auto merged vio/viosslfactories.c: Auto merged BUILD/SETUP.sh: Use local version client/client_priv.h: Manual merge mysql-test/mysql-test-run.pl: Manual merge mysql-test/r/ctype_cp1250_ch.result: Manual merge mysql-test/t/disabled.def: Manual merge mysys/hash.c: Manual merge mysys/thr_lock.c: Manual merge server-tools/instance-manager/mysql_connection.cc: Manual merge sql/ha_ndbcluster.cc: Manual merge sql/handler.cc: Manual merge sql/item_timefunc.cc: Manual merge sql/mysqld.cc: Manual merge sql/opt_range.cc: Manual merge sql/slave.cc: Manual merge sql/sql_parse.cc: Manual merge sql/sql_prepare.cc: Manual merge sql/sql_view.cc: Manual merge sql/table.cc: Manual merge storage/archive/ha_archive.cc: Manual merge storage/federated/ha_federated.cc: Manual merge storage/federated/ha_federated.h: Manual merge storage/innobase/handler/ha_innodb.cc: Manual merge storage/ndb/include/ndb_global.h.in: Manual merge storage/ndb/include/util/InputStream.hpp: Manual merge storage/ndb/include/util/SimpleProperties.hpp: Manual merge storage/ndb/src/kernel/blocks/backup/Backup.cpp: Manual merge storage/ndb/src/ndbapi/NdbOperationDefine.cpp: Manual merge storage/ndb/src/ndbapi/NdbOperationSearch.cpp: Manual merge storage/ndb/src/ndbapi/Ndbinit.cpp: Manual merge storage/ndb/src/ndbapi/ndb_cluster_connection.cpp: Manual merge strings/decimal.c: Manual merge vio/viosocket.c: Manual merge
Diffstat (limited to 'storage')
-rw-r--r--storage/archive/ha_archive.cc6
-rw-r--r--storage/federated/ha_federated.cc12
-rw-r--r--storage/heap/_check.c27
-rw-r--r--storage/heap/hp_delete.c4
-rw-r--r--storage/heap/hp_hash.c2
-rw-r--r--storage/heap/hp_open.c5
-rw-r--r--storage/heap/hp_rkey.c2
-rw-r--r--storage/heap/hp_rrnd.c4
-rw-r--r--storage/heap/hp_write.c8
-rw-r--r--storage/innobase/handler/ha_innodb.cc4
-rw-r--r--storage/myisam/ha_myisam.cc2
-rw-r--r--storage/myisam/mi_close.c5
-rw-r--r--storage/myisam/mi_delete.c9
-rw-r--r--storage/myisam/mi_dynrec.c4
-rw-r--r--storage/myisam/mi_keycache.c4
-rw-r--r--storage/myisam/mi_page.c4
-rw-r--r--storage/myisam/mi_statrec.c4
-rw-r--r--storage/myisam/mi_write.c18
-rw-r--r--storage/myisam/myisampack.c14
-rw-r--r--storage/myisammrg/ha_myisammrg.cc2
-rw-r--r--storage/myisammrg/myrg_extra.c2
-rw-r--r--storage/ndb/include/logger/LogHandler.hpp2
-rw-r--r--storage/ndb/include/ndb_global.h.in5
-rw-r--r--storage/ndb/include/util/SimpleProperties.hpp6
-rw-r--r--storage/ndb/src/common/debugger/EventLogger.cpp3
-rw-r--r--storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp3
-rw-r--r--storage/ndb/src/common/logger/LogHandler.cpp4
-rw-r--r--storage/ndb/src/common/portlib/NdbMutex.c4
-rw-r--r--storage/ndb/src/common/portlib/NdbThread.c4
-rw-r--r--storage/ndb/src/common/transporter/Transporter.cpp4
-rw-r--r--storage/ndb/src/cw/cpcd/CPCD.hpp1
-rw-r--r--storage/ndb/src/kernel/blocks/backup/Backup.cpp167
-rw-r--r--storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp8
-rw-r--r--storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp6
-rw-r--r--storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp7
-rw-r--r--storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp7
-rw-r--r--storage/ndb/src/kernel/error/ErrorReporter.cpp1
-rw-r--r--storage/ndb/src/kernel/error/ErrorReporter.hpp2
-rw-r--r--storage/ndb/src/kernel/error/ndbd_exit_codes.c1
-rw-r--r--storage/ndb/src/kernel/vm/TransporterCallback.cpp2
-rw-r--r--storage/ndb/src/mgmapi/mgmapi.cpp4
-rw-r--r--storage/ndb/src/mgmclient/CommandInterpreter.cpp4
-rw-r--r--storage/ndb/src/mgmsrv/MgmtSrvr.cpp8
-rw-r--r--storage/ndb/src/mgmsrv/Services.cpp2
-rw-r--r--storage/ndb/src/ndbapi/ClusterMgr.cpp2
-rw-r--r--storage/ndb/src/ndbapi/DictCache.cpp3
-rw-r--r--storage/ndb/src/ndbapi/Ndb.cpp17
-rw-r--r--storage/ndb/src/ndbapi/NdbOperationDefine.cpp4
-rw-r--r--storage/ndb/src/ndbapi/NdbOperationExec.cpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbOperationInt.cpp4
-rw-r--r--storage/ndb/src/ndbapi/NdbOperationSearch.cpp4
-rw-r--r--storage/ndb/src/ndbapi/NdbTransaction.cpp4
-rw-r--r--storage/ndb/src/ndbapi/Ndbif.cpp4
-rw-r--r--storage/ndb/src/ndbapi/Ndbinit.cpp4
-rw-r--r--storage/ndb/src/ndbapi/ndb_cluster_connection.cpp2
-rw-r--r--storage/ndb/tools/drop_index.cpp3
-rw-r--r--storage/ndb/tools/drop_tab.cpp3
-rw-r--r--storage/ndb/tools/ndb_condig.cpp2
59 files changed, 245 insertions, 212 deletions
diff --git a/storage/archive/ha_archive.cc b/storage/archive/ha_archive.cc
index 83fafe27d21..172f0b524fb 100644
--- a/storage/archive/ha_archive.cc
+++ b/storage/archive/ha_archive.cc
@@ -773,8 +773,8 @@ int ha_archive::real_write_row(byte *buf, azio_stream *writer)
DBUG_ENTER("ha_archive::real_write_row");
written= azwrite(writer, buf, table->s->reclength);
- DBUG_PRINT("ha_archive::real_write_row", ("Wrote %d bytes expected %d",
- written, table->s->reclength));
+ DBUG_PRINT("ha_archive::real_write_row", ("Wrote %d bytes expected %lu",
+ (int) written, table->s->reclength));
if (!delayed_insert || !bulk_insert)
share->dirty= TRUE;
@@ -1099,7 +1099,7 @@ int ha_archive::get_row(azio_stream *file_to_read, byte *buf)
DBUG_ENTER("ha_archive::get_row");
read= azread(file_to_read, buf, table->s->reclength);
- DBUG_PRINT("ha_archive::get_row", ("Read %d bytes expected %d", read,
+ DBUG_PRINT("ha_archive::get_row", ("Read %d bytes expected %lu", (int) read,
table->s->reclength));
if (read == Z_STREAM_ERROR)
diff --git a/storage/federated/ha_federated.cc b/storage/federated/ha_federated.cc
index 8897e1ee53a..13ff2f21428 100644
--- a/storage/federated/ha_federated.cc
+++ b/storage/federated/ha_federated.cc
@@ -560,8 +560,8 @@ static int parse_url_error(FEDERATED_SHARE *share, TABLE *table, int error_num)
if (share->scheme)
{
DBUG_PRINT("info",
- ("error: parse_url. Returning error code %d \
- freeing share->scheme %lx", error_num, share->scheme));
+ ("error: parse_url. Returning error code %d freeing share->scheme 0x%lx",
+ error_num, (long) share->scheme));
my_free((gptr) share->scheme, MYF(0));
share->scheme= 0;
}
@@ -627,7 +627,7 @@ static int parse_url(FEDERATED_SHARE *share, TABLE *table,
MYF(0));
share->connect_string_length= table->s->connect_string.length;
- DBUG_PRINT("info",("parse_url alloced share->scheme %lx", share->scheme));
+ DBUG_PRINT("info",("parse_url alloced share->scheme 0x%lx", (long) share->scheme));
/*
remove addition of null terminator and store length
@@ -1750,7 +1750,7 @@ void ha_federated::update_auto_increment(void)
thd->first_successful_insert_id_in_cur_stmt=
mysql->last_used_con->insert_id;
- DBUG_PRINT("info",("last_insert_id %d", stats.auto_increment_value));
+ DBUG_PRINT("info",("last_insert_id: %ld", (long) stats.auto_increment_value));
DBUG_VOID_RETURN;
}
@@ -2023,8 +2023,8 @@ int ha_federated::delete_row(const byte *buf)
stats.deleted+= (ha_rows)mysql->affected_rows;
stats.records-= (ha_rows)mysql->affected_rows;
DBUG_PRINT("info",
- ("rows deleted %d rows deleted for all time %d",
- int(mysql->affected_rows), stats.deleted));
+ ("rows deleted %ld rows deleted for all time %ld",
+ (long) mysql->affected_rows, (long) stats.deleted));
DBUG_RETURN(0);
}
diff --git a/storage/heap/_check.c b/storage/heap/_check.c
index cc832f8ed5b..c861fdb582f 100644
--- a/storage/heap/_check.c
+++ b/storage/heap/_check.c
@@ -88,7 +88,8 @@ int heap_check_heap(HP_INFO *info, my_bool print_status)
if (records != share->records || deleted != share->deleted)
{
DBUG_PRINT("error",("Found rows: %lu (%lu) deleted %lu (%lu)",
- records, share->records, deleted, share->deleted));
+ records, (ulong) share->records,
+ deleted, (ulong) share->deleted));
error= 1;
}
*info= save_info;
@@ -100,9 +101,9 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
ulong blength, my_bool print_status)
{
int error;
- uint i,found,max_links,seek,links;
- uint rec_link; /* Only used with debugging */
- uint hash_buckets_found;
+ ulong i,found,max_links,seek,links;
+ ulong rec_link; /* Only used with debugging */
+ ulong hash_buckets_found;
HASH_INFO *hash_info;
error=0;
@@ -123,7 +124,9 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
blength, records))
!= i)
{
- DBUG_PRINT("error",("Record in wrong link: Link %d Record: 0x%lx Record-link %d", i,hash_info->ptr_to_rec,rec_link));
+ DBUG_PRINT("error",
+ ("Record in wrong link: Link %lu Record: 0x%lx Record-link %lu",
+ i, (long) hash_info->ptr_to_rec, rec_link));
error=1;
}
else
@@ -141,18 +144,18 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
if (keydef->hash_buckets != hash_buckets_found)
{
DBUG_PRINT("error",("Found %ld buckets, stats shows %ld buckets",
- hash_buckets_found, keydef->hash_buckets));
+ hash_buckets_found, (long) keydef->hash_buckets));
error=1;
}
DBUG_PRINT("info",
- ("records: %ld seeks: %d max links: %d hitrate: %.2f "
- "buckets: %d",
+ ("records: %ld seeks: %lu max links: %lu hitrate: %.2f "
+ "buckets: %lu",
records,seek,max_links,
(float) seek / (float) (records ? records : 1),
hash_buckets_found));
if (print_status)
- printf("Key: %d records: %ld seeks: %d max links: %d "
- "hitrate: %.2f buckets: %d\n",
+ printf("Key: %d records: %ld seeks: %lu max links: %lu "
+ "hitrate: %.2f buckets: %lu\n",
keynr, records, seek, max_links,
(float) seek / (float) (records ? records : 1),
hash_buckets_found);
@@ -180,8 +183,8 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records,
key_length, SEARCH_FIND | SEARCH_SAME, not_used))
{
error= 1;
- DBUG_PRINT("error",("Record in wrong link: key: %d Record: 0x%lx\n",
- keynr, recpos));
+ DBUG_PRINT("error",("Record in wrong link: key: %u Record: 0x%lx\n",
+ keynr, (long) recpos));
}
else
found++;
diff --git a/storage/heap/hp_delete.c b/storage/heap/hp_delete.c
index f18c5e7054c..2ef57624e77 100644
--- a/storage/heap/hp_delete.c
+++ b/storage/heap/hp_delete.c
@@ -24,7 +24,7 @@ int heap_delete(HP_INFO *info, const byte *record)
HP_SHARE *share=info->s;
HP_KEYDEF *keydef, *end, *p_lastinx;
DBUG_ENTER("heap_delete");
- DBUG_PRINT("enter",("info: %lx record: 0x%lx",info,record));
+ DBUG_PRINT("enter",("info: 0x%lx record: 0x%lx", (long) info, (long) record));
test_active(info);
@@ -144,7 +144,7 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
info->current_hash_ptr=last_ptr;
info->current_ptr = last_ptr ? last_ptr->ptr_to_rec : 0;
DBUG_PRINT("info",("Corrected current_ptr to point at: 0x%lx",
- info->current_ptr));
+ (long) info->current_ptr));
}
empty=pos;
if (gpos)
diff --git a/storage/heap/hp_hash.c b/storage/heap/hp_hash.c
index 77f3cf6d80b..6a537906929 100644
--- a/storage/heap/hp_hash.c
+++ b/storage/heap/hp_hash.c
@@ -120,7 +120,7 @@ byte *hp_search(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *key,
{
switch (nextflag) {
case 0: /* Search after key */
- DBUG_PRINT("exit",("found key at %d",pos->ptr_to_rec));
+ DBUG_PRINT("exit", ("found key at 0x%lx", (long) pos->ptr_to_rec));
info->current_hash_ptr=pos;
DBUG_RETURN(info->current_ptr= pos->ptr_to_rec);
case 1: /* Search next */
diff --git a/storage/heap/hp_open.c b/storage/heap/hp_open.c
index fd937229b0d..f50478c8b3d 100644
--- a/storage/heap/hp_open.c
+++ b/storage/heap/hp_open.c
@@ -64,7 +64,8 @@ HP_INFO *heap_open(const char *name, int mode)
info->opt_flag= READ_CHECK_USED; /* Check when changing */
#endif
DBUG_PRINT("exit",("heap: 0x%lx reclength: %d records_in_block: %d",
- info,share->reclength,share->block.records_in_block));
+ (long) info, share->reclength,
+ share->block.records_in_block));
DBUG_RETURN(info);
}
@@ -82,7 +83,7 @@ HP_SHARE *hp_find_named_heap(const char *name)
info= (HP_SHARE*) pos->data;
if (!strcmp(name, info->name))
{
- DBUG_PRINT("exit", ("Old heap_database: 0x%lx",info));
+ DBUG_PRINT("exit", ("Old heap_database: 0x%lx", (long) info));
DBUG_RETURN(info);
}
}
diff --git a/storage/heap/hp_rkey.c b/storage/heap/hp_rkey.c
index f5f22a877a1..f02d44cc456 100644
--- a/storage/heap/hp_rkey.c
+++ b/storage/heap/hp_rkey.c
@@ -23,7 +23,7 @@ int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key,
HP_SHARE *share= info->s;
HP_KEYDEF *keyinfo= share->keydef + inx;
DBUG_ENTER("heap_rkey");
- DBUG_PRINT("enter",("base: 0x%lx inx: %d",info,inx));
+ DBUG_PRINT("enter",("info: 0x%lx inx: %d", (long) info, inx));
if ((uint) inx >= share->keys)
{
diff --git a/storage/heap/hp_rrnd.c b/storage/heap/hp_rrnd.c
index 4daa3a06377..2f8556484a4 100644
--- a/storage/heap/hp_rrnd.c
+++ b/storage/heap/hp_rrnd.c
@@ -29,7 +29,7 @@ int heap_rrnd(register HP_INFO *info, byte *record, byte *pos)
{
HP_SHARE *share=info->s;
DBUG_ENTER("heap_rrnd");
- DBUG_PRINT("enter",("info: 0x%lx pos: %lx",info,pos));
+ DBUG_PRINT("enter",("info: 0x%lx pos: %lx",(long) info, (long) pos));
info->lastinx= -1;
if (!(info->current_ptr= pos))
@@ -44,7 +44,7 @@ int heap_rrnd(register HP_INFO *info, byte *record, byte *pos)
}
info->update=HA_STATE_PREV_FOUND | HA_STATE_NEXT_FOUND | HA_STATE_AKTIV;
memcpy(record,info->current_ptr,(size_t) share->reclength);
- DBUG_PRINT("exit",("found record at 0x%lx",info->current_ptr));
+ DBUG_PRINT("exit", ("found record at 0x%lx", (long) info->current_ptr));
info->current_hash_ptr=0; /* Can't use rnext */
DBUG_RETURN(0);
} /* heap_rrnd */
diff --git a/storage/heap/hp_write.c b/storage/heap/hp_write.c
index bc94e3bfae4..16f02999c93 100644
--- a/storage/heap/hp_write.c
+++ b/storage/heap/hp_write.c
@@ -138,7 +138,7 @@ static byte *next_free_record_pos(HP_SHARE *info)
pos=info->del_link;
info->del_link= *((byte**) pos);
info->deleted--;
- DBUG_PRINT("exit",("Used old position: 0x%lx",pos));
+ DBUG_PRINT("exit",("Used old position: 0x%lx",(long) pos));
DBUG_RETURN(pos);
}
if (!(block_pos=(info->records % info->block.records_in_block)))
@@ -153,9 +153,9 @@ static byte *next_free_record_pos(HP_SHARE *info)
DBUG_RETURN(NULL);
info->data_length+=length;
}
- DBUG_PRINT("exit",("Used new position: %lx",
- (byte*) info->block.level_info[0].last_blocks+block_pos*
- info->block.recbuffer));
+ DBUG_PRINT("exit",("Used new position: 0x%lx",
+ (long) ((byte*) info->block.level_info[0].last_blocks+
+ block_pos * info->block.recbuffer)));
DBUG_RETURN((byte*) info->block.level_info[0].last_blocks+
block_pos*info->block.recbuffer);
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index cc7be545cf1..4ca767f811d 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -4445,7 +4445,7 @@ ha_innobase::rnd_pos(
}
if (error) {
- DBUG_PRINT("error", ("Got error: %ld", error));
+ DBUG_PRINT("error", ("Got error: %d", error));
DBUG_RETURN(error);
}
@@ -4455,7 +4455,7 @@ ha_innobase::rnd_pos(
error = index_read(buf, pos, ref_length, HA_READ_KEY_EXACT);
if (error) {
- DBUG_PRINT("error", ("Got error: %ld", error));
+ DBUG_PRINT("error", ("Got error: %d", error));
}
change_active_index(keynr);
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 9335b01d008..f407f62fa0c 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/storage/myisam/ha_myisam.cc
@@ -1589,7 +1589,7 @@ int ha_myisam::create(const char *name, register TABLE *table_arg,
}
}
DBUG_PRINT("loop",("found: 0x%lx recpos: %d minpos: %d length: %d",
- found,recpos,minpos,length));
+ (long) found, recpos, minpos, length));
if (recpos != minpos)
{ // Reserved space (Null bits?)
bzero((char*) recinfo_pos,sizeof(*recinfo_pos));
diff --git a/storage/myisam/mi_close.c b/storage/myisam/mi_close.c
index 9865ac72d62..0b7f98f4d06 100644
--- a/storage/myisam/mi_close.c
+++ b/storage/myisam/mi_close.c
@@ -28,8 +28,9 @@ int mi_close(register MI_INFO *info)
int error=0,flag;
MYISAM_SHARE *share=info->s;
DBUG_ENTER("mi_close");
- DBUG_PRINT("enter",("base: %lx reopen: %u locks: %u",
- info,(uint) share->reopen, (uint) share->tot_locks));
+ DBUG_PRINT("enter",("base: 0x%lx reopen: %u locks: %u",
+ (long) info, (uint) share->reopen,
+ (uint) share->tot_locks));
pthread_mutex_lock(&THR_LOCK_myisam);
if (info->lock_type == F_EXTRA_LCK)
diff --git a/storage/myisam/mi_delete.c b/storage/myisam/mi_delete.c
index 85cc60bdd9d..471420d99c0 100644
--- a/storage/myisam/mi_delete.c
+++ b/storage/myisam/mi_delete.c
@@ -165,7 +165,7 @@ static int _mi_ck_real_delete(register MI_INFO *info, MI_KEYDEF *keyinfo,
DBUG_PRINT("error",("Couldn't allocate memory"));
DBUG_RETURN(my_errno=ENOMEM);
}
- DBUG_PRINT("info",("root_page: %ld",old_root));
+ DBUG_PRINT("info",("root_page: %ld", (long) old_root));
if (!_mi_fetch_keypage(info,keyinfo,old_root,DFLT_INIT_HITS,root_buff,0))
{
error= -1;
@@ -410,7 +410,7 @@ static int del(register MI_INFO *info, register MI_KEYDEF *keyinfo, uchar *key,
MYISAM_SHARE *share=info->s;
MI_KEY_PARAM s_temp;
DBUG_ENTER("del");
- DBUG_PRINT("enter",("leaf_page: %ld keypos: 0x%lx", leaf_page,
+ 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));
@@ -597,7 +597,8 @@ static int underflow(register MI_INFO *info, register MI_KEYDEF *keyinfo,
else
{ /* Page is full */
endpos=anc_buff+anc_length;
- DBUG_PRINT("test",("anc_buff: %lx endpos: %lx",anc_buff,endpos));
+ DBUG_PRINT("test",("anc_buff: 0x%lx endpos: 0x%lx",
+ (long) anc_buff, (long) endpos));
if (keypos != anc_buff+2+key_reflength &&
!_mi_get_last_key(info,keyinfo,anc_buff,anc_key,keypos,&length))
goto err;
@@ -775,7 +776,7 @@ static uint remove_key(MI_KEYDEF *keyinfo, uint nod_flag,
int s_length;
uchar *start;
DBUG_ENTER("remove_key");
- DBUG_PRINT("enter",("keypos: %lx page_end: %lx",keypos,page_end));
+ DBUG_PRINT("enter",("keypos: 0x%lx page_end: 0x%lx",(long) keypos, (long) page_end));
start=keypos;
if (!(keyinfo->flag &
diff --git a/storage/myisam/mi_dynrec.c b/storage/myisam/mi_dynrec.c
index 8d45333137e..5f0c26a8607 100644
--- a/storage/myisam/mi_dynrec.c
+++ b/storage/myisam/mi_dynrec.c
@@ -1240,8 +1240,8 @@ ulong _mi_rec_unpack(register MI_INFO *info, register byte *to, byte *from,
err:
my_errno= HA_ERR_WRONG_IN_RECORD;
- DBUG_PRINT("error",("to_end: %lx -> %lx from_end: %lx -> %lx",
- to,to_end,from,from_end));
+ 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_RETURN(MY_FILE_ERROR);
} /* _mi_rec_unpack */
diff --git a/storage/myisam/mi_keycache.c b/storage/myisam/mi_keycache.c
index b4122089d1d..bf69a6233f9 100644
--- a/storage/myisam/mi_keycache.c
+++ b/storage/myisam/mi_keycache.c
@@ -54,8 +54,8 @@ int mi_assign_to_key_cache(MI_INFO *info,
int error= 0;
MYISAM_SHARE* share= info->s;
DBUG_ENTER("mi_assign_to_key_cache");
- DBUG_PRINT("enter",("old_key_cache_handle: %lx new_key_cache_handle: %lx",
- share->key_cache, key_cache));
+ DBUG_PRINT("enter",("old_key_cache_handle: 0x%lx new_key_cache_handle: 0x%lx",
+ (long) share->key_cache, (long) key_cache));
/*
Skip operation if we didn't change key cache. This can happen if we
diff --git a/storage/myisam/mi_page.c b/storage/myisam/mi_page.c
index a5e2b01ed0f..33921c09a68 100644
--- a/storage/myisam/mi_page.c
+++ b/storage/myisam/mi_page.c
@@ -27,7 +27,7 @@ uchar *_mi_fetch_keypage(register MI_INFO *info, MI_KEYDEF *keyinfo,
uchar *tmp;
uint page_size;
DBUG_ENTER("_mi_fetch_keypage");
- DBUG_PRINT("enter",("page: %ld",page));
+ DBUG_PRINT("enter",("page: %ld", (long) page));
tmp=(uchar*) key_cache_read(info->s->key_cache,
info->s->kfile, page, level, (byte*) buff,
@@ -80,7 +80,7 @@ int _mi_write_keypage(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_errno=EINVAL;
DBUG_RETURN((-1));
}
- DBUG_PRINT("page",("write page at: %lu",(long) page,buff));
+ DBUG_PRINT("page",("write page at: %lu",(long) page));
DBUG_DUMP("buff",(byte*) buff,mi_getint(buff));
#endif
diff --git a/storage/myisam/mi_statrec.c b/storage/myisam/mi_statrec.c
index 70e63ef8ce1..b3ebeb24bad 100644
--- a/storage/myisam/mi_statrec.c
+++ b/storage/myisam/mi_statrec.c
@@ -254,8 +254,8 @@ int _mi_read_rnd_static_record(MI_INFO *info, byte *buf,
if (filepos >= info->state->data_file_length)
{
DBUG_PRINT("test",("filepos: %ld (%ld) records: %ld del: %ld",
- filepos/share->base.reclength,filepos,
- info->state->records, info->state->del));
+ (long) filepos/share->base.reclength, (long) filepos,
+ (long) info->state->records, (long) info->state->del));
fast_mi_writeinfo(info);
DBUG_RETURN(my_errno=HA_ERR_END_OF_FILE);
}
diff --git a/storage/myisam/mi_write.c b/storage/myisam/mi_write.c
index 7080875009b..32f2aac6859 100644
--- a/storage/myisam/mi_write.c
+++ b/storage/myisam/mi_write.c
@@ -351,7 +351,7 @@ static int w_search(register MI_INFO *info, register MI_KEYDEF *keyinfo,
my_bool was_last_key;
my_off_t next_page, dupp_key_pos;
DBUG_ENTER("w_search");
- DBUG_PRINT("enter",("page: %ld",page));
+ DBUG_PRINT("enter",("page: %ld", (long) page));
search_key_length= (comp_flag & SEARCH_FIND) ? key_length : USE_WHOLE_KEY;
if (!(temp_buff= (uchar*) my_alloca((uint) keyinfo->block_length+
@@ -474,7 +474,7 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo,
uchar *endpos, *prev_key;
MI_KEY_PARAM s_temp;
DBUG_ENTER("_mi_insert");
- DBUG_PRINT("enter",("key_pos: %lx",key_pos));
+ DBUG_PRINT("enter",("key_pos: 0x%lx", (long) key_pos));
DBUG_EXECUTE("key",_mi_print_key(DBUG_FILE,keyinfo->seg,key,USE_WHOLE_KEY););
nod_flag=mi_test_if_nod(anc_buff);
@@ -495,8 +495,8 @@ int _mi_insert(register MI_INFO *info, register MI_KEYDEF *keyinfo,
{
DBUG_PRINT("test",("t_length: %d ref_len: %d",
t_length,s_temp.ref_length));
- DBUG_PRINT("test",("n_ref_len: %d n_length: %d key_pos: %lx",
- s_temp.n_ref_length,s_temp.n_length,s_temp.key));
+ DBUG_PRINT("test",("n_ref_len: %d n_length: %d key_pos: 0x%lx",
+ s_temp.n_ref_length,s_temp.n_length, (long) s_temp.key));
}
#endif
if (t_length > 0)
@@ -689,7 +689,8 @@ uchar *_mi_find_half_pos(uint nod_flag, MI_KEYDEF *keyinfo, uchar *page,
} while (page < end);
*return_key_length=length;
*after_key=page;
- DBUG_PRINT("exit",("returns: %lx page: %lx half: %lx",lastpos,page,end));
+ DBUG_PRINT("exit",("returns: 0x%lx page: 0x%lx half: 0x%lx",
+ (long) lastpos, (long) page, (long) end));
DBUG_RETURN(lastpos);
} /* _mi_find_half_pos */
@@ -744,7 +745,8 @@ static uchar *_mi_find_last_pos(MI_KEYDEF *keyinfo, uchar *page,
}
*return_key_length=last_length;
*after_key=lastpos;
- DBUG_PRINT("exit",("returns: %lx page: %lx end: %lx",prevpos,page,end));
+ DBUG_PRINT("exit",("returns: 0x%lx page: 0x%lx end: 0x%lx",
+ (long) prevpos,(long) page,(long) end));
DBUG_RETURN(prevpos);
} /* _mi_find_last_pos */
@@ -780,7 +782,7 @@ static int _mi_balance_page(register MI_INFO *info, MI_KEYDEF *keyinfo,
next_page= _mi_kpos(info->s->base.key_reflength,
father_key_pos+father_keylength);
buff=info->buff;
- DBUG_PRINT("test",("use right page: %lu",next_page));
+ DBUG_PRINT("test",("use right page: %lu", (ulong) next_page));
}
else
{
@@ -789,7 +791,7 @@ static int _mi_balance_page(register MI_INFO *info, MI_KEYDEF *keyinfo,
next_page= _mi_kpos(info->s->base.key_reflength,father_key_pos);
/* Fix that curr_buff is to left */
buff=curr_buff; curr_buff=info->buff;
- DBUG_PRINT("test",("use left page: %lu",next_page));
+ DBUG_PRINT("test",("use left page: %lu", (ulong) next_page));
} /* father_key_pos ptr to parting key */
if (!_mi_fetch_keypage(info,keyinfo,next_page,DFLT_INIT_HITS,info->buff,0))
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index be68ffbdc5a..810c12327a0 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -2036,7 +2036,7 @@ static void write_field_info(HUFF_COUNTS *counts, uint fields, uint trees)
uint huff_tree_bits;
huff_tree_bits=max_bit(trees ? trees-1 : 0);
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
DBUG_PRINT("info", ("column types:"));
DBUG_PRINT("info", ("FIELD_NORMAL 0"));
DBUG_PRINT("info", ("FIELD_SKIP_ENDSPACE 1"));
@@ -2048,12 +2048,12 @@ static void write_field_info(HUFF_COUNTS *counts, uint fields, uint trees)
DBUG_PRINT("info", ("FIELD_ZERO 7"));
DBUG_PRINT("info", ("FIELD_VARCHAR 8"));
DBUG_PRINT("info", ("FIELD_CHECK 9"));
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
DBUG_PRINT("info", ("pack type as a set of flags:"));
DBUG_PRINT("info", ("PACK_TYPE_SELECTED 1"));
DBUG_PRINT("info", ("PACK_TYPE_SPACE_FIELDS 2"));
DBUG_PRINT("info", ("PACK_TYPE_ZERO_FILL 4"));
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
if (verbose >= 2)
{
VOID(printf("\n"));
@@ -2126,7 +2126,7 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
return 0;
}
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
if (verbose >= 2)
VOID(printf("\n"));
tree_no= 0;
@@ -2137,7 +2137,7 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
if (huff_tree->tree_number == 0)
continue; /* Deleted tree */
tree_no++;
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
if (verbose >= 3)
VOID(printf("\n"));
/* Count the total number of elements (byte codes or column values). */
@@ -2329,7 +2329,7 @@ static my_off_t write_huff_tree(HUFF_TREE *huff_tree, uint trees)
}
flush_bits();
}
- DBUG_PRINT("info", (""));
+ DBUG_PRINT("info", (" "));
if (verbose >= 2)
VOID(printf("\n"));
my_afree((gptr) packed_tree);
@@ -2507,7 +2507,7 @@ static int compress_isam_file(PACK_MRG_INFO *mrg, HUFF_COUNTS *huff_counts)
end_pos-=count->max_zero_fill;
field_length-=count->max_zero_fill;
- switch(count->field_type) {
+ switch (count->field_type) {
case FIELD_SKIP_ZERO:
if (!memcmp((byte*) start_pos,zero_string,field_length))
{
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index 57ef1dad6f7..8102fc4018b 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -92,7 +92,7 @@ int ha_myisammrg::open(const char *name, int mode, uint test_if_locked)
if (table->s->reclength != stats.mean_rec_length && stats.mean_rec_length)
{
- DBUG_PRINT("error",("reclength: %d mean_rec_length: %d",
+ DBUG_PRINT("error",("reclength: %lu mean_rec_length: %lu",
table->s->reclength, stats.mean_rec_length));
goto err;
}
diff --git a/storage/myisammrg/myrg_extra.c b/storage/myisammrg/myrg_extra.c
index ef7eeb9d4d9..2d6f9423de9 100644
--- a/storage/myisammrg/myrg_extra.c
+++ b/storage/myisammrg/myrg_extra.c
@@ -28,7 +28,7 @@ int myrg_extra(MYRG_INFO *info,enum ha_extra_function function,
int error,save_error=0;
MYRG_TABLE *file;
DBUG_ENTER("myrg_extra");
- DBUG_PRINT("info",("function: %d",(ulong) function));
+ DBUG_PRINT("info",("function: %lu", (ulong) function));
if (function == HA_EXTRA_CACHE)
{
diff --git a/storage/ndb/include/logger/LogHandler.hpp b/storage/ndb/include/logger/LogHandler.hpp
index 8b9aa43d7a9..efb87bb3104 100644
--- a/storage/ndb/include/logger/LogHandler.hpp
+++ b/storage/ndb/include/logger/LogHandler.hpp
@@ -135,7 +135,7 @@ public:
*
* @param str the error string.
*/
- void setErrorStr(char* str);
+ void setErrorStr(const char* str);
/**
* Parse logstring parameters
diff --git a/storage/ndb/include/ndb_global.h.in b/storage/ndb/include/ndb_global.h.in
index a427e5c820d..0befd0ab026 100644
--- a/storage/ndb/include/ndb_global.h.in
+++ b/storage/ndb/include/ndb_global.h.in
@@ -133,6 +133,11 @@ extern "C" {
#define PATH_MAX 1024
#endif
+#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
+#define LINT_SET_PTR = {0,0}
+#else
+#define LINT_SET_PTR
+
#ifndef MIN
#define MIN(x,y) (((x)<(y))?(x):(y))
#endif
diff --git a/storage/ndb/include/util/SimpleProperties.hpp b/storage/ndb/include/util/SimpleProperties.hpp
index bae91108518..60aeca1ed50 100644
--- a/storage/ndb/include/util/SimpleProperties.hpp
+++ b/storage/ndb/include/util/SimpleProperties.hpp
@@ -153,6 +153,7 @@ public:
ValueType m_type;
protected:
Reader();
+ virtual ~Reader() {}
virtual void reset() = 0;
virtual bool step(Uint32 len) = 0;
@@ -174,6 +175,7 @@ public:
bool add(Uint16 key, const char * value);
bool add(Uint16 key, const void* value, int len);
protected:
+ virtual ~Writer() {}
virtual bool reset() = 0;
virtual bool putWord(Uint32 val) = 0;
virtual bool putWords(const Uint32 * src, Uint32 len) = 0;
@@ -190,6 +192,7 @@ public:
SimplePropertiesLinearReader(const Uint32 * src, Uint32 len);
virtual ~SimplePropertiesLinearReader() {}
+ virtual ~SimplePropertiesLinearReader() {}
virtual void reset();
virtual bool step(Uint32 len);
virtual bool getWord(Uint32 * dst);
@@ -227,6 +230,7 @@ public:
UtilBufferWriter(class UtilBuffer & buf);
virtual ~UtilBufferWriter() {}
+ virtual ~UtilBufferWriter() {}
virtual bool reset();
virtual bool putWord(Uint32 val);
virtual bool putWords(const Uint32 * src, Uint32 len);
@@ -247,7 +251,6 @@ public:
class SectionSegmentPool &);
virtual ~SimplePropertiesSectionReader() {}
-
virtual void reset();
virtual bool step(Uint32 len);
virtual bool getWord(Uint32 * dst);
@@ -281,6 +284,7 @@ public:
SimplePropertiesSectionWriter(class SectionSegmentPool &);
virtual ~SimplePropertiesSectionWriter() {}
+ virtual ~SimplePropertiesSectionWriter() {}
virtual bool reset();
virtual bool putWord(Uint32 val);
virtual bool putWords(const Uint32 * src, Uint32 len);
diff --git a/storage/ndb/src/common/debugger/EventLogger.cpp b/storage/ndb/src/common/debugger/EventLogger.cpp
index f1c6084754f..ca1d2381693 100644
--- a/storage/ndb/src/common/debugger/EventLogger.cpp
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp
@@ -115,8 +115,7 @@ void getTextNDBStopForced(QQQQ) {
int sphase = theData[4];
int extra = theData[5];
getRestartAction(theData[1],action_str);
- if (signal)
- reason_str.appfmt(" Initiated by signal %d.", signum);
+ reason_str.appfmt(" Initiated by signal %d.", signum);
if (error)
{
ndbd_exit_classification cl;
diff --git a/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp b/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp
index 27fed22ac72..7410db44aa3 100644
--- a/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp
+++ b/storage/ndb/src/common/debugger/signaldata/BackupSignalData.cpp
@@ -124,6 +124,9 @@ printABORT_BACKUP_ORD(FILE * out, const Uint32 * data, Uint32 len, Uint16 b){
sig->backupPtr, sig->backupId);
return true;
break;
+ case AbortBackupOrd::AbortScan:
+ case AbortBackupOrd::IncompatibleVersions:
+ return false;
}
return false;
}
diff --git a/storage/ndb/src/common/logger/LogHandler.cpp b/storage/ndb/src/common/logger/LogHandler.cpp
index c11f962d4fb..47333f81812 100644
--- a/storage/ndb/src/common/logger/LogHandler.cpp
+++ b/storage/ndb/src/common/logger/LogHandler.cpp
@@ -164,9 +164,9 @@ LogHandler::getErrorStr()
}
void
-LogHandler::setErrorStr(char* str)
+LogHandler::setErrorStr(const char* str)
{
- m_errorStr= str;
+ m_errorStr= (char*) str;
}
bool
diff --git a/storage/ndb/src/common/portlib/NdbMutex.c b/storage/ndb/src/common/portlib/NdbMutex.c
index 4a170d87e5c..f0a1614ba8e 100644
--- a/storage/ndb/src/common/portlib/NdbMutex.c
+++ b/storage/ndb/src/common/portlib/NdbMutex.c
@@ -28,7 +28,7 @@ NdbMutex* NdbMutex_Create(void)
DBUG_ENTER("NdbMutex_Create");
pNdbMutex = (NdbMutex*)NdbMem_Allocate(sizeof(NdbMutex));
- DBUG_PRINT("info",("NdbMem_Allocate 0x%lx",pNdbMutex));
+ DBUG_PRINT("info",("NdbMem_Allocate 0x%lx", (long) pNdbMutex));
if (pNdbMutex == NULL)
DBUG_RETURN(NULL);
@@ -50,7 +50,7 @@ int NdbMutex_Destroy(NdbMutex* p_mutex)
result = pthread_mutex_destroy(p_mutex);
- DBUG_PRINT("info",("NdbMem_Free 0x%lx",p_mutex));
+ DBUG_PRINT("info",("NdbMem_Free 0x%lx", (long) p_mutex));
NdbMem_Free(p_mutex);
DBUG_RETURN(result);
diff --git a/storage/ndb/src/common/portlib/NdbThread.c b/storage/ndb/src/common/portlib/NdbThread.c
index b91e9c6a5b3..d6eea08b9f0 100644
--- a/storage/ndb/src/common/portlib/NdbThread.c
+++ b/storage/ndb/src/common/portlib/NdbThread.c
@@ -142,7 +142,7 @@ struct NdbThread* NdbThread_Create(NDB_THREAD_FUNC *p_thread_func,
}
pthread_attr_destroy(&thread_attr);
- DBUG_PRINT("exit",("ret: %lx", tmpThread));
+ DBUG_PRINT("exit",("ret: 0x%lx", (long) tmpThread));
DBUG_RETURN(tmpThread);
}
@@ -151,7 +151,7 @@ void NdbThread_Destroy(struct NdbThread** p_thread)
{
DBUG_ENTER("NdbThread_Destroy");
if (*p_thread != NULL){
- DBUG_PRINT("enter",("*p_thread: %lx", * p_thread));
+ DBUG_PRINT("enter",("*p_thread: 0x%lx", (long) *p_thread));
free(* p_thread);
* p_thread = 0;
}
diff --git a/storage/ndb/src/common/transporter/Transporter.cpp b/storage/ndb/src/common/transporter/Transporter.cpp
index 383456f1077..b2ee75e4754 100644
--- a/storage/ndb/src/common/transporter/Transporter.cpp
+++ b/storage/ndb/src/common/transporter/Transporter.cpp
@@ -39,8 +39,8 @@ Transporter::Transporter(TransporterRegistry &t_reg,
int _byteorder,
bool _compression, bool _checksum, bool _signalId)
: m_s_port(s_port), remoteNodeId(rNodeId), localNodeId(lNodeId),
- isServer(lNodeId==serverNodeId), isMgmConnection(_isMgmConnection),
- m_packer(_signalId, _checksum),
+ isServer(lNodeId==serverNodeId),
+ m_packer(_signalId, _checksum), isMgmConnection(_isMgmConnection),
m_type(_type),
m_transporter_registry(t_reg)
{
diff --git a/storage/ndb/src/cw/cpcd/CPCD.hpp b/storage/ndb/src/cw/cpcd/CPCD.hpp
index aecc43150c4..3a69a03aa3f 100644
--- a/storage/ndb/src/cw/cpcd/CPCD.hpp
+++ b/storage/ndb/src/cw/cpcd/CPCD.hpp
@@ -63,6 +63,7 @@ struct CPCEvent {
struct EventSubscriber {
virtual void report(const CPCEvent &) = 0;
+ virtual ~EventSubscriber() {}
};
/**
diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.cpp b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
index d6b557424e7..8081db7e18c 100644
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
@@ -228,7 +228,7 @@ Backup::execCONTINUEB(Signal* signal)
Uint32 tabPtr_I = Tdata2;
Uint32 fragPtr_I = signal->theData[3];
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptr_I);
TablePtr tabPtr;
ptr.p->tables.getPtr(tabPtr, tabPtr_I);
@@ -239,7 +239,7 @@ Backup::execCONTINUEB(Signal* signal)
FragmentPtr fragPtr;
tabPtr.p->fragments.getPtr(fragPtr, fragPtr_I);
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
const Uint32 sz = sizeof(BackupFormat::CtlFile::FragmentInfo) >> 2;
@@ -293,7 +293,7 @@ Backup::execCONTINUEB(Signal* signal)
case BackupContinueB::BUFFER_UNDERFLOW:
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, Tdata1);
checkFile(signal, filePtr);
return;
@@ -302,7 +302,7 @@ Backup::execCONTINUEB(Signal* signal)
case BackupContinueB::BUFFER_FULL_SCAN:
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, Tdata1);
checkScan(signal, filePtr);
return;
@@ -311,7 +311,7 @@ Backup::execCONTINUEB(Signal* signal)
case BackupContinueB::BUFFER_FULL_FRAG_COMPLETE:
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, Tdata1);
fragmentCompleted(signal, filePtr);
return;
@@ -320,16 +320,16 @@ Backup::execCONTINUEB(Signal* signal)
case BackupContinueB::BUFFER_FULL_META:
{
jam();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, Tdata1);
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
FsBuffer & buf = filePtr.p->operation.dataBuffer;
if(buf.getFreeSize() + buf.getMinRead() < buf.getUsableSize()) {
jam();
- TablePtr tabPtr;
+ TablePtr tabPtr LINT_SET_PTR;
c_tablePool.getPtr(tabPtr, Tdata2);
DEBUG_OUT("Backup - Buffer full - " << buf.getFreeSize()
@@ -344,7 +344,7 @@ Backup::execCONTINUEB(Signal* signal)
return;
}//if
- TablePtr tabPtr;
+ TablePtr tabPtr LINT_SET_PTR;
c_tablePool.getPtr(tabPtr, Tdata2);
GetTabInfoReq * req = (GetTabInfoReq *)signal->getDataPtrSend();
req->senderRef = reference();
@@ -416,7 +416,7 @@ Backup::execDUMP_STATE_ORD(Signal* signal)
/**
* Print records
*/
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
for(c_backups.first(ptr); ptr.i != RNIL; c_backups.next(ptr)){
infoEvent("BackupRecord %d: BackupId: %d MasterRef: %x ClientRef: %x",
ptr.i, ptr.p->backupId, ptr.p->masterRef, ptr.p->clientRef);
@@ -870,6 +870,9 @@ Backup::checkNodeFail(Signal* signal,
#endif
Uint32 gsn, len, pos;
+ LINT_INIT(gsn);
+ LINT_INIT(len);
+ LINT_INIT(pos);
ptr.p->nodes.bitANDC(mask);
switch(ptr.p->masterData.gsn){
case GSN_DEFINE_BACKUP_REQ:
@@ -1053,7 +1056,7 @@ Backup::execBACKUP_REQ(Signal* signal)
void
Backup::execUTIL_SEQUENCE_REF(Signal* signal)
{
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
jamEntry();
UtilSequenceRef * utilRef = (UtilSequenceRef*)signal->getDataPtr();
ptr.i = utilRef->senderData;
@@ -1107,7 +1110,7 @@ Backup::execUTIL_SEQUENCE_CONF(Signal* signal)
return;
}
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
ptr.i = conf->senderData;
c_backupPool.getPtr(ptr);
@@ -1148,7 +1151,7 @@ Backup::defineBackupMutex_locked(Signal* signal, Uint32 ptrI, Uint32 retVal){
jamEntry();
ndbrequire(retVal == 0);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
ptr.i = ptrI;
c_backupPool.getPtr(ptr);
@@ -1169,7 +1172,7 @@ Backup::dictCommitTableMutex_locked(Signal* signal, Uint32 ptrI,Uint32 retVal)
/**
* We now have both the mutexes
*/
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
ptr.i = ptrI;
c_backupPool.getPtr(ptr);
@@ -1274,7 +1277,7 @@ Backup::execDEFINE_BACKUP_REF(Signal* signal)
//const Uint32 backupId = ref->backupId;
const Uint32 nodeId = ref->nodeId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->setErrorCode(ref->errorCode);
@@ -1291,7 +1294,7 @@ Backup::execDEFINE_BACKUP_CONF(Signal* signal)
//const Uint32 backupId = conf->backupId;
const Uint32 nodeId = refToNode(signal->senderBlockRef());
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
if (ERROR_INSERTED(10024))
@@ -1469,7 +1472,7 @@ Backup::execCREATE_TRIG_CONF(Signal* signal)
const TriggerEvent::Value type = conf->getTriggerEvent();
const Uint32 triggerId = conf->getTriggerId();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
/**
@@ -1498,7 +1501,7 @@ Backup::execCREATE_TRIG_REF(Signal* signal)
const Uint32 ptrI = ref->getConnectionPtr();
const Uint32 tableId = ref->getTableId();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
/**
@@ -1613,7 +1616,7 @@ Backup::execSTART_BACKUP_REF(Signal* signal)
//const Uint32 backupId = ref->backupId;
const Uint32 nodeId = ref->nodeId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->setErrorCode(ref->errorCode);
@@ -1630,7 +1633,7 @@ Backup::execSTART_BACKUP_CONF(Signal* signal)
//const Uint32 backupId = conf->backupId;
const Uint32 nodeId = refToNode(signal->senderBlockRef());
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
startBackupReply(signal, ptr, nodeId);
@@ -1682,7 +1685,7 @@ Backup::execWAIT_GCP_REF(Signal* signal)
WaitGCPRef * ref = (WaitGCPRef*)signal->getDataPtr();
const Uint32 ptrI = ref->senderData;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ndbrequire(ptr.p->masterRef == reference());
@@ -1706,7 +1709,7 @@ Backup::execWAIT_GCP_CONF(Signal* signal){
const Uint32 ptrI = conf->senderData;
const Uint32 gcp = conf->gcp;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ndbrequire(ptr.p->masterRef == reference());
@@ -1847,7 +1850,7 @@ Backup::execBACKUP_FRAGMENT_CONF(Signal* signal)
const Uint64 noOfRecords =
conf->noOfRecordsLow + (((Uint64)conf->noOfRecordsHigh) << 32);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->noOfBytes += noOfBytes;
@@ -1921,7 +1924,7 @@ Backup::execBACKUP_FRAGMENT_REF(Signal* signal)
//const Uint32 backupId = ref->backupId;
const Uint32 nodeId = ref->nodeId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
TablePtr tabPtr;
@@ -1974,7 +1977,7 @@ Backup::execBACKUP_FRAGMENT_COMPLETE_REP(Signal* signal)
BackupFragmentCompleteRep * rep =
(BackupFragmentCompleteRep*)signal->getDataPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, rep->backupPtr);
TablePtr tabPtr;
@@ -2026,21 +2029,23 @@ Backup::sendDropTrig(Signal* signal, BackupRecordPtr ptr)
* Insert footers
*/
{
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->logFilePtr);
Uint32 * dst;
+ LINT_INIT(dst);
ndbrequire(filePtr.p->operation.dataBuffer.getWritePtr(&dst, 1));
* dst = 0;
filePtr.p->operation.dataBuffer.updateWritePtr(1);
}
{
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
const Uint32 gcpSz = sizeof(BackupFormat::CtlFile::GCPEntry) >> 2;
Uint32 * dst;
+ LINT_INIT(dst);
ndbrequire(filePtr.p->operation.dataBuffer.getWritePtr(&dst, gcpSz));
BackupFormat::CtlFile::GCPEntry * gcp =
@@ -2110,7 +2115,7 @@ Backup::execDROP_TRIG_REF(Signal* signal)
DropTrigRef* ref = (DropTrigRef*)signal->getDataPtr();
const Uint32 ptrI = ref->getConnectionPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
if(ref->getConf()->getTriggerId() != -1)
@@ -2131,7 +2136,7 @@ Backup::execDROP_TRIG_CONF(Signal* signal)
const Uint32 ptrI = conf->getConnectionPtr();
const Uint32 triggerId= conf->getTriggerId();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
dropTrigReply(signal, ptr);
@@ -2170,7 +2175,7 @@ Backup::execSTOP_BACKUP_REF(Signal* signal)
//const Uint32 backupId = ref->backupId;
const Uint32 nodeId = ref->nodeId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->setErrorCode(ref->errorCode);
@@ -2205,7 +2210,7 @@ Backup::execSTOP_BACKUP_CONF(Signal* signal)
//const Uint32 backupId = conf->backupId;
const Uint32 nodeId = refToNode(signal->senderBlockRef());
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->noOfLogBytes += conf->noOfLogBytes;
@@ -2383,7 +2388,7 @@ Backup::defineBackupRef(Signal* signal, BackupRecordPtr ptr, Uint32 errCode)
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
if (filePtr.p->m_flags & BackupFile::BF_LCP_META)
{
@@ -2435,7 +2440,7 @@ Backup::execDEFINE_BACKUP_REQ(Signal* signal)
DefineBackupReq* req = (DefineBackupReq*)signal->getDataPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
const Uint32 ptrI = req->backupPtr;
const Uint32 backupId = req->backupId;
const BlockReference senderRef = req->senderRef;
@@ -2639,7 +2644,7 @@ Backup::execLIST_TABLES_CONF(Signal* signal)
ListTablesConf* conf = (ListTablesConf*)signal->getDataPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, conf->senderData);
const Uint32 len = signal->length() - ListTablesConf::HeaderLength;
@@ -2694,7 +2699,7 @@ Backup::openFiles(Signal* signal, BackupRecordPtr ptr)
{
jam();
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
FsOpenReq * req = (FsOpenReq *)signal->getDataPtrSend();
req->userReference = reference();
@@ -2756,10 +2761,10 @@ Backup::execFSOPENREF(Signal* signal)
const Uint32 userPtr = ref->userPointer;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, userPtr);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
ptr.p->setErrorCode(ref->errorCode);
openFilesReply(signal, ptr, filePtr);
@@ -2775,11 +2780,11 @@ Backup::execFSOPENCONF(Signal* signal)
const Uint32 userPtr = conf->userPointer;
const Uint32 filePointer = conf->filePointer;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, userPtr);
filePtr.p->filePointer = filePointer;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
ndbrequire(! (filePtr.p->m_flags & BackupFile::BF_OPEN));
@@ -2960,10 +2965,10 @@ Backup::execGET_TABINFOREF(Signal* signal)
GetTabInfoRef * ref = (GetTabInfoRef*)signal->getDataPtr();
const Uint32 senderData = ref->senderData;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, senderData);
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
filePtr.p->m_flags &= ~(Uint32)BackupFile::BF_FILE_THREAD;
@@ -2987,7 +2992,7 @@ Backup::execGET_TABINFO_CONF(Signal* signal)
const Uint32 tableType = conf->tableType;
const Uint32 tableId = conf->tableId;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, senderData);
SegmentedSectionPtr dictTabInfoPtr;
@@ -2997,7 +3002,7 @@ Backup::execGET_TABINFO_CONF(Signal* signal)
TablePtr tabPtr ;
ndbrequire(findTable(ptr, tabPtr, tableId));
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
FsBuffer & buf = filePtr.p->operation.dataBuffer;
Uint32* dst = 0;
@@ -3263,7 +3268,7 @@ Backup::execDI_FCOUNTCONF(Signal* signal)
ndbrequire(userPtr == RNIL && signal->length() == 5);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, senderData);
TablePtr tabPtr;
@@ -3278,7 +3283,7 @@ Backup::execDI_FCOUNTCONF(Signal* signal)
fragPtr.p->scanning = 0;
fragPtr.p->tableId = tableId;
fragPtr.p->fragmentId = i;
- fragPtr.p->node = RNIL;
+ fragPtr.p->node = 0;
}//for
/**
@@ -3343,7 +3348,7 @@ Backup::execDIGETPRIMCONF(Signal* signal)
ndbrequire(userPtr == RNIL && signal->length() == 9);
ndbrequire(nodeCount > 0 && nodeCount <= MAX_REPLICAS);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, senderData);
TablePtr tabPtr;
@@ -3385,7 +3390,7 @@ Backup::execSTART_BACKUP_REQ(Signal* signal)
StartBackupReq* req = (StartBackupReq*)signal->getDataPtr();
const Uint32 ptrI = req->backupPtr;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->slaveState.setState(STARTED);
@@ -3438,7 +3443,7 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal)
/**
* Get backup record
*/
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->slaveState.setState(SCANNING);
@@ -3447,7 +3452,7 @@ Backup::execBACKUP_FRAGMENT_REQ(Signal* signal)
/**
* Get file
*/
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, ptr.p->dataFilePtr);
ndbrequire(filePtr.p->backupPtr == ptrI);
@@ -3591,12 +3596,12 @@ Backup::execTRANSID_AI(Signal* signal)
//const Uint32 transId2 = signal->theData[2];
const Uint32 dataLen = signal->length() - 3;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
OperationRecord & op = filePtr.p->operation;
- TablePtr tabPtr;
+ TablePtr tabPtr LINT_SET_PTR;
c_tablePool.getPtr(tabPtr, op.tablePtr);
Table & table = * tabPtr.p;
@@ -3782,7 +3787,7 @@ Backup::execSCAN_FRAGREF(Signal* signal)
ScanFragRef * ref = (ScanFragRef*)signal->getDataPtr();
const Uint32 filePtrI = ref->senderData;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
filePtr.p->errorCode = ref->errorCode;
@@ -3801,7 +3806,7 @@ Backup::execSCAN_FRAGCONF(Signal* signal)
ScanFragConf * conf = (ScanFragConf*)signal->getDataPtr();
const Uint32 filePtrI = conf->senderData;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
OperationRecord & op = filePtr.p->operation;
@@ -3842,7 +3847,7 @@ Backup::fragmentCompleted(Signal* signal, BackupFilePtr filePtr)
filePtr.p->m_flags &= ~(Uint32)BackupFile::BF_SCAN_THREAD;
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
if (ptr.p->is_lcp())
@@ -3873,7 +3878,7 @@ Backup::fragmentCompleted(Signal* signal, BackupFilePtr filePtr)
void
Backup::backupFragmentRef(Signal * signal, BackupFilePtr filePtr)
{
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
ptr.p->m_gsn = GSN_BACKUP_FRAGMENT_REF;
@@ -3929,7 +3934,7 @@ Backup::checkScan(Signal* signal, BackupFilePtr filePtr)
sendSignalWithDelay(DBLQH_REF, GSN_SCAN_NEXTREQ, signal,
10000, ScanFragNextReq::SignalLength);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
AbortBackupOrd *ord = (AbortBackupOrd*)signal->getDataPtrSend();
ord->backupId = ptr.p->backupId;
@@ -3960,7 +3965,7 @@ Backup::execFSAPPENDREF(Signal* signal)
const Uint32 filePtrI = ref->userPointer;
const Uint32 errCode = ref->errorCode;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
filePtr.p->m_flags &= ~(Uint32)BackupFile::BF_FILE_THREAD;
@@ -3980,7 +3985,7 @@ Backup::execFSAPPENDCONF(Signal* signal)
const Uint32 filePtrI = signal->theData[0]; //conf->userPointer;
const Uint32 bytes = signal->theData[1]; //conf->bytes;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
OperationRecord & op = filePtr.p->operation;
@@ -4100,7 +4105,7 @@ Backup::checkFile(Signal* signal, BackupFilePtr filePtr)
ndbrequire(flags & BackupFile::BF_OPEN);
ndbrequire(flags & BackupFile::BF_FILE_THREAD);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
closeFile(signal, ptr, filePtr);
}
@@ -4117,8 +4122,8 @@ Backup::execBACKUP_TRIG_REQ(Signal* signal)
/*
TUP asks if this trigger is to be fired on this node.
*/
- TriggerPtr trigPtr;
- TablePtr tabPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
+ TablePtr tabPtr LINT_SET_PTR;
FragmentPtr fragPtr;
Uint32 trigger_id = signal->theData[0];
Uint32 frag_id = signal->theData[1];
@@ -4149,7 +4154,7 @@ Backup::execTRIG_ATTRINFO(Signal* signal) {
TrigAttrInfo * trg = (TrigAttrInfo*)signal->getDataPtr();
- TriggerPtr trigPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
c_triggerPool.getPtr(trigPtr, trg->getTriggerId());
ndbrequire(trigPtr.p->event != ILLEGAL_TRIGGER_ID); // Online...
@@ -4180,7 +4185,7 @@ Backup::execTRIG_ATTRINFO(Signal* signal) {
jam();
Uint32 save[TrigAttrInfo::StaticLength];
memcpy(save, signal->getDataPtr(), 4*TrigAttrInfo::StaticLength);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, trigPtr.p->backupPtr);
trigPtr.p->errorCode = AbortBackupOrd::LogBufferFull;
AbortBackupOrd *ord = (AbortBackupOrd*)signal->getDataPtrSend();
@@ -4233,7 +4238,7 @@ Backup::execFIRE_TRIG_ORD(Signal* signal)
const Uint32 trI = trg->getTriggerId();
const Uint32 fragId = trg->fragId;
- TriggerPtr trigPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
c_triggerPool.getPtr(trigPtr, trI);
ndbrequire(trigPtr.p->event != ILLEGAL_TRIGGER_ID);
@@ -4247,7 +4252,7 @@ Backup::execFIRE_TRIG_ORD(Signal* signal)
Uint32 len = trigPtr.p->logEntry->Length;
trigPtr.p->logEntry->FragId = htonl(fragId);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, trigPtr.p->backupPtr);
if(gci != ptr.p->currGCP)
{
@@ -4317,7 +4322,7 @@ Backup::execSTOP_BACKUP_REQ(Signal* signal)
/**
* Get backup record
*/
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
ptr.p->slaveState.setState(STOPPING);
@@ -4412,10 +4417,10 @@ Backup::execFSCLOSEREF(Signal* signal)
FsRef * ref = (FsRef*)signal->getDataPtr();
const Uint32 filePtrI = ref->userPointer;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
FsConf * conf = (FsConf*)signal->getDataPtr();
@@ -4432,7 +4437,7 @@ Backup::execFSCLOSECONF(Signal* signal)
FsConf * conf = (FsConf*)signal->getDataPtr();
const Uint32 filePtrI = conf->userPointer;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, filePtrI);
#ifdef DEBUG_ABORT
@@ -4446,7 +4451,7 @@ Backup::execFSCLOSECONF(Signal* signal)
filePtr.p->m_flags &= ~(Uint32)(BackupFile::BF_OPEN |BackupFile::BF_CLOSING);
filePtr.p->operation.dataBuffer.reset();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, filePtr.p->backupPtr);
closeFiles(signal, ptr);
}
@@ -4468,7 +4473,7 @@ Backup::closeFilesDone(Signal* signal, BackupRecordPtr ptr)
conf->backupId = ptr.p->backupId;
conf->backupPtr = ptr.i;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
if(ptr.p->logFilePtr != RNIL)
{
ptr.p->files.getPtr(filePtr, ptr.p->logFilePtr);
@@ -4517,7 +4522,7 @@ Backup::execABORT_BACKUP_ORD(Signal* signal)
dumpUsedResources();
#endif
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
if(requestType == AbortBackupOrd::ClientAbort) {
if (getOwnNodeId() != getMasterNodeId()) {
jam();
@@ -4637,7 +4642,7 @@ Backup::dumpUsedResources()
jam();
for(Uint32 j = 0; j<3; j++) {
jam();
- TriggerPtr trigPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
if(tabPtr.p->triggerAllocated[j]) {
jam();
c_triggerPool.getPtr(trigPtr, tabPtr.p->triggerIds[j]);
@@ -4672,7 +4677,7 @@ Backup::cleanup(Signal* signal, BackupRecordPtr ptr)
tabPtr.p->fragments.release();
for(Uint32 j = 0; j<3; j++) {
jam();
- TriggerPtr trigPtr;
+ TriggerPtr trigPtr LINT_SET_PTR;
if(tabPtr.p->triggerAllocated[j]) {
jam();
c_triggerPool.getPtr(trigPtr, tabPtr.p->triggerIds[j]);
@@ -4748,7 +4753,7 @@ Backup::execFSREMOVECONF(Signal* signal){
/**
* Get backup record
*/
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
c_backups.release(ptr);
}
@@ -4762,7 +4767,7 @@ Backup::execLCP_PREPARE_REQ(Signal* signal)
jamEntry();
LcpPrepareReq req = *(LcpPrepareReq*)signal->getDataPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, req.backupPtr);
ptr.p->m_gsn = GSN_LCP_PREPARE_REQ;
@@ -4822,7 +4827,7 @@ Backup::lcp_close_file_conf(Signal* signal, BackupRecordPtr ptr)
ndbrequire(ptr.p->tables.first(tabPtr));
Uint32 tableId = tabPtr.p->tableId;
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, ptr.p->dataFilePtr);
ndbrequire(filePtr.p->m_flags == 0);
@@ -4878,7 +4883,7 @@ Backup::lcp_open_file(Signal* signal, BackupRecordPtr ptr)
/**
* Lcp file
*/
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, ptr.p->dataFilePtr);
ndbrequire(filePtr.p->m_flags == 0);
filePtr.p->m_flags |= BackupFile::BF_OPENING;
@@ -4901,7 +4906,7 @@ Backup::lcp_open_file_done(Signal* signal, BackupRecordPtr ptr)
ndbrequire(ptr.p->tables.first(tabPtr));
tabPtr.p->fragments.getPtr(fragPtr, 0);
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
c_backupFilePool.getPtr(filePtr, ptr.p->dataFilePtr);
ndbrequire(filePtr.p->m_flags ==
(BackupFile::BF_OPEN | BackupFile::BF_LCP_META));
@@ -4933,11 +4938,11 @@ Backup::execEND_LCPREQ(Signal* signal)
{
EndLcpReq* req= (EndLcpReq*)signal->getDataPtr();
- BackupRecordPtr ptr;
+ BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, req->backupPtr);
ndbrequire(ptr.p->backupId == req->backupId);
- BackupFilePtr filePtr;
+ BackupFilePtr filePtr LINT_SET_PTR;
ptr.p->files.getPtr(filePtr, ptr.p->ctlFilePtr);
ndbrequire(filePtr.p->m_flags == 0);
diff --git a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
index 957248bcf56..b36eaab4d46 100644
--- a/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
+++ b/storage/ndb/src/kernel/blocks/cmvmi/Cmvmi.cpp
@@ -1287,7 +1287,7 @@ Cmvmi::execTESTSIG(Signal* signal){
fprintf(stdout, "\n");
for(i = 0; i<signal->header.m_noOfSections; i++){
- SegmentedSectionPtr ptr;
+ SegmentedSectionPtr ptr = {0,0,0};
ndbout_c("-- Section %d --", i);
signal->getSection(ptr, i);
ndbrequire(ptr.p != 0);
@@ -1345,7 +1345,7 @@ Cmvmi::execTESTSIG(Signal* signal){
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr;
+ SegmentedSectionPtr sptr = {0,0,0};
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1394,7 +1394,7 @@ Cmvmi::execTESTSIG(Signal* signal){
LinearSectionPtr ptr[3];
const Uint32 secs = signal->getNoOfSections();
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr;
+ SegmentedSectionPtr sptr = {0,0,0};
signal->getSection(sptr, i);
ptr[i].sz = sptr.sz;
ptr[i].p = new Uint32[sptr.sz];
@@ -1460,7 +1460,7 @@ Cmvmi::execTESTSIG(Signal* signal){
const Uint32 secs = signal->getNoOfSections();
memset(g_test, 0, sizeof(g_test));
for(i = 0; i<secs; i++){
- SegmentedSectionPtr sptr;
+ SegmentedSectionPtr sptr = {0,0,0};
signal->getSection(sptr, i);
g_test[i].sz = sptr.sz;
g_test[i].p = new Uint32[sptr.sz];
diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index a7865c356c8..b91131ca32d 100644
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -13602,8 +13602,8 @@ Dbdict::getDictLockType(Uint32 lockType)
static const DictLockType lt[] = {
{ DictLockReq::NodeRestartLock, BS_NODE_RESTART, "NodeRestart" }
};
- for (int i = 0; i < sizeof(lt)/sizeof(lt[0]); i++) {
- if (lt[i].lockType == lockType)
+ for (unsigned int i = 0; i < sizeof(lt)/sizeof(lt[0]); i++) {
+ if ((Uint32) lt[i].lockType == lockType)
return &lt[i];
}
return NULL;
@@ -13755,7 +13755,7 @@ Dbdict::execDICT_UNLOCK_ORD(Signal* signal)
DictLockPtr lockPtr;
c_dictLockQueue.getPtr(lockPtr, ord->lockPtr);
- ndbrequire(lockPtr.p->lt->lockType == ord->lockType);
+ ndbrequire((Uint32) lockPtr.p->lt->lockType == ord->lockType);
if (lockPtr.p->locked) {
jam();
diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp
index 4b5c0b791f9..da2321bdf6f 100644
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxSearch.cpp
@@ -132,7 +132,7 @@ Dbtux::searchToAdd(Frag& frag, ConstData searchKey, TreeEnt searchEnt, TreePos&
treePos.m_pos = hi;
return true;
}
- if (hi < currNode.getOccup()) {
+ if ((uint) hi < currNode.getOccup()) {
jam();
treePos.m_pos = hi;
return true;
diff --git a/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp b/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
index 84e3279afaf..65d233a1a9d 100644
--- a/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
+++ b/storage/ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp
@@ -1565,6 +1565,11 @@ void Ndbcntr::execNODE_FAILREP(Signal* signal)
break;
}
+ case StopRecord::SR_BLOCK_GCP_START_GCP:
+ case StopRecord::SR_WAIT_COMPLETE_GCP:
+ case StopRecord::SR_UNBLOCK_GCP_START_GCP:
+ case StopRecord::SR_CLUSTER_SHUTDOWN:
+ break;
}
}
@@ -2326,7 +2331,7 @@ Ndbcntr::StopRecord::checkNodeFail(Signal* signal){
bool allNodesStopped = true;
int i ;
- for( i = 0; i< NdbNodeBitmask::Size; i++ ){
+ for( i = 0; i < (int) NdbNodeBitmask::Size; i++ ){
if ( stopReq.nodes[i] != 0 ){
allNodesStopped = false;
break;
diff --git a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
index 23152af2775..7be0943be5d 100644
--- a/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
+++ b/storage/ndb/src/kernel/blocks/qmgr/QmgrMain.cpp
@@ -160,7 +160,7 @@ void Qmgr::execCONTINUEB(Signal* signal)
BaseString tmp;
tmp.append("Shutting down node as total restart time exceeds "
" StartFailureTimeout as set in config file ");
- if(c_restartFailureTimeout == ~0)
+ if(c_restartFailureTimeout == (Uint32) ~0)
tmp.append(" 0 (inifinite)");
else
tmp.appfmt(" %d", c_restartFailureTimeout);
@@ -1339,7 +1339,7 @@ Qmgr::check_startup(Signal* signal)
if (now < partial_timeout)
{
jam();
- signal->theData[1] = c_restartPartialTimeout == ~0 ? 2 : 3;
+ signal->theData[1] = c_restartPartialTimeout == (Uint32) ~0 ? 2 : 3;
signal->theData[2] = Uint32((partial_timeout - now + 500) / 1000);
report_mask.assign(wait);
retVal = 0;
@@ -1356,7 +1356,7 @@ Qmgr::check_startup(Signal* signal)
case CheckNodeGroups::Partitioning:
if (now < partitioned_timeout && result != CheckNodeGroups::Win)
{
- signal->theData[1] = c_restartPartionedTimeout == ~0 ? 4 : 5;
+ signal->theData[1] = c_restartPartionedTimeout == (Uint32) ~0 ? 4 : 5;
signal->theData[2] = Uint32((partitioned_timeout - now + 500) / 1000);
report_mask.assign(c_definedNodes);
report_mask.bitANDC(c_start.m_starting_nodes);
@@ -1403,6 +1403,7 @@ missing_nodegroup:
" starting: %s (missing fs for: %s)",
mask1, mask2);
progError(__LINE__, NDBD_EXIT_SR_RESTARTCONFLICT, buf);
+ return 0; // Deadcode
}
void
diff --git a/storage/ndb/src/kernel/error/ErrorReporter.cpp b/storage/ndb/src/kernel/error/ErrorReporter.cpp
index 6c8bb1fe615..e95cd5c132f 100644
--- a/storage/ndb/src/kernel/error/ErrorReporter.cpp
+++ b/storage/ndb/src/kernel/error/ErrorReporter.cpp
@@ -185,6 +185,7 @@ ErrorReporter::handleAssert(const char* message, const char* file, int line, int
childReportError(ec);
NdbShutdown(s_errorHandlerShutdownType);
+ exit(1); // Deadcode
}
void
diff --git a/storage/ndb/src/kernel/error/ErrorReporter.hpp b/storage/ndb/src/kernel/error/ErrorReporter.hpp
index 0ec84190238..dffec14dff2 100644
--- a/storage/ndb/src/kernel/error/ErrorReporter.hpp
+++ b/storage/ndb/src/kernel/error/ErrorReporter.hpp
@@ -29,7 +29,7 @@ public:
static void setErrorHandlerShutdownType(NdbShutdownType nst = NST_ErrorHandler);
static void handleAssert(const char* message,
const char* file,
- int line, int ec = NDBD_EXIT_PRGERR);
+ int line, int ec = NDBD_EXIT_PRGERR) __attribute__((__noreturn__));
static void handleError(int faultID,
const char* problemData,
diff --git a/storage/ndb/src/kernel/error/ndbd_exit_codes.c b/storage/ndb/src/kernel/error/ndbd_exit_codes.c
index 8ed3b3a5cbb..f6672c77fc9 100644
--- a/storage/ndb/src/kernel/error/ndbd_exit_codes.c
+++ b/storage/ndb/src/kernel/error/ndbd_exit_codes.c
@@ -14,6 +14,7 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
+#include <ndb_global.h>
#include <ndbd_exit_codes.h>
typedef struct ErrStruct {
diff --git a/storage/ndb/src/kernel/vm/TransporterCallback.cpp b/storage/ndb/src/kernel/vm/TransporterCallback.cpp
index f315918b871..badd2af669c 100644
--- a/storage/ndb/src/kernel/vm/TransporterCallback.cpp
+++ b/storage/ndb/src/kernel/vm/TransporterCallback.cpp
@@ -56,7 +56,7 @@ const char *lookupConnectionError(Uint32 err)
{
int i= 0;
while ((Uint32)connectionError[i].err != err &&
- (Uint32)connectionError[i].err != -1)
+ connectionError[i].err != -1)
i++;
return connectionError[i].text;
}
diff --git a/storage/ndb/src/mgmapi/mgmapi.cpp b/storage/ndb/src/mgmapi/mgmapi.cpp
index 7c5fafd2286..90a863402e8 100644
--- a/storage/ndb/src/mgmapi/mgmapi.cpp
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp
@@ -2544,8 +2544,8 @@ int ndb_mgm_report_event(NdbMgmHandle handle, Uint32 *data, Uint32 length)
args.put("length", length);
BaseString data_string;
- for (int i = 0; i < length; i++)
- data_string.appfmt(" %u", data[i]);
+ for (int i = 0; i < (int) length; i++)
+ data_string.appfmt(" %lu", (ulong) data[i]);
args.put("data", data_string.c_str());
diff --git a/storage/ndb/src/mgmclient/CommandInterpreter.cpp b/storage/ndb/src/mgmclient/CommandInterpreter.cpp
index 8bff874a97a..999ff6a4cf2 100644
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp
@@ -598,7 +598,7 @@ static const char* helpTextDebug =
;
#endif
-struct {
+struct st_cmd_help {
const char *cmd;
const char * help;
}help_items[]={
@@ -2393,7 +2393,7 @@ CommandInterpreter::executeEventReporting(int processId,
Vector<BaseString> specs;
tmp.split(specs, " ");
- for (int i=0; i < specs.size(); i++)
+ for (int i=0; i < (int) specs.size(); i++)
{
Vector<BaseString> spec;
specs[i].split(spec, "=");
diff --git a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
index 222b71dbaac..2268414ae21 100644
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
@@ -830,7 +830,7 @@ MgmtSrvr::sendVersionReq(int v_nodeId, Uint32 &version, const char **address)
case GSN_API_VERSION_CONF: {
const ApiVersionConf * const conf =
CAST_CONSTPTR(ApiVersionConf, signal->getDataPtr());
- assert(conf->nodeId == v_nodeId);
+ assert((int) conf->nodeId == v_nodeId);
version = conf->version;
struct in_addr in;
in.s_addr= conf->inet_addr;
@@ -1568,7 +1568,7 @@ MgmtSrvr::setEventReportingLevelImpl(int nodeId,
NodeBitmask nodes;
nodes.clear();
Uint32 max = (nodeId == 0) ? (nodeId = 1, MAX_NDB_NODES) : nodeId;
- for(; nodeId <= max; nodeId++)
+ for(; (Uint32) nodeId <= max; nodeId++)
{
if (nodeTypes[nodeId] != NODE_TYPE_DB)
continue;
@@ -2075,8 +2075,8 @@ MgmtSrvr::alloc_node_id(NodeId * nodeId,
int log_event)
{
DBUG_ENTER("MgmtSrvr::alloc_node_id");
- DBUG_PRINT("enter", ("nodeid=%d, type=%d, client_addr=%d",
- *nodeId, type, client_addr));
+ DBUG_PRINT("enter", ("nodeid: %d type: %d client_addr: 0x%ld",
+ *nodeId, type, (long) client_addr));
if (g_no_nodeid_checks) {
if (*nodeId == 0) {
error_string.appfmt("no-nodeid-checks set in management server.\n"
diff --git a/storage/ndb/src/mgmsrv/Services.cpp b/storage/ndb/src/mgmsrv/Services.cpp
index 80dd040eb1b..d3272fc9de2 100644
--- a/storage/ndb/src/mgmsrv/Services.cpp
+++ b/storage/ndb/src/mgmsrv/Services.cpp
@@ -1716,7 +1716,7 @@ MgmApiSession::report_event(Parser_t::Context &ctx,
BaseString tmp(data_string);
Vector<BaseString> item;
tmp.split(item, " ");
- for (int i = 0; i < length ; i++)
+ for (int i = 0; (Uint32) i < length ; i++)
{
sscanf(item[i].c_str(), "%u", data+i);
}
diff --git a/storage/ndb/src/ndbapi/ClusterMgr.cpp b/storage/ndb/src/ndbapi/ClusterMgr.cpp
index b171457c2a9..4a865a0eb14 100644
--- a/storage/ndb/src/ndbapi/ClusterMgr.cpp
+++ b/storage/ndb/src/ndbapi/ClusterMgr.cpp
@@ -203,7 +203,7 @@ ClusterMgr::forceHB()
int nodeId= 0;
for(int i=0;
- NodeBitmask::NotFound!=(nodeId= waitForHBFromNodes.find(i));
+ (int) NodeBitmask::NotFound != (nodeId= waitForHBFromNodes.find(i));
i= nodeId+1)
{
#ifdef DEBUG_REG
diff --git a/storage/ndb/src/ndbapi/DictCache.cpp b/storage/ndb/src/ndbapi/DictCache.cpp
index c06bb6fc62a..bdeea3674cd 100644
--- a/storage/ndb/src/ndbapi/DictCache.cpp
+++ b/storage/ndb/src/ndbapi/DictCache.cpp
@@ -129,7 +129,8 @@ void GlobalDictCache::printCache()
NdbElement_t<Vector<TableVersion> > * curr = m_tableHash.getNext(0);
while(curr != 0){
DBUG_PRINT("curr", ("len: %d, hash: %d, lk: %d, str: %s",
- curr->len, curr->hash, curr->localkey1, curr->str));
+ curr->len, curr->hash, curr->localkey1,
+ (char*) curr->str));
if (curr->theData){
Vector<TableVersion> * vers = curr->theData;
const unsigned sz = vers->size();
diff --git a/storage/ndb/src/ndbapi/Ndb.cpp b/storage/ndb/src/ndbapi/Ndb.cpp
index 15ef596deef..843cb7668e6 100644
--- a/storage/ndb/src/ndbapi/Ndb.cpp
+++ b/storage/ndb/src/ndbapi/Ndb.cpp
@@ -342,8 +342,9 @@ Ndb::startTransaction(const NdbDictionary::Table *table,
{
NdbTransaction *trans= startTransactionLocal(0, nodeId);
- DBUG_PRINT("exit",("start trans: 0x%x transid: 0x%llx",
- trans, trans ? trans->getTransactionId() : 0));
+ DBUG_PRINT("exit",("start trans: 0x%lx transid: 0x%lx",
+ (long) trans,
+ (long) (trans ? trans->getTransactionId() : 0)));
DBUG_RETURN(trans);
}
} else {
@@ -364,7 +365,7 @@ Ndb::hupp(NdbTransaction* pBuddyTrans)
{
DBUG_ENTER("Ndb::hupp");
- DBUG_PRINT("enter", ("trans: 0x%x",pBuddyTrans));
+ DBUG_PRINT("enter", ("trans: 0x%lx", (long) pBuddyTrans));
Uint32 aPriority = 0;
if (pBuddyTrans == NULL){
@@ -389,8 +390,9 @@ Ndb::hupp(NdbTransaction* pBuddyTrans)
}
pCon->setTransactionId(pBuddyTrans->getTransactionId());
pCon->setBuddyConPtr((Uint32)pBuddyTrans->getTC_ConnectPtr());
- DBUG_PRINT("exit", ("hupp trans: 0x%x transid: 0x%llx",
- pCon, pCon ? pCon->getTransactionId() : 0));
+ DBUG_PRINT("exit", ("hupp trans: 0x%lx transid: 0x%lx",
+ (long) pCon,
+ (long) (pCon ? pCon->getTransactionId() : 0)));
DBUG_RETURN(pCon);
} else {
DBUG_RETURN(NULL);
@@ -477,8 +479,9 @@ Ndb::closeTransaction(NdbTransaction* aConnection)
tCon = theTransactionList;
theRemainingStartTransactions++;
- DBUG_PRINT("info",("close trans: 0x%x transid: 0x%llx",
- aConnection, aConnection->getTransactionId()));
+ DBUG_PRINT("info",("close trans: 0x%lx transid: 0x%lx",
+ (long) aConnection,
+ (long) aConnection->getTransactionId()));
DBUG_PRINT("info",("magic number: 0x%x TCConPtr: 0x%x theMyRef: 0x%x 0x%x",
aConnection->theMagicNumber, aConnection->theTCConPtr,
aConnection->theMyRef, getReference()));
diff --git a/storage/ndb/src/ndbapi/NdbOperationDefine.cpp b/storage/ndb/src/ndbapi/NdbOperationDefine.cpp
index 6915a91dd12..d14fcf60ec4 100644
--- a/storage/ndb/src/ndbapi/NdbOperationDefine.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperationDefine.cpp
@@ -408,9 +408,9 @@ NdbOperation::setValue( const NdbColumnImpl* tAttrInfo,
const char* aValuePassed)
{
DBUG_ENTER("NdbOperation::setValue");
- DBUG_PRINT("enter", ("col=%s op=%d val=%p",
+ DBUG_PRINT("enter", ("col: %s op:%d val: 0x%lx",
tAttrInfo->m_name.c_str(), theOperationType,
- aValuePassed));
+ (long) aValuePassed));
int tReturnCode;
Uint32 tAttrId;
diff --git a/storage/ndb/src/ndbapi/NdbOperationExec.cpp b/storage/ndb/src/ndbapi/NdbOperationExec.cpp
index 3d8a1d1b93a..38e0b441346 100644
--- a/storage/ndb/src/ndbapi/NdbOperationExec.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperationExec.cpp
@@ -207,7 +207,7 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr, Uint64 aTransId)
tcKeyReq->setKeyLength(tReqInfo, tTupKeyLen);
// A simple read is always ignore error
- abortOption = tSimpleIndicator ? AO_IgnoreError : abortOption;
+ abortOption = tSimpleIndicator ? (Uint8) AO_IgnoreError : abortOption;
tcKeyReq->setAbortOption(tReqInfo, abortOption);
Uint8 tDistrKeyIndicator = theDistrKeyIndicator_;
diff --git a/storage/ndb/src/ndbapi/NdbOperationInt.cpp b/storage/ndb/src/ndbapi/NdbOperationInt.cpp
index e33e8b09dca..cd2e3911751 100644
--- a/storage/ndb/src/ndbapi/NdbOperationInt.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperationInt.cpp
@@ -1021,8 +1021,8 @@ NdbOperation::branch_col(Uint32 type,
bool nopad, Uint32 Label){
DBUG_ENTER("NdbOperation::branch_col");
- DBUG_PRINT("enter", ("type=%u col=%u val=0x%x len=%u label=%u",
- type, ColId, val, len, Label));
+ 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);
diff --git a/storage/ndb/src/ndbapi/NdbOperationSearch.cpp b/storage/ndb/src/ndbapi/NdbOperationSearch.cpp
index 65d50a55634..e7b8a59d9b2 100644
--- a/storage/ndb/src/ndbapi/NdbOperationSearch.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperationSearch.cpp
@@ -57,9 +57,9 @@ NdbOperation::equal_impl(const NdbColumnImpl* tAttrInfo,
const char* aValuePassed)
{
DBUG_ENTER("NdbOperation::equal_impl");
- DBUG_PRINT("enter", ("col=%s op=%d val=%p",
+ DBUG_PRINT("enter", ("col: %s op: %d val: 0x%lx",
tAttrInfo->m_name.c_str(), theOperationType,
- aValuePassed));
+ (long) aValuePassed));
Uint32 tData;
const char* aValue = aValuePassed;
diff --git a/storage/ndb/src/ndbapi/NdbTransaction.cpp b/storage/ndb/src/ndbapi/NdbTransaction.cpp
index 0cbd67a38f6..4d7a6a59371 100644
--- a/storage/ndb/src/ndbapi/NdbTransaction.cpp
+++ b/storage/ndb/src/ndbapi/NdbTransaction.cpp
@@ -533,8 +533,8 @@ NdbTransaction::executeAsynchPrepare( ExecType aTypeOfExec,
AbortOption abortOption)
{
DBUG_ENTER("NdbTransaction::executeAsynchPrepare");
- DBUG_PRINT("enter", ("aTypeOfExec: %d, aCallback: %x, anyObject: %x",
- aTypeOfExec, aCallback, anyObject));
+ DBUG_PRINT("enter", ("aTypeOfExec: %d, aCallback: 0x%lx, anyObject: Ox%lx",
+ aTypeOfExec, (long) aCallback, (long) anyObject));
/**
* Reset error.code on execute
diff --git a/storage/ndb/src/ndbapi/Ndbif.cpp b/storage/ndb/src/ndbapi/Ndbif.cpp
index 5683ebe2e6f..599a38b287d 100644
--- a/storage/ndb/src/ndbapi/Ndbif.cpp
+++ b/storage/ndb/src/ndbapi/Ndbif.cpp
@@ -199,11 +199,11 @@ void Ndb::connected(Uint32 ref)
((Uint64)tmpTheNode << 40);
theFirstTransId += theFacade->m_max_trans_id;
// assert(0);
- DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id=%lx",
+ DBUG_PRINT("info",("connected with ref=%x, id=%d, no_db_nodes=%d, first_trans_id: 0x%lx",
theMyRef,
tmpTheNode,
theImpl->theNoOfDBnodes,
- theFirstTransId));
+ (long) theFirstTransId));
theCommitAckSignal = new NdbApiSignal(theMyRef);
theDictionary->m_receiver.m_reference= theMyRef;
diff --git a/storage/ndb/src/ndbapi/Ndbinit.cpp b/storage/ndb/src/ndbapi/Ndbinit.cpp
index 3d7d1b768f2..de67b99c8d8 100644
--- a/storage/ndb/src/ndbapi/Ndbinit.cpp
+++ b/storage/ndb/src/ndbapi/Ndbinit.cpp
@@ -43,7 +43,7 @@ Ndb::Ndb( Ndb_cluster_connection *ndb_cluster_connection,
: theImpl(NULL)
{
DBUG_ENTER("Ndb::Ndb()");
- DBUG_PRINT("enter",("Ndb::Ndb this=0x%x", this));
+ DBUG_PRINT("enter",("Ndb::Ndb this: 0x%lx", (long) this));
setup(ndb_cluster_connection, aDataBase, aSchema);
DBUG_VOID_RETURN;
}
@@ -132,7 +132,7 @@ void Ndb::setup(Ndb_cluster_connection *ndb_cluster_connection,
Ndb::~Ndb()
{
DBUG_ENTER("Ndb::~Ndb()");
- DBUG_PRINT("enter",("this=0x%x",this));
+ DBUG_PRINT("enter",("this: 0x%lx", (long) this));
if (m_sys_tab_0)
getDictionary()->removeTableGlobal(*m_sys_tab_0, 0);
diff --git a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
index 501901bf8ba..3bb6b2fe414 100644
--- a/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
+++ b/storage/ndb/src/ndbapi/ndb_cluster_connection.cpp
@@ -271,7 +271,7 @@ Ndb_cluster_connection_impl::Ndb_cluster_connection_impl(const char *
m_latest_trans_gci(0)
{
DBUG_ENTER("Ndb_cluster_connection");
- DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%x", this));
+ DBUG_PRINT("enter",("Ndb_cluster_connection this=0x%lx", (long) this));
if (!m_event_add_drop_mutex)
m_event_add_drop_mutex= NdbMutex_Create();
diff --git a/storage/ndb/tools/drop_index.cpp b/storage/ndb/tools/drop_index.cpp
index aa207212dbe..c10211a9108 100644
--- a/storage/ndb/tools/drop_index.cpp
+++ b/storage/ndb/tools/drop_index.cpp
@@ -51,9 +51,6 @@ int main(int argc, char** argv){
NDB_INIT(argv[0]);
load_defaults("my",load_default_groups,&argc,&argv);
int ho_error;
-#ifndef DBUG_OFF
- "d:t:O,/tmp/ndb_drop_index.trace";
-#endif
if ((ho_error=handle_options(&argc, &argv, my_long_options,
ndb_std_get_one_option)))
return NDBT_ProgramExit(NDBT_WRONGARGS);
diff --git a/storage/ndb/tools/drop_tab.cpp b/storage/ndb/tools/drop_tab.cpp
index d14c60a2c6d..61df4ee9b34 100644
--- a/storage/ndb/tools/drop_tab.cpp
+++ b/storage/ndb/tools/drop_tab.cpp
@@ -51,9 +51,6 @@ int main(int argc, char** argv){
NDB_INIT(argv[0]);
load_defaults("my",load_default_groups,&argc,&argv);
int ho_error;
-#ifndef DBUG_OFF
- "d:t:O,/tmp/ndb_drop_table.trace";
-#endif
if ((ho_error=handle_options(&argc, &argv, my_long_options,
ndb_std_get_one_option)))
return NDBT_ProgramExit(NDBT_WRONGARGS);
diff --git a/storage/ndb/tools/ndb_condig.cpp b/storage/ndb/tools/ndb_condig.cpp
index 8b862391c8e..049e4599447 100644
--- a/storage/ndb/tools/ndb_condig.cpp
+++ b/storage/ndb/tools/ndb_condig.cpp
@@ -114,6 +114,7 @@ struct Match
int m_key;
BaseString m_value;
virtual int eval(const Iter&);
+ virtual ~Match() {}
};
struct HostMatch : public Match
@@ -127,6 +128,7 @@ struct Apply
Apply(int val) { m_key = val;}
int m_key;
virtual int apply(const Iter&);
+ virtual ~Apply() {}
};
struct NodeTypeApply : public Apply