summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorunknown <monty@mysql.com/narttu.mysql.fi>2007-02-23 13:13:55 +0200
committerunknown <monty@mysql.com/narttu.mysql.fi>2007-02-23 13:13:55 +0200
commit9e6784924a676c2a19f99d0d044f445e437c4770 (patch)
treeaa523ca58b5c098a79faefb22302aa717f4ae942 /storage
parent61587c18639f4dfeb4e30e490c8b7785341c1eb5 (diff)
downloadmariadb-git-9e6784924a676c2a19f99d0d044f445e437c4770.tar.gz
Fixed compiler warnings
Fixed compile-pentium64 scripts Fixed wrong estimate of update_with_key_prefix in sql-bench Merge bk-internal.mysql.com:/home/bk/mysql-5.1 into mysql.com:/home/my/mysql-5.1 Fixed unsafe define of uint4korr() Fixed that --extern works with mysql-test-run.pl Small trivial cleanups This also fixes a bug in counting number of rows that are updated when we have many simultanous queries Move all connection handling and command exectuion main loop from sql_parse.cc to sql_connection.cc Split handle_one_connection() into reusable sub functions. Split create_new_thread() into reusable sub functions. Added thread_scheduler; Preliminary interface code for future thread_handling code. Use 'my_thread_id' for internal thread id's Make thr_alarm_kill() to depend on thread_id instead of thread Make thr_abort_locks_for_thread() depend on thread_id instead of thread In store_globals(), set my_thread_var->id to be thd->thread_id. Use my_thread_var->id as basis for my_thread_name() The above changes makes the connection we have between THD and threads more soft. Added a lot of DBUG_PRINT() and DBUG_ASSERT() functions Fixed compiler warnings Fixed core dumps when running with --debug Removed setting of signal masks (was never used) Made event code call pthread_exit() (portability fix) Fixed that event code doesn't call DBUG_xxx functions before my_thread_init() is called. Made handling of thread_id and thd->variables.pseudo_thread_id uniform. Removed one common 'not freed memory' warning from mysqltest Fixed a couple of usage of not initialized warnings (unlikely cases) Suppress compiler warnings from bdb and (for the moment) warnings from ndb BitKeeper/deleted/.del-SETUP.sh.rej: Rename: BUILD/SETUP.sh.rej -> BitKeeper/deleted/.del-SETUP.sh.rej BitKeeper/deleted/.del-configure.in.rej: Rename: configure.in.rej -> BitKeeper/deleted/.del-configure.in.rej BitKeeper/deleted/.del-my_global.h.rej: Rename: include/my_global.h.rej -> BitKeeper/deleted/.del-my_global.h.rej BitKeeper/deleted/.del-my_pthread.h.rej: Rename: include/my_pthread.h.rej -> BitKeeper/deleted/.del-my_pthread.h.rej BitKeeper/deleted/.del-mysql_client_test.c.rej: Rename: tests/mysql_client_test.c.rej -> BitKeeper/deleted/.del-mysql_client_test.c.rej BitKeeper/deleted/.del-mysqld.cc.rej~35c1c438e11ebd89: Rename: sql/mysqld.cc.rej -> BitKeeper/deleted/.del-mysqld.cc.rej~35c1c438e11ebd89 BitKeeper/deleted/.del-sql_parse.cc.rej: Rename: sql/sql_parse.cc.rej -> BitKeeper/deleted/.del-sql_parse.cc.rej BitKeeper/deleted/.del-table.cc.rej: Rename: sql/table.cc.rej -> BitKeeper/deleted/.del-table.cc.rej BitKeeper/deleted/.del-thr_alarm.c.rej: Rename: mysys/thr_alarm.c.rej -> BitKeeper/deleted/.del-thr_alarm.c.rej BUILD/compile-pentium64: Update this to be in line with compile-pentium BUILD/compile-pentium: Send command line options to SETUP.sh BUILD/compile-solaris-sparc-debug: Update scripts BUILD/compile-solaris-sparc-forte: Update scripts BUILD/compile-solaris-sparc-purify: Update scripts BUILD/compile-solaris-sparc: Update scripts BitKeeper/deleted/.del-DbtupSystemRestart.cpp~15b54d7e4e75d2d: Removed compiler warning BitKeeper/deleted/.del-ha_berkeley.cc: Moved get_auto_primary_key() here as int5store() gives (wrong) compiler warnings in win64 configure.in: Added detection of port_create and port.h (for future)as --- manual merge BitKeeper/deleted/.del-ha_berkeley.h: Moved get_auto_primary_key() to ha_berkeley.cc BitKeeper/deleted/.del-mysqlmanager.c~e97636d71145a0b: Fixed compiler warnings BitKeeper/etc/ignore: added storage/ndb/src/ndbapi/ndberror_check client/mysqlbinlog.cc: Removed not needed 'static' (caused compiler warning) client/mysqldump.c: Fixed compiler warnings from 'max' build client/mysqltest.c: Free warning and query memory no abort. (Removes strange warnings on screen if mysql-test-run fails) Removed compiler warnings Portability fix for windows (windows doesn't have mode_t) client/sql_string.h: Removed compiler warning cmd-line-utils/readline/xmalloc.c: Fixed compiler warnings from 'max' build extra/charset2html.c: Fixed compiler warnings extra/comp_err.c: Fixed compiler warnings from 'max' build extra/yassl/include/lock.hpp: Fix for windows64 extra/yassl/include/openssl/ssl.h: Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit extra/yassl/include/socket_wrapper.hpp: Moved socket_t to ssl.h, to be able to removed compiler warnings on windows 64 bit extra/yassl/include/yassl.hpp: Fix for windows64 extra/yassl/src/ssl.cpp: Removed compiler warning Detect wrong parameter (Happens when running test suite on solaris) Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit extra/yassl/taocrypt/src/integer.cpp: Fixed compiler warnings extra/yassl/testsuite/testsuite.cpp: Removed compiler warning include/config-win.h: Added HAVE_WINSOCK2 (for future) include/my_dbug.h: Fixed DBUG_PROCESS() so that we don't get compiler warnings for it include/my_global.h: Fixed unsafe define of uint4korr() manual merge (ignore changes from 5.0) Fixed warnings on win64 when using int5store and int6store include/my_pthread.h: Added my_thread_id typedef Renamed 'my_thread_id() function to my_thead_dbug_id() include/thr_alarm.h: Make thr_alarm_kill() to depend on thread_id instead of thread include/thr_lock.h: Make thr_abort_locks_for_thread() depend on thread_id instead of thread libmysql/libmysql.def: Fixed compiler warnings on win64 libmysqld/CMakeLists.txt: Added missing files libmysqld/Makefile.am: Added new files libmysqld/lib_sql.cc: Remove not needed code (store_globals() now takes care of things) mysql-test/lib/mtr_report.pl: Removed wrong messages when using --extern mysql-test/mysql-test-run.pl: Fixed that --extern works Print help on stdout instead of stderr (make it easier to pipe it to less) Fixed typo that caused mysql-test-run.pl to fail on Solaris mysql-test/r/keywords.result: manual merge mysql-test/r/ndb_lock.result: After merge fixes mysql-test/r/ps.result: Portability fix mysql-test/t/disabled.def: Disabled ndb_alter_table as this very often fails for me (and have done it for a long time) mysql-test/t/keywords.test: manual merge mysql-test/t/ndb_lock.test: Added other possible error code mysql-test/t/ps.test: Portability fix (when compiling without DLOPEN) mysql-test/t/wait_timeout.test: Don't run this if we are not using a thread per connection (as other thread_handling code may not support timeouts) mysys/base64.c: Fixed compiler warnings on win64 mysys/mf_keycache.c: Fixed compiler warnings mysys/my_getopt.c: Fixed compiler warning mysys/my_init.c: Fixed compiler warning Re-indented long comment mysys/my_thr_init.c: Always use mysys_var->id to generate thread name (makes things uniform accross thread implementations and thread usage) Always generate my_thread_name() when using DBUG Ensure mysys_var->pthread_self is set Fixed compiler warnings mysys/ptr_cmp.c: Fixed compiler warnings from 'max' build mysys/thr_alarm.c: Change thr_alarm_kill() to use mysys_var->id instead of thread id Fixed compiler warning on windows mysys/thr_lock.c: Change thr_abort_locks_for_thread() to use mysys_var->id instead of thread id Add purecov statements around not tested code Fixed compiler warnings mysys/thr_mutex.c: my_thread_id() -> my_thread_dbug_id() server-tools/instance-manager/guardian.cc: Fixed compiler warning server-tools/instance-manager/instance.cc: Fixed compiler warning server-tools/instance-manager/mysql_connection.cc: Fixed compiler warnings server-tools/instance-manager/mysqlmanager.cc: Fixed compiler warnings sql/CMakeLists.txt: Added missing files sql/Makefile.am: Added new files sql/event_scheduler.cc: Added pthread_exit() calls Ensure DBUG_xxx calls are not made before my_thread_init() Use common functions to set up thread handling sql/field.h: manual merge sql/ha_ndbcluster.cc: Removed some trivial 'current_thd' calls sql/handler.cc: Avoid warnings on KILL_CONNECTION Don't print out null pointer with printf() (Causes crashes on Solaris) sql/item.cc: Fixed compiler warnings from 'max' build sql/item_cmpfunc.cc: After merge fixes sql/item_func.cc: Merge embedded and normal code usage (GET_LOCK, RELEASE_LOCK now works on my_thread_id instead of pthread_t) Fixed compiler warning sql/item_strfunc.cc: Fixed compiler warning sql/item_timefunc.cc: Fixed compiler warnings sql/lock.cc: Use (new) parameter to thr_abort_locks_for_thread() sql/log.cc: Fixed compiler warning sql/log_event.cc: Fixed compiler warnings about not used variable sql/mysql_priv.h: Remove TEST_NO_THREADS (not needed with new scheduler interface) Added functions from sql_connect.cc and new functions from sql_parse.cc sql/mysqld.cc: Use thread_scheduler structure to dispatch calls (make code more dynamic) Change --one-thread option to use thread_scheduler interface Made ONE_THREAD option independent of DBUG_BUILD --one-thread is now depricated. One should instead use '--thread-handling=no-threads' Remove not used uname() function. Split create_new_thread() into reusable sub functions. Preliminary interface code for future thread_handling code. Fixed compiler warnings sql/parse_file.cc: Don't send zero pointer to fn_format() (Causes crashes when using --debug) sql/repl_failsafe.cc: Setup pseudo_thread_id same way as other code sql/set_var.cc: Added variables 'thread_handling' Prepare for future variable 'thread_pool_size' Fixed compiler warnings sql/set_var.h: Fixed compiler warning sql/slave.cc: Setup pseudo_thread_id same way as other code Removed not used signal mask sql/sql_acl.cc: Fixed compiler warnings from 'max' build sql/sql_base.cc: Fixed long comments Normalized variable setup Don't destroy value of thd->variables.pseduo_thread_id More DBUG_PRINT()'s More DBUG_ASSERT()'s Fixed compiler warnings from 'max' build sql/sql_class.cc: Remove thd->real_id and thd->dbug_thread_id Added DBUG_ASSERT() Use thread_scheduler to signal threads to be killed. In THD::store_globals(), set my_thread_var->id to be thd->thread_id. Fixed compiler warnings sql/sql_class.h: Use 'my_thread_id' for internal thread id's Remove not needed THD elements: block_signals and dbug_thread_id Added 'thread_scheduler' scheduling extension element to THD sql/sql_insert.cc: After merge fixes (This actually fixes a bug in old code when many connections are in use) Setup pseudo_thread_id same way as other code Removed not used signal mask Initialize variable that may be used unitialized on error conditions (not fatal) sql/sql_parse.cc: Move connection related code to sql_connect.cc Remove setting of signal mask (not needed) Ensure TABLE_LIST->alias is set for generated TABLE_LIST elements (fixed core dumps when running with --debug) Added previous 'optional' element to reset_mgh() Removed not needed DBUG_PRINT call sql/sql_partition.cc: Fixed compiler warnings sql/sql_prepare.cc: Removed not needed casts Fixed compiler warnings from 'max' build sql/sql_select.cc: Fixed compiler warnings sql-bench/bench-init.pl.sh: Added --one-missing-tests sql-bench/example: Better example sql-bench/run-all-tests.sh: Added --only-missing-tests sql-bench/test-insert.sh: Fixed wrong estimate of update_with_key_prefix sql/sql_show.cc: Don't send pthread_kill() to threads to detect if they exists. (Not that useful and causes problems with future thread_handling code) Fixed compiler warnings sql/sql_table.cc: Simplify code Fixed compiler warnings sql/sql_test.cc: Remove dbug_thread_id from test output sql/sql_view.cc: Don't send zero pointer to fn_format() sql/tztime.cc: Fixed compiler warning sql/udf_example.def: Fixed compiler warnings on win64 sql/unireg.cc: Initialize variable that may be used unitialized on error conditions storage/archive/archive_test.c: Fixed compiler warnings storage/archive/azio.c: Fixed compiler warnings storage/innobase/dict/dict0crea.c: Fixed compiler warnings detected on windows64 storage/innobase/dict/dict0dict.c: Fixed compiler warnings detected on windows64 storage/innobase/dict/dict0load.c: Fixed compiler warnings detected on windows64 storage/innobase/dict/dict0mem.c: Fixed compiler warnings detected on windows64 storage/innobase/eval/eval0proc.c: Fixed compiler warnings detected on windows64 storage/innobase/handler/ha_innodb.cc: Fixed compiler warnings detected on windows64 storage/innobase/include/ut0byte.ic: Fixed compiler warnings on win64 storage/innobase/include/ut0ut.ic: Fixed compiler warnings on win64 storage/innobase/mtr/mtr0log.c: Fixed compiler warnings detected on windows64 storage/innobase/pars/pars0lex.l: Fixed warnings on win64 storage/innobase/rem/rem0cmp.c: Fixed compiler warnings detected on windows64 storage/innobase/row/row0mysql.c: Fixed compiler warnings detected on windows64 storage/innobase/row/row0sel.c: Fixed compiler warnings detected on windows64 storage/innobase/sync/sync0rw.c: Fixed compiler warnings detected on windows64 storage/innobase/trx/trx0trx.c: Fixed compiler warnings detected on windows64 storage/myisam/mi_log.c: my_thread_id() -> my_thread_debug_id() storage/myisam/mi_packrec.c: Fixed compiler warnings detected on windows64 storage/myisam/myisamchk.c: Fixed compiler warnings from 'max' build storage/ndb/src/common/debugger/EventLogger.cpp: Fixed compiler warnings storage/ndb/src/common/util/ConfigValues.cpp: Removed compiler warnings storage/ndb/src/common/util/NdbSqlUtil.cpp: Removed compiler warnings storage/ndb/src/cw/cpcd/CPCD.hpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/backup/Backup.cpp: Fixed compiler warnings detected on windows64 storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp: Fixed compiler warnings detected on windows64 storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp: Fixed compiler warnings detected on windows64 storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp: Fixed compiler warnings storage/ndb/src/kernel/blocks/diskpage.hpp: Fixed compiler warnings storage/ndb/src/kernel/vm/ndbd_malloc.cpp: Fixed compiler warnings storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp: Fixed compiler warnings storage/ndb/src/mgmclient/main.cpp: Fixed compiler warnings storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp: Fixed compiler warnings storage/ndb/src/ndbapi/NdbOperationExec.cpp: Fixed compiler warnings storage/ndb/src/ndbapi/SignalSender.cpp: Fixed compiler warnings storage/ndb/tools/restore/consumer_restore.cpp: Fixed compiler warnings strings/ctype-ucs2.c: Fixed compiler warnings strings/ctype-utf8.c: Fixed compiler warnings strings/decimal.c: Fixed compiler warnings strings/my_strchr.c: Fixed conflict between function and prototype support-files/compiler_warnings.supp: Ignore warnings from sql_yacc.cc that are hard to remove Ignore some not important warnings from windows 64 bit build Suppress warnings from bdb and (for the moment) warnings from ndb Suppress all warnings for all pushbuild platforms (should make all trees green) vio/viosslfactories.c: Added DBUG_PRINT BUILD/compile-pentium64-max: New BitKeeper file ``BUILD/compile-pentium64-max'' libmysqld/scheduler.cc: New BitKeeper file ``libmysqld/scheduler.cc'' libmysqld/sql_connect.cc: New BitKeeper file ``libmysqld/sql_connect.cc'' mysql-test/include/one_thread_per_connection.inc: New BitKeeper file ``mysql-test/include/one_thread_per_connection.inc'' mysql-test/r/no-threads.result: New BitKeeper file ``mysql-test/r/no-threads.result'' mysql-test/r/one_thread_per_connection.require: New BitKeeper file ``mysql-test/r/one_thread_per_connection.require'' mysql-test/t/no-threads-master.opt: New BitKeeper file ``mysql-test/t/no-threads-master.opt'' mysql-test/t/no-threads.test: New BitKeeper file ``mysql-test/t/no-threads.test'' sql/scheduler.cc: New BitKeeper file ``sql/scheduler.cc'' sql/scheduler.h: New BitKeeper file ``sql/scheduler.h'' sql/sql_connect.cc: New BitKeeper file ``sql/sql_connect.cc''
Diffstat (limited to 'storage')
-rw-r--r--storage/archive/archive_test.c12
-rw-r--r--storage/archive/azio.c10
-rw-r--r--storage/innobase/dict/dict0crea.c4
-rw-r--r--storage/innobase/dict/dict0dict.c10
-rw-r--r--storage/innobase/dict/dict0load.c6
-rw-r--r--storage/innobase/dict/dict0mem.c22
-rw-r--r--storage/innobase/eval/eval0proc.c2
-rw-r--r--storage/innobase/handler/ha_innodb.cc24
-rw-r--r--storage/innobase/include/ut0byte.ic4
-rw-r--r--storage/innobase/include/ut0ut.ic2
-rw-r--r--storage/innobase/mtr/mtr0log.c2
-rw-r--r--storage/innobase/pars/pars0lex.l2
-rw-r--r--storage/innobase/rem/rem0cmp.c2
-rw-r--r--storage/innobase/row/row0mysql.c4
-rw-r--r--storage/innobase/row/row0sel.c2
-rw-r--r--storage/innobase/sync/sync0rw.c8
-rw-r--r--storage/innobase/trx/trx0trx.c2
-rw-r--r--storage/myisam/mi_log.c2
-rw-r--r--storage/myisam/mi_packrec.c2
-rw-r--r--storage/myisam/myisamchk.c1
-rw-r--r--storage/ndb/src/common/debugger/EventLogger.cpp17
-rw-r--r--storage/ndb/src/common/util/ConfigValues.cpp8
-rw-r--r--storage/ndb/src/common/util/NdbSqlUtil.cpp2
-rw-r--r--storage/ndb/src/cw/cpcd/CPCD.hpp1
-rw-r--r--storage/ndb/src/kernel/blocks/backup/Backup.cpp3
-rw-r--r--storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp1
-rw-r--r--storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp11
-rw-r--r--storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp1
-rw-r--r--storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp3
-rw-r--r--storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp5
-rw-r--r--storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp4
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp3
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp7
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp3
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp1
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp9
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp7
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp1
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp1
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp3
-rw-r--r--storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp2
-rw-r--r--storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp1
-rw-r--r--storage/ndb/src/kernel/blocks/diskpage.hpp3
-rw-r--r--storage/ndb/src/kernel/vm/ndbd_malloc.cpp2
-rw-r--r--storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp1
-rw-r--r--storage/ndb/src/mgmclient/main.cpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp2
-rw-r--r--storage/ndb/src/ndbapi/NdbOperationExec.cpp4
-rw-r--r--storage/ndb/src/ndbapi/SignalSender.cpp9
-rw-r--r--storage/ndb/tools/restore/consumer_restore.cpp6
51 files changed, 111 insertions, 137 deletions
diff --git a/storage/archive/archive_test.c b/storage/archive/archive_test.c
index 3c46534e44c..9ac043330fc 100644
--- a/storage/archive/archive_test.c
+++ b/storage/archive/archive_test.c
@@ -36,9 +36,9 @@
char test_string[BUFFER_LEN];
-#define TWOGIG 2147483648
-#define FOURGIG 4294967296
-#define EIGHTGIG 8589934592
+#define TWOGIG LL(2147483648)
+#define FOURGIG LL(4294967296)
+#define EIGHTGIG LL(8589934592)
/* prototypes */
int size_test(unsigned long long length, unsigned long long rows_to_test_for);
@@ -222,9 +222,9 @@ int main(int argc, char *argv[])
/* Start size tests */
printf("About to run 2/4/8 gig tests now, you may want to hit CTRL-C\n");
- size_test(TWOGIG, 2097152);
- size_test(FOURGIG, 4194304);
- size_test(EIGHTGIG, 8388608);
+ size_test(TWOGIG, 2097152L);
+ size_test(FOURGIG, 4194304L);
+ size_test(EIGHTGIG, 8388608L);
return 0;
}
diff --git a/storage/archive/azio.c b/storage/archive/azio.c
index f3084d03ecc..7876dd69cab 100644
--- a/storage/archive/azio.c
+++ b/storage/archive/azio.c
@@ -140,7 +140,8 @@ int az_open (azio_stream *s, const char *path, int Flags, File fd)
else if (s->mode == 'w')
{
unsigned char buffer[AZHEADER_SIZE + AZMETA_BUFFER_SIZE];
- my_pread(s->file, buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0, MYF(0));
+ my_pread(s->file, (byte*) buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0,
+ MYF(0));
read_header(s, buffer); /* skip the .az header */
my_seek(s->file, 0, MY_SEEK_END, MYF(0));
}
@@ -609,7 +610,8 @@ int ZEXPORT azflush (s, flush)
if (s->mode == 'r')
{
unsigned char buffer[AZHEADER_SIZE + AZMETA_BUFFER_SIZE];
- my_pread(s->file, buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0, MYF(0));
+ my_pread(s->file, (byte*) buffer, AZHEADER_SIZE + AZMETA_BUFFER_SIZE, 0,
+ MYF(0));
read_header(s, buffer); /* skip the .az header */
return Z_OK;
@@ -810,7 +812,7 @@ int azwrite_frm(azio_stream *s, char *blob, unsigned int length)
if (s->rows > 0)
return 1;
- s->frm_start_pos= s->start;
+ s->frm_start_pos= (uint) s->start;
s->frm_length= length;
s->start+= length;
@@ -841,7 +843,7 @@ int azwrite_comment(azio_stream *s, char *blob, unsigned int length)
if (s->rows > 0)
return 1;
- s->comment_start_pos= s->start;
+ s->comment_start_pos= (uint) s->start;
s->comment_length= length;
s->start+= length;
diff --git a/storage/innobase/dict/dict0crea.c b/storage/innobase/dict/dict0crea.c
index 33e328d1e0b..76474c72c43 100644
--- a/storage/innobase/dict/dict0crea.c
+++ b/storage/innobase/dict/dict0crea.c
@@ -255,7 +255,7 @@ dict_build_table_def_step(
error = fil_create_new_single_table_tablespace(
&space, path_or_name, is_path,
FIL_IBD_FILE_INITIAL_SIZE);
- table->space = space;
+ table->space = (unsigned int) space;
if (error != DB_SUCCESS) {
@@ -806,7 +806,7 @@ dict_truncate_index_tree(
root_page_no = btr_create(type, space, index_id, comp, mtr);
if (index) {
- index->page = root_page_no;
+ index->page = (unsigned int) root_page_no;
} else {
ut_print_timestamp(stderr);
fprintf(stderr,
diff --git a/storage/innobase/dict/dict0dict.c b/storage/innobase/dict/dict0dict.c
index 2b3cfdba27d..6ae02c0b81a 100644
--- a/storage/innobase/dict/dict0dict.c
+++ b/storage/innobase/dict/dict0dict.c
@@ -1415,7 +1415,7 @@ dict_index_add_to_cache(
dict_index_get_nth_field(new_index, i)->col->ord_part = 1;
}
- new_index->page = page_no;
+ new_index->page = (unsigned int) page_no;
rw_lock_create(&new_index->lock, SYNC_INDEX_TREE);
if (!UNIV_UNLIKELY(new_index->type & DICT_UNIVERSAL)) {
@@ -1531,10 +1531,10 @@ dict_index_add_col(
field = dict_index_get_nth_field(index, index->n_def - 1);
field->col = col;
- field->fixed_len = dict_col_get_fixed_size(col);
+ field->fixed_len = (unsigned int) dict_col_get_fixed_size(col);
if (prefix_len && field->fixed_len > prefix_len) {
- field->fixed_len = prefix_len;
+ field->fixed_len = (unsigned int) prefix_len;
}
/* Long fixed-length fields that need external storage are treated as
@@ -1736,7 +1736,7 @@ dict_index_build_internal_clust(
break;
}
- new_index->trx_id_offset += fixed_size;
+ new_index->trx_id_offset += (unsigned int) fixed_size;
}
}
@@ -3045,7 +3045,7 @@ col_loop1:
foreign->foreign_table_name = mem_heap_strdup(foreign->heap,
table->name);
foreign->foreign_index = index;
- foreign->n_fields = i;
+ foreign->n_fields = (unsigned int) i;
foreign->foreign_col_names = mem_heap_alloc(foreign->heap,
i * sizeof(void*));
for (i = 0; i < foreign->n_fields; i++) {
diff --git a/storage/innobase/dict/dict0load.c b/storage/innobase/dict/dict0load.c
index f4f8c2d5d23..e23795f9898 100644
--- a/storage/innobase/dict/dict0load.c
+++ b/storage/innobase/dict/dict0load.c
@@ -843,7 +843,7 @@ err_exit:
table = dict_mem_table_create(name, space, n_cols & ~0x80000000UL,
flags);
- table->ibd_file_missing = ibd_file_missing;
+ table->ibd_file_missing = (unsigned int) ibd_file_missing;
ut_a(name_of_col_is(sys_tables, sys_index, 3, "ID"));
@@ -1180,8 +1180,8 @@ dict_load_foreign(
/* We store the type in the bits 24..29 of n_fields_and_type. */
- foreign->type = n_fields_and_type >> 24;
- foreign->n_fields = n_fields_and_type & 0x3FFUL;
+ foreign->type = (unsigned int) (n_fields_and_type >> 24);
+ foreign->n_fields = (unsigned int) (n_fields_and_type & 0x3FFUL);
foreign->id = mem_heap_strdup(foreign->heap, id);
diff --git a/storage/innobase/dict/dict0mem.c b/storage/innobase/dict/dict0mem.c
index cee0ffec20b..9aa49dee745 100644
--- a/storage/innobase/dict/dict0mem.c
+++ b/storage/innobase/dict/dict0mem.c
@@ -50,14 +50,14 @@ dict_mem_table_create(
table->heap = heap;
- table->flags = flags;
+ table->flags = (unsigned int) flags;
table->name = mem_heap_strdup(heap, name);
table->dir_path_of_temp_table = NULL;
- table->space = space;
+ table->space = (unsigned int) space;
table->ibd_file_missing = FALSE;
table->tablespace_discarded = FALSE;
table->n_def = 0;
- table->n_cols = n_cols + DATA_N_SYS_COLS;
+ table->n_cols = (unsigned int) (n_cols + DATA_N_SYS_COLS);
table->n_mysql_handles_opened = 0;
table->n_foreign_key_checks_running = 0;
@@ -208,14 +208,14 @@ dict_mem_table_add_col(
col->ind = table->n_def - 1;
col->ord_part = 0;
- col->mtype = mtype;
- col->prtype = prtype;
- col->len = len;
+ col->mtype = (unsigned int) mtype;
+ col->prtype = (unsigned int) prtype;
+ col->len = (unsigned int) len;
dtype_get_mblen(mtype, prtype, &mbminlen, &mbmaxlen);
- col->mbminlen = mbminlen;
- col->mbmaxlen = mbmaxlen;
+ col->mbminlen = (unsigned int) mbminlen;
+ col->mbmaxlen = (unsigned int) mbmaxlen;
}
/**************************************************************************
@@ -245,13 +245,13 @@ dict_mem_index_create(
index->heap = heap;
index->type = type;
- index->space = space;
+ index->space = (unsigned int) space;
index->page = 0;
index->name = mem_heap_strdup(heap, index_name);
index->table_name = table_name;
index->table = NULL;
index->n_def = index->n_nullable = 0;
- index->n_fields = n_fields;
+ index->n_fields = (unsigned int) n_fields;
index->fields = mem_heap_alloc(heap, 1 + n_fields
* sizeof(dict_field_t));
/* The '1 +' above prevents allocation
@@ -326,7 +326,7 @@ dict_mem_index_add_field(
field = dict_index_get_nth_field(index, index->n_def - 1);
field->name = name;
- field->prefix_len = prefix_len;
+ field->prefix_len = (unsigned int) prefix_len;
}
/**************************************************************************
diff --git a/storage/innobase/eval/eval0proc.c b/storage/innobase/eval/eval0proc.c
index f5a9d9dc2a8..a513e8e4024 100644
--- a/storage/innobase/eval/eval0proc.c
+++ b/storage/innobase/eval/eval0proc.c
@@ -194,7 +194,7 @@ for_step(
loop_var_value = eval_node_get_int_val(node->loop_start_limit);
node->loop_end_value
- = eval_node_get_int_val(node->loop_end_limit);
+ = (int) eval_node_get_int_val(node->loop_end_limit);
}
/* Check if we should do another loop */
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index b5b354d4b39..14e93cca66f 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -695,7 +695,7 @@ innobase_convert_from_table_id(
uint errors;
strconvert(current_thd->charset(), from,
- &my_charset_filename, to, len, &errors);
+ &my_charset_filename, to, (uint) len, &errors);
}
/**********************************************************************
@@ -714,7 +714,7 @@ innobase_convert_from_id(
uint errors;
strconvert(current_thd->charset(), from,
- system_charset_info, to, len, &errors);
+ system_charset_info, to, (uint) len, &errors);
}
/**********************************************************************
@@ -839,8 +839,9 @@ innobase_convert_string(
CHARSET_INFO* from_cs,
uint* errors)
{
- return(copy_and_convert((char*)to, to_length, to_cs,
- (const char*)from, from_length, from_cs, errors));
+ return(copy_and_convert((char*)to, (uint32) to_length, to_cs,
+ (const char*)from, (uint32) from_length, from_cs,
+ errors));
}
/*************************************************************************
@@ -1203,9 +1204,9 @@ innobase_print_identifier(
output strings buffers must not be shared. The function
only produces more output when the name contains other
characters than [0-9A-Z_a-z]. */
- char* temp_name = my_malloc(namelen + 1, MYF(MY_WME));
- uint qnamelen = namelen
- + (1 + sizeof srv_mysql50_table_name_prefix);
+ char* temp_name = my_malloc((uint) namelen + 1, MYF(MY_WME));
+ uint qnamelen = (uint) (namelen
+ + (1 + sizeof srv_mysql50_table_name_prefix));
if (temp_name) {
qname = my_malloc(qnamelen, MYF(MY_WME));
@@ -2866,7 +2867,8 @@ ha_innobase::store_key_val_for_row(
true_len = (ulint) cs->cset->well_formed_len(cs,
(const char *) data,
(const char *) data + len,
- key_len / cs->mbmaxlen,
+ (uint) (key_len /
+ cs->mbmaxlen),
&error);
}
@@ -2935,7 +2937,8 @@ ha_innobase::store_key_val_for_row(
(const char *) blob_data,
(const char *) blob_data
+ blob_len,
- key_len / cs->mbmaxlen,
+ (uint) (key_len /
+ cs->mbmaxlen),
&error);
}
@@ -3007,7 +3010,8 @@ ha_innobase::store_key_val_for_row(
(const char *)src_start,
(const char *)src_start
+ key_len,
- key_len / cs->mbmaxlen,
+ (uint) (key_len /
+ cs->mbmaxlen),
&error);
}
}
diff --git a/storage/innobase/include/ut0byte.ic b/storage/innobase/include/ut0byte.ic
index 020cf9cedd9..01b6c29d08f 100644
--- a/storage/innobase/include/ut0byte.ic
+++ b/storage/innobase/include/ut0byte.ic
@@ -390,8 +390,8 @@ ut_bit_set_nth(
# error "TRUE != 1"
#endif
if (val) {
- return((1 << n) | a);
+ return(((ulint) 1 << n) | a);
} else {
- return(~(1 << n) & a);
+ return(~((ulint) 1 << n) & a);
}
}
diff --git a/storage/innobase/include/ut0ut.ic b/storage/innobase/include/ut0ut.ic
index 7b080216117..412717a094e 100644
--- a/storage/innobase/include/ut0ut.ic
+++ b/storage/innobase/include/ut0ut.ic
@@ -170,5 +170,5 @@ ut_2_exp(
/* out: 2 to power n */
ulint n) /* in: number */
{
- return(1 << n);
+ return((ulint) 1 << n);
}
diff --git a/storage/innobase/mtr/mtr0log.c b/storage/innobase/mtr/mtr0log.c
index cb03f207a56..f9704dc2d20 100644
--- a/storage/innobase/mtr/mtr0log.c
+++ b/storage/innobase/mtr/mtr0log.c
@@ -529,7 +529,7 @@ mlog_parse_index(
ind = dict_mem_index_create("LOG_DUMMY", "LOG_DUMMY",
DICT_HDR_SPACE, 0, n);
ind->table = table;
- ind->n_uniq = n_uniq;
+ ind->n_uniq = (unsigned int) n_uniq;
if (n_uniq != n) {
ind->type = DICT_CLUSTERED;
}
diff --git a/storage/innobase/pars/pars0lex.l b/storage/innobase/pars/pars0lex.l
index 71ac4c98267..ad65034fab0 100644
--- a/storage/innobase/pars/pars0lex.l
+++ b/storage/innobase/pars/pars0lex.l
@@ -109,7 +109,7 @@ BOUND_ID \$[a-z_A-Z0-9]+
yylval = sym_tab_add_bound_lit(pars_sym_tab_global,
yytext + 1, &type);
- return(type);
+ return((int) type);
}
{BOUND_ID} {
diff --git a/storage/innobase/rem/rem0cmp.c b/storage/innobase/rem/rem0cmp.c
index 07e5b64c157..ca0ec663548 100644
--- a/storage/innobase/rem/rem0cmp.c
+++ b/storage/innobase/rem/rem0cmp.c
@@ -597,7 +597,7 @@ cmp_dtuple_rec_with_match(
dtuple_byte = cmp_collate(dtuple_byte);
}
- ret = dtuple_byte - rec_byte;
+ ret = (int) (dtuple_byte - rec_byte);
if (UNIV_UNLIKELY(ret)) {
if (ret < 0) {
ret = -1;
diff --git a/storage/innobase/row/row0mysql.c b/storage/innobase/row/row0mysql.c
index 6779f536daa..78851c7b4f9 100644
--- a/storage/innobase/row/row0mysql.c
+++ b/storage/innobase/row/row0mysql.c
@@ -3423,7 +3423,7 @@ row_delete_constraint_low(
pars_info_add_str_literal(info, "id", id);
- return(que_eval_sql(info,
+ return((int) que_eval_sql(info,
"PROCEDURE DELETE_CONSTRAINT () IS\n"
"BEGIN\n"
"DELETE FROM SYS_FOREIGN_COLS WHERE ID = :id;\n"
@@ -3462,7 +3462,7 @@ row_delete_constraint(
err = row_delete_constraint_low(id, trx);
}
- return(err);
+ return((int) err);
}
/*************************************************************************
diff --git a/storage/innobase/row/row0sel.c b/storage/innobase/row/row0sel.c
index bee9f1472ce..a3199055b54 100644
--- a/storage/innobase/row/row0sel.c
+++ b/storage/innobase/row/row0sel.c
@@ -2116,7 +2116,7 @@ row_fetch_store_uint4(
ut_a(len == 4);
tmp = mach_read_from_4(dfield_get_data(dfield));
- *val = tmp;
+ *val = (ib_uint32_t) tmp;
return(NULL);
}
diff --git a/storage/innobase/sync/sync0rw.c b/storage/innobase/sync/sync0rw.c
index 549ad36271b..f06db577bad 100644
--- a/storage/innobase/sync/sync0rw.c
+++ b/storage/innobase/sync/sync0rw.c
@@ -127,7 +127,7 @@ rw_lock_create_func(
lock->magic_n = RW_LOCK_MAGIC_N;
lock->cfile_name = cfile_name;
- lock->cline = cline;
+ lock->cline = (unsigned int) cline;
lock->last_s_file_name = "not yet reserved";
lock->last_x_file_name = "not yet reserved";
@@ -356,7 +356,7 @@ rw_lock_x_lock_low(
file_name, line);
#endif
lock->last_x_file_name = file_name;
- lock->last_x_line = line;
+ lock->last_x_line = (unsigned int) line;
/* Locking succeeded, we may return */
return(RW_LOCK_EX);
@@ -393,7 +393,7 @@ rw_lock_x_lock_low(
#endif
lock->last_x_file_name = file_name;
- lock->last_x_line = line;
+ lock->last_x_line = (unsigned int) line;
/* Locking succeeded, we may return */
return(RW_LOCK_EX);
@@ -415,7 +415,7 @@ rw_lock_x_lock_low(
#endif
lock->last_x_file_name = file_name;
- lock->last_x_line = line;
+ lock->last_x_line = (unsigned int) line;
/* Locking succeeded, we may return */
return(RW_LOCK_EX);
diff --git a/storage/innobase/trx/trx0trx.c b/storage/innobase/trx/trx0trx.c
index cfa2b01f406..6f59d2659ec 100644
--- a/storage/innobase/trx/trx0trx.c
+++ b/storage/innobase/trx/trx0trx.c
@@ -2023,7 +2023,7 @@ trx_recover_for_mysql(
(ulong) count);
}
- return (count);
+ return ((int) count);
}
/***********************************************************************
diff --git a/storage/myisam/mi_log.c b/storage/myisam/mi_log.c
index 2672a9dacd6..f720f752a06 100644
--- a/storage/myisam/mi_log.c
+++ b/storage/myisam/mi_log.c
@@ -31,7 +31,7 @@
#undef GETPID /* For HPUX */
#ifdef THREAD
-#define GETPID() (log_type == 1 ? (long) myisam_pid : (long) my_thread_id());
+#define GETPID() (log_type == 1 ? (long) myisam_pid : (long) my_thread_dbug_id())
#else
#define GETPID() myisam_pid
#endif
diff --git a/storage/myisam/mi_packrec.c b/storage/myisam/mi_packrec.c
index 30c95dcb0bd..a5a9aaededd 100644
--- a/storage/myisam/mi_packrec.c
+++ b/storage/myisam/mi_packrec.c
@@ -564,7 +564,7 @@ static void fill_quick_table(uint16 *table, uint bits, uint max_bits,
*/
value|= (max_bits - bits) << 8 | IS_CHAR;
- for (end= table + (1 << bits); table < end; table++)
+ for (end= table + (uint) (((uint) 1 << bits)); table < end; table++)
{
*table= (uint16) value;
}
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index bb4ae9a97ec..066e6cdb81b 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -713,6 +713,7 @@ get_one_option(int optid,
case 2:
method_conv= MI_STATS_METHOD_IGNORE_NULLS;
break;
+ default: assert(0); /* Impossible */
}
check_param.stats_method= method_conv;
break;
diff --git a/storage/ndb/src/common/debugger/EventLogger.cpp b/storage/ndb/src/common/debugger/EventLogger.cpp
index e9eb106ac2e..4e9ba906645 100644
--- a/storage/ndb/src/common/debugger/EventLogger.cpp
+++ b/storage/ndb/src/common/debugger/EventLogger.cpp
@@ -608,21 +608,21 @@ void getTextTransporterError(QQQQ) {
lenth = sizeof(TransporterErrorString)/sizeof(struct myTransporterError);
for(i=0; i<lenth; i++)
{
- if(theData[2] == TransporterErrorString[i].errorNum)
+ if(theData[2] == (Uint32) TransporterErrorString[i].errorNum)
{
BaseString::snprintf(m_text, m_text_len,
- "Transporter to node %d reported error 0x%x: %s",
- theData[1],
- theData[2],
- TransporterErrorString[i].errorString);
+ "Transporter to node %d reported error 0x%x: %s",
+ theData[1],
+ theData[2],
+ TransporterErrorString[i].errorString);
break;
}
}
if(i == lenth)
BaseString::snprintf(m_text, m_text_len,
- "Transporter to node %d reported error 0x%x: unknown error",
- theData[1],
- theData[2]);
+ "Transporter to node %d reported error 0x%x: unknown error",
+ theData[1],
+ theData[2]);
}
void getTextTransporterWarning(QQQQ) {
getTextTransporterError(m_text, m_text_len, theData);
@@ -1043,6 +1043,7 @@ EventLogger::close()
}
#ifdef NOT_USED
+
static NdbOut&
operator<<(NdbOut& out, const LogLevel & ll)
{
diff --git a/storage/ndb/src/common/util/ConfigValues.cpp b/storage/ndb/src/common/util/ConfigValues.cpp
index 6652fd5753b..9309fe3fbd6 100644
--- a/storage/ndb/src/common/util/ConfigValues.cpp
+++ b/storage/ndb/src/common/util/ConfigValues.cpp
@@ -88,18 +88,18 @@ bool
ConfigValues::getByPos(Uint32 pos, Entry * result) const {
assert(pos < (2 * m_size));
Uint32 keypart = m_values[pos];
- Uint32 val = m_values[pos+1];
+ Uint32 val2 = m_values[pos+1];
switch(::getTypeOf(keypart)){
case IntType:
case SectionType:
- result->m_int = val;
+ result->m_int = val2;
break;
case StringType:
- result->m_string = * getString(val);
+ result->m_string = * getString(val2);
break;
case Int64Type:
- result->m_int64 = * get64(val);
+ result->m_int64 = * get64(val2);
break;
case InvalidType:
default:
diff --git a/storage/ndb/src/common/util/NdbSqlUtil.cpp b/storage/ndb/src/common/util/NdbSqlUtil.cpp
index 1234e4ece6b..0f62d66c149 100644
--- a/storage/ndb/src/common/util/NdbSqlUtil.cpp
+++ b/storage/ndb/src/common/util/NdbSqlUtil.cpp
@@ -681,8 +681,6 @@ int
NdbSqlUtil::cmpBit(const void* info, const void* p1, unsigned n1, const void* p2, unsigned n2, bool full)
{
Uint32 n = (n1 < n2) ? n1 : n2;
- char* c1 = (char*)p1;
- char* c2 = (char*)p2;
int ret = memcmp(p1, p2, n);
return ret;
}
diff --git a/storage/ndb/src/cw/cpcd/CPCD.hpp b/storage/ndb/src/cw/cpcd/CPCD.hpp
index 2cada43b609..4d48bba096f 100644
--- a/storage/ndb/src/cw/cpcd/CPCD.hpp
+++ b/storage/ndb/src/cw/cpcd/CPCD.hpp
@@ -62,6 +62,7 @@ struct CPCEvent {
struct EventSubscriber {
virtual void report(const CPCEvent &) = 0;
+ EventSubscriber() {}
virtual ~EventSubscriber() {}
};
diff --git a/storage/ndb/src/kernel/blocks/backup/Backup.cpp b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
index cb85c2c5e7e..fc698d161e0 100644
--- a/storage/ndb/src/kernel/blocks/backup/Backup.cpp
+++ b/storage/ndb/src/kernel/blocks/backup/Backup.cpp
@@ -1488,7 +1488,6 @@ Backup::execCREATE_TRIG_CONF(Signal* signal)
const Uint32 ptrI = conf->getConnectionPtr();
const Uint32 tableId = conf->getTableId();
const TriggerEvent::Value type = conf->getTriggerEvent();
- const Uint32 triggerId = conf->getTriggerId();
BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
@@ -2152,7 +2151,6 @@ Backup::execDROP_TRIG_CONF(Signal* signal)
DropTrigConf* conf = (DropTrigConf*)signal->getDataPtr();
const Uint32 ptrI = conf->getConnectionPtr();
- const Uint32 triggerId= conf->getTriggerId();
BackupRecordPtr ptr LINT_SET_PTR;
c_backupPool.getPtr(ptr, ptrI);
@@ -4658,7 +4656,6 @@ Backup::execABORT_BACKUP_ORD(Signal* signal)
}
ndbrequire(ok);
- Uint32 ref= ptr.p->masterRef;
ptr.p->masterRef = reference();
ptr.p->nodes.clear();
ptr.p->nodes.set(getOwnNodeId());
diff --git a/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp b/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp
index a44620b16ed..ca348b23e6a 100644
--- a/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp
+++ b/storage/ndb/src/kernel/blocks/dbacc/Dbacc.hpp
@@ -537,6 +537,7 @@ struct Operationrec {
,OP_INITIAL = ~(Uint32)0
};
+ Operationrec() {}
bool is_same_trans(const Operationrec* op) const {
return
transId1 == op->transId1 && transId2 == op->transId2;
diff --git a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
index 70bb8368a57..b90a000d55b 100644
--- a/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbacc/DbaccMain.cpp
@@ -698,7 +698,6 @@ Dbacc::execDROP_TAB_REQ(Signal* signal){
void Dbacc::releaseRootFragResources(Signal* signal, Uint32 tableId)
{
- FragmentrecPtr rootPtr;
TabrecPtr tabPtr;
tabPtr.i = tableId;
ptrCheckGuard(tabPtr, ctablesize, tabrec);
@@ -2266,7 +2265,6 @@ void Dbacc::execACCMINUPDATE(Signal* signal)
Page8Ptr ulkPageidptr;
Uint32 tulkLocalPtr;
Uint32 tlocalkey1, tlocalkey2;
- Uint32 TlogStart;
jamEntry();
operationRecPtr.i = signal->theData[0];
diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
index 00a984e591b..15362a7c34e 100644
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
@@ -291,7 +291,6 @@ Dbdict::execDUMP_STATE_ORD(Signal* signal)
for(; ok; ok = c_obj_hash.next(iter))
{
Rope name(c_rope_pool, iter.curr.p->m_name);
- const Uint32 size = name.size();
char buf[1024];
name.copy(buf);
ndbout_c("%s m_ref_count: %d", buf, iter.curr.p->m_ref_count);
@@ -3793,7 +3792,7 @@ Dbdict::execCREATE_TABLE_REQ(Signal* signal){
createTabPtr.p->m_dihAddFragPtr = RNIL;
Uint32 key = c_opRecordSequence + 1;
- Uint32 *theData = signal->getDataPtrSend(), i;
+ Uint32 *theData = signal->getDataPtrSend();
Uint16 *frag_data= (Uint16*)&signal->theData[25];
CreateFragmentationReq * const req = (CreateFragmentationReq*)theData;
req->senderRef = reference();
@@ -4940,7 +4939,6 @@ Dbdict::execCREATE_FRAGMENTATION_CONF(Signal* signal){
packTableIntoPages(w, tabPtr);
SegmentedSectionPtr spDataPtr;
- Ptr<SectionSegment> tmpTsPtr;
w.getPtr(spDataPtr);
signal->setSection(spDataPtr, CreateTabReq::DICT_TAB_INFO);
@@ -5425,7 +5423,6 @@ Dbdict::execADD_FRAGREQ(Signal* signal) {
Uint32 fragCount = req->totalFragments;
Uint32 requestInfo = req->requestInfo;
Uint32 startGci = req->startGci;
- Uint32 tablespace_id= req->tablespaceId;
Uint32 logPart = req->logPartId;
ndbrequire(node == getOwnNodeId());
@@ -7538,7 +7535,6 @@ void
Dbdict::execLIST_TABLES_REQ(Signal* signal)
{
jamEntry();
- Uint32 i;
ListTablesReq * req = (ListTablesReq*)signal->getDataPtr();
Uint32 senderRef = req->senderRef;
Uint32 senderData = req->senderData;
@@ -9415,7 +9411,6 @@ Dbdict::createEventUTIL_PREPARE(Signal* signal,
evntRecPtr.i = ref->getSenderData();
ndbrequire((evntRecPtr.p = c_opCreateEvent.getPtr(evntRecPtr.i)) != NULL);
- Uint32 err;
interpretUtilPrepareErrorCode(errorCode, evntRecPtr.p->m_errorCode,
evntRecPtr.p->m_errorLine);
evntRecPtr.p->m_errorNode = reference();
@@ -15184,7 +15179,6 @@ Dbdict::execDROP_OBJ_REQ(Signal* signal){
const Uint32 objId = req->objId;
const Uint32 objVersion = req->objVersion;
const Uint32 objType = req->objType;
- const Uint32 requestInfo = req->requestInfo;
DropObjRecordPtr dropObjPtr;
ndbrequire(c_opDropObj.seize(dropObjPtr));
@@ -15683,8 +15677,7 @@ Dbdict::execCREATE_FILEGROUP_CONF(Signal* signal){
void
Dbdict::create_fg_abort_start(Signal* signal, SchemaOp* op){
- CreateFilegroupImplReq* req =
- (CreateFilegroupImplReq*)signal->getDataPtrSend();
+ (void) signal->getDataPtrSend();
if (op->m_obj_ptr_i != RNIL)
{
diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
index d9fd604036e..2473a83f383 100644
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.hpp
@@ -1975,6 +1975,7 @@ public:
NodeBitmask m_nodes;
Uint32 m_errorCode;
+ SchemaTransaction() {}
void setErrorCode(Uint32 c){ if(m_errorCode == 0) m_errorCode = c;}
/**
diff --git a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
index e103db2e605..4934fca68c5 100644
--- a/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
@@ -2965,7 +2965,6 @@ Dbdih::nr_start_fragment(Signal* signal,
if (replicaPtr.p->lcpStatus[idx] == ZVALID)
{
ndbrequire(replicaPtr.p->lcpId[idx] > maxLcpId);
- Uint32 startGci = replicaPtr.p->maxGciCompleted[idx];
Uint32 stopGci = replicaPtr.p->maxGciStarted[idx];
for (;j < replicaPtr.p->noCrashedReplicas; j++)
{
@@ -10620,8 +10619,6 @@ Dbdih::handle_invalid_lcp_no(const LcpFragRep* rep,
ndbrequire(!isMaster());
Uint32 lcpNo = rep->lcpNo;
Uint32 lcpId = rep->lcpId;
- Uint32 replicaLcpNo = replicaPtr.p->nextLcp;
- Uint32 prevReplicaLcpNo = prevLcpNo(replicaLcpNo);
warningEvent("Detected previous node failure of %d during lcp",
rep->nodeId);
diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
index 0205f1db0de..db28daea336 100644
--- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
@@ -599,7 +599,7 @@ Dblqh::execDEFINE_BACKUP_REF(Signal* signal)
case DefineBackupRef::FailedInsertTableList:
jam();
err_code = NDBD_EXIT_INVALID_CONFIG;
- extra_msg = "Probably Backup parameters configuration error, Please consult the manual";
+ extra_msg = (char*) "Probably Backup parameters configuration error, Please consult the manual";
progError(__LINE__, err_code, extra_msg);
}
@@ -3963,7 +3963,6 @@ void
Dblqh::handle_nr_copy(Signal* signal, Ptr<TcConnectionrec> regTcPtr)
{
jam();
- Uint32 tableId = regTcPtr.p->tableref;
Uint32 fragPtr = fragptr.p->tupFragptr;
Uint32 op = regTcPtr.p->operation;
@@ -6728,7 +6727,6 @@ void Dblqh::execABORT(Signal* signal)
}//if
TcConnectionrec * const regTcPtr = tcConnectptr.p;
- Uint32 activeCreat = regTcPtr->activeCreat;
if (ERROR_INSERTED(5100))
{
SET_ERROR_INSERT_VALUE(5101);
@@ -6808,7 +6806,6 @@ void Dblqh::execABORTREQ(Signal* signal)
return;
}//if
TcConnectionrec * const regTcPtr = tcConnectptr.p;
- Uint32 activeCreat = regTcPtr->activeCreat;
if (regTcPtr->transactionState != TcConnectionrec::PREPARED) {
warningReport(signal, 10);
return;
diff --git a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
index 70dca820d73..7ea6d3936b0 100644
--- a/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
@@ -6937,7 +6937,6 @@ void Dbtc::execGCP_NOMORETRANS(Signal* signal)
/*****************************************************************************/
void Dbtc::execNODE_FAILREP(Signal* signal)
{
- HostRecordPtr tmpHostptr;
jamEntry();
NodeFailRep * const nodeFail = (NodeFailRep *)&signal->theData[0];
@@ -11841,8 +11840,6 @@ void Dbtc::execTCKEYREF(Signal* signal)
}
const UintR TconnectIndex = indexOp->connectionIndex;
ApiConnectRecord * const regApiPtr = &apiConnectRecord[TconnectIndex];
- Uint32 tcKeyRequestInfo = indexOp->tcIndxReq.requestInfo;
- Uint32 commitFlg = TcKeyReq::getCommitFlag(tcKeyRequestInfo);
switch(indexOp->indexOpState) {
case(IOS_NOOP): {
@@ -13305,7 +13302,6 @@ Dbtc::execROUTE_ORD(Signal* signal)
Uint32 dstRef = ord->dstRef;
Uint32 srcRef = ord->srcRef;
Uint32 gsn = ord->gsn;
- Uint32 cnt = ord->cnt;
if (likely(getNodeInfo(refToNode(dstRef)).m_connected))
{
diff --git a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
index a9f0905ab4c..fecc4649fe9 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/Dbtup.hpp
@@ -516,6 +516,7 @@ typedef Ptr<Fragoperrec> FragoperrecPtr;
return (m_key.m_file_no << 16) ^ m_key.m_page_idx;
}
+ Extent_info() {}
bool equal(const Extent_info & rec) const {
return m_key.m_file_no == rec.m_key.m_file_no &&
m_key.m_page_idx == rec.m_key.m_page_idx;
@@ -667,6 +668,7 @@ struct Operationrec {
Uint32 currentAttrinbufLen; //Used until copyAttrinfo
};
+ Operationrec() {}
bool is_first_operation() const { return prevActiveOp == RNIL;}
bool is_last_operation() const { return nextActiveOp == RNIL;}
@@ -1241,6 +1243,7 @@ typedef Ptr<HostBuffer> HostBufferPtr;
STATIC_CONST( LCP_KEEP = 0x02000000 ); // Should be returned in LCP
STATIC_CONST( FREE = 0x02800000 ); // Is free
+ Tuple_header() {}
Uint32 get_tuple_version() const {
return m_header_bits & TUP_VERSION_MASK;
}
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
index 54abbf18664..f865904b413 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupDiskAlloc.cpp
@@ -153,12 +153,10 @@ Dbtup::Disk_alloc_info::Disk_alloc_info(const Tablerec* tabPtrP,
return;
Uint32 min_size= 4*tabPtrP->m_offsets[DD].m_fix_header_size;
- Uint32 var_size= tabPtrP->m_offsets[DD].m_max_var_offset;
if (tabPtrP->m_attributes[DD].m_no_of_varsize == 0)
{
Uint32 recs_per_page= (4*Tup_fixsize_page::DATA_WORDS)/min_size;
- Uint32 pct_free= 0;
m_page_free_bits_map[0] = recs_per_page; // 100% free
m_page_free_bits_map[1] = 1;
m_page_free_bits_map[2] = 0;
@@ -317,7 +315,7 @@ Dbtup::restart_setup_page(Disk_alloc_info& alloc, PagePtr pagePtr)
0, 0, 0);
unsigned uncommitted, committed;
uncommitted = committed = ~(unsigned)0;
- int ret = tsman.get_page_free_bits(&page, &uncommitted, &committed);
+ (void) tsman.get_page_free_bits(&page, &uncommitted, &committed);
idx = alloc.calc_page_free_bits(real_free);
ddassert(idx == committed);
@@ -859,9 +857,6 @@ Dbtup::disk_page_set_dirty(PagePtr pagePtr)
if (DBG_DISK)
ndbout << " disk_page_set_dirty " << key << endl;
- Uint32 tableId = pagePtr.p->m_table_id;
- Uint32 fragId = pagePtr.p->m_fragment_id;
-
Ptr<Tablerec> tabPtr;
tabPtr.i= pagePtr.p->m_table_id;
ptrCheckGuard(tabPtr, cnoOfTablerec, tablerec);
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
index a292be5e304..fe0f570f484 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupExecQuery.cpp
@@ -451,7 +451,6 @@ Dbtup::load_diskpage(Signal* signal,
Tuple_header* ptr= (Tuple_header*)tmp;
int res= 1;
- Uint32 opPtr= ptr->m_operation_ptr_i;
if(ptr->m_header_bits & Tuple_header::DISK_PART)
{
Page_cache_client::Request req;
@@ -536,7 +535,6 @@ Dbtup::load_diskpage_scan(Signal* signal,
Tuple_header* ptr= (Tuple_header*)tmp;
int res= 1;
- Uint32 opPtr= ptr->m_operation_ptr_i;
if(ptr->m_header_bits & Tuple_header::DISK_PART)
{
Page_cache_client::Request req;
@@ -2923,7 +2921,6 @@ Dbtup::nr_read_pk(Uint32 fragPtrI,
ptrCheckGuard(tablePtr, cnoOfTablerec, tablerec);
Local_key tmp = *key;
- Uint32 pages = fragPtr.p->noOfPages;
int ret;
PagePtr page_ptr;
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
index 88a818e6fd7..50500b96134 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupFixAlloc.cpp
@@ -123,7 +123,6 @@ void Dbtup::convertThPage(Fix_page* regPagePtr,
Uint32 mm)
{
Uint32 nextTuple = regTabPtr->m_offsets[mm].m_fix_header_size;
- Uint32 endOfList;
/*
ASSUMES AT LEAST ONE TUPLE HEADER FITS AND THEREFORE NO HANDLING
OF ZERO AS EXTREME CASE
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
index b5010205880..e51638b8a20 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupMeta.cpp
@@ -53,7 +53,6 @@ void Dbtup::execTUPFRAGREQ(Signal* signal)
regTabPtr.i = tupFragReq->tableId;
Uint32 noOfAttributes = tupFragReq->noOfAttr;
Uint32 fragId = tupFragReq->fragId;
- Uint32 noOfNullAttr = tupFragReq->noOfNullAttr;
/* Uint32 schemaVersion = tupFragReq->schemaVersion;*/
Uint32 noOfKeyAttr = tupFragReq->noOfKeyAttr;
Uint32 noOfCharsets = tupFragReq->noOfCharsets;
@@ -594,8 +593,8 @@ void Dbtup::execTUP_ADD_ATTRREQ(Signal* signal)
Uint32 sz= sizeof(Disk_undo::Create) >> 2;
Logfile_client lgman(this, c_lgman, regFragPtr.p->m_logfile_group_id);
- int r0 = c_lgman->alloc_log_space(regFragPtr.p->m_logfile_group_id,
- sz);
+ (void) c_lgman->alloc_log_space(regFragPtr.p->m_logfile_group_id,
+ sz);
int res= lgman.get_log_buffer(signal, sz, &cb);
switch(res){
@@ -951,7 +950,7 @@ void Dbtup::releaseFragment(Signal* signal, Uint32 tableId,
cb.m_callbackFunction =
safe_cast(&Dbtup::drop_table_log_buffer_callback);
Uint32 sz= sizeof(Disk_undo::Drop) >> 2;
- int r0 = c_lgman->alloc_log_space(logfile_group_id, sz);
+ (void) c_lgman->alloc_log_space(logfile_group_id, sz);
Logfile_client lgman(this, c_lgman, logfile_group_id);
int res= lgman.get_log_buffer(signal, sz, &cb);
@@ -1081,7 +1080,7 @@ Dbtup::drop_fragment_free_extent(Signal *signal,
safe_cast(&Dbtup::drop_fragment_free_extent_log_buffer_callback);
#if NOT_YET_UNDO_FREE_EXTENT
Uint32 sz= sizeof(Disk_undo::FreeExtent) >> 2;
- int r0 = c_lgman->alloc_log_space(fragPtr.p->m_logfile_group_id, sz);
+ (void) c_lgman->alloc_log_space(fragPtr.p->m_logfile_group_id, sz);
Logfile_client lgman(this, c_lgman, fragPtr.p->m_logfile_group_id);
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
index c8546209f94..28f66c5620a 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupRoutines.cpp
@@ -341,7 +341,6 @@ Dbtup::readFixedSizeTHManyWordNotNULL(Uint32* outBuffer,
Uint32 maxIndexBuf = indexBuf + (dstLen >> 2);
if (maxIndexBuf <= maxRead && ok) {
ljam();
- const char* ssrcPtr = (const char*)srcPtr;
int n = NdbSqlUtil::strnxfrm_bug7284(cs, dstPtr, dstLen, srcPtr + lb, len);
ndbrequire(n != -1);
int m = n;
@@ -510,7 +509,6 @@ Dbtup::readVarSizeNotNULL(Uint32* out_buffer,
Uint32 maxIndexBuf = index_buf + (dstLen >> 2);
if (maxIndexBuf <= max_read && ok) {
ljam();
- const char* ssrcPtr = (const char*)srcPtr;
int n = NdbSqlUtil::strnxfrm_bug7284(cs, dstPtr, dstLen, srcPtr + lb, len);
ndbrequire(n != -1);
int m = n;
@@ -618,7 +616,6 @@ Dbtup::readDiskFixedSizeNotNULL(Uint32* outBuffer,
Uint32 maxIndexBuf = indexBuf + (dstLen >> 2);
if (maxIndexBuf <= maxRead && ok) {
ljam();
- const char* ssrcPtr = (const char*)srcPtr;
int n = NdbSqlUtil::strnxfrm_bug7284(cs, dstPtr, dstLen, srcPtr + lb, len);
ndbrequire(n != -1);
int m = n;
@@ -1025,7 +1022,7 @@ Dbtup::updateVarSizeNotNULL(Uint32* in_buffer,
Uint32 attr_des2)
{
Uint32 attr_descriptor, index_buf, in_buf_len, var_index, null_ind;
- Uint32 vsize_in_bytes, vsize_in_words, new_index, max_var_size;
+ Uint32 vsize_in_words, new_index, max_var_size;
Uint32 var_attr_pos;
char *var_data_start;
Uint16 *vpos_array;
@@ -1445,7 +1442,7 @@ Dbtup::updateDiskVarSizeNotNULL(Uint32* in_buffer,
Uint32 attr_des2)
{
Uint32 attr_descriptor, index_buf, in_buf_len, var_index, null_ind;
- Uint32 vsize_in_bytes, vsize_in_words, new_index, max_var_size;
+ Uint32 vsize_in_words, new_index, max_var_size;
Uint32 var_attr_pos;
char *var_data_start;
Uint16 *vpos_array;
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
index 653a24ba6a1..aad68c5ed17 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupScan.cpp
@@ -831,7 +831,6 @@ Dbtup::scanNext(Signal* signal, ScanOpPtr scanPtr)
{
ndbassert(bits & ScanOp::SCAN_NR);
Local_key& key_mm = pos.m_key_mm;
- Fix_page* page = (Fix_page*)pos.m_page;
if (! (bits & ScanOp::SCAN_DD)) {
key_mm = pos.m_key;
// caller has already set pos.m_get to next tuple
diff --git a/storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp b/storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp
index 28543882255..072bd69da97 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/DbtupVarAlloc.cpp
@@ -163,7 +163,6 @@ void Dbtup::free_var_rec(Fragrecord* fragPtr,
/**
* TODO free fix + var part
*/
- Uint32 page_idx= key->m_page_idx;
Uint32 *ptr = ((Fix_page*)pagePtr.p)->get_ptr(key->m_page_idx, 0);
Tuple_header* tuple = (Tuple_header*)ptr;
diff --git a/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp b/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp
index 8955faff99e..7ebbde93ac7 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp
@@ -461,9 +461,8 @@ operator<< (NdbOut& out, const Tup_fixsize_page& page)
<< " free: " << page.free_space;
out << " free list: " << hex << page.next_free_index << " " << flush;
- Uint32 startTuple = page.next_free_index >> 16;
-
#if 0
+ Uint32 startTuple = page.next_free_index >> 16;
Uint32 cnt = 0;
Uint32 next= startTuple;
while((next & 0xFFFF) != 0xFFFF)
diff --git a/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp b/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp
index 407dfae5865..44aa6182b54 100644
--- a/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp
+++ b/storage/ndb/src/kernel/blocks/dbtup/tuppage.hpp
@@ -94,6 +94,7 @@ struct Tup_fixsize_page
* Alloc record from page
* return page_idx
**/
+ Tup_fixsize_page() {}
Uint32 alloc_record();
Uint32 alloc_record(Uint32 page_idx);
Uint32 free_record(Uint32 page_idx);
@@ -148,6 +149,7 @@ struct Tup_varsize_page
Uint32 m_data[DATA_WORDS];
+ Tup_varsize_page() {}
void init();
Uint32* get_free_space_ptr() {
diff --git a/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp b/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp
index a0e1cbef61c..fe59b8bba2c 100644
--- a/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp
+++ b/storage/ndb/src/kernel/blocks/dbtux/DbtuxStat.cpp
@@ -51,7 +51,6 @@ Dbtux::statRecordsInRange(ScanOpPtr scanPtr, Uint32* out)
TreePos pos1 = scan.m_scanPos;
TreePos pos2;
{ // as in scanFirst()
- TreeHead& tree = frag.m_tree;
setKeyAttrs(frag);
const unsigned idir = 1;
const ScanBound& bound = *scan.m_bound[idir];
diff --git a/storage/ndb/src/kernel/blocks/diskpage.hpp b/storage/ndb/src/kernel/blocks/diskpage.hpp
index 579b538c910..4119c328e35 100644
--- a/storage/ndb/src/kernel/blocks/diskpage.hpp
+++ b/storage/ndb/src/kernel/blocks/diskpage.hpp
@@ -54,6 +54,7 @@ struct File_formats
Uint32 m_node_id;
Uint32 m_file_type;
Uint32 m_time; // time(0)
+ Zero_page_header() {}
void init(File_type ft, Uint32 node_id, Uint32 version, Uint32 now);
int validate(File_type ft, Uint32 node_id, Uint32 version, Uint32 now);
};
@@ -86,6 +87,7 @@ struct File_formats
Uint32 m_fragment_id;
Uint32 m_next_free_extent;
};
+ Extent_header() {}
Uint32 m_page_bitmask[1]; // (BitsPerPage*ExtentSize)/(32*PageSize)
Uint32 get_free_bits(Uint32 page) const;
Uint32 get_free_word_offset(Uint32 page) const;
@@ -102,6 +104,7 @@ struct File_formats
struct Page_header m_page_header;
Extent_header m_extents[1];
+ Extent_page() {}
Extent_header* get_header(Uint32 extent_no, Uint32 extent_size);
};
diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc.cpp b/storage/ndb/src/kernel/vm/ndbd_malloc.cpp
index 9386e3c7cd3..21a26ff11d8 100644
--- a/storage/ndb/src/kernel/vm/ndbd_malloc.cpp
+++ b/storage/ndb/src/kernel/vm/ndbd_malloc.cpp
@@ -22,12 +22,14 @@
#include <stdio.h>
#endif
+#ifdef TRACE_MALLOC
static void xxx(size_t size, size_t *s_m, size_t *s_k, size_t *s_b)
{
*s_m = size/1024/1024;
*s_k = (size - *s_m*1024*1024)/1024;
*s_b = size - *s_m*1024*1024-*s_k*1024;
}
+#endif
static Uint64 g_allocated_memory;
void *ndbd_malloc(size_t size)
diff --git a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
index 2c2d66d1334..70637a362d0 100644
--- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
+++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
@@ -220,6 +220,7 @@ Ndbd_mem_manager::init(bool alloc_less_memory)
while (cnt < MAX_CHUNKS && allocated < pages)
{
InitChunk chunk;
+ LINT_INIT(chunk.m_start);
#if defined(_lint) || defined(FORCE_INIT_OF_VARS)
memset((char*) &chunk, 0 , sizeof(chunk));
diff --git a/storage/ndb/src/mgmclient/main.cpp b/storage/ndb/src/mgmclient/main.cpp
index f9b093f132a..44408362f09 100644
--- a/storage/ndb/src/mgmclient/main.cpp
+++ b/storage/ndb/src/mgmclient/main.cpp
@@ -128,8 +128,6 @@ read_and_execute(int _try_reconnect)
int main(int argc, char** argv){
NDB_INIT(argv[0]);
- const char *_host = 0;
- int _port = 0;
load_defaults("my",load_default_groups,&argc,&argv);
int ho_error;
diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
index 6490ec91300..cdba96e7503 100644
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
@@ -1586,7 +1586,7 @@ NdbEventBuffer::complete_outof_order_gcis()
ndbout_c(" moved %ld rows -> %ld", (long) bucket->m_data.m_count,
(long) m_complete_data.m_data.m_count);
#else
- ndbout_c("");
+ ndbout_c(" ");
#endif
}
bzero(bucket, sizeof(Gci_container));
diff --git a/storage/ndb/src/ndbapi/NdbOperationExec.cpp b/storage/ndb/src/ndbapi/NdbOperationExec.cpp
index ba1905760c3..9fe85265a0c 100644
--- a/storage/ndb/src/ndbapi/NdbOperationExec.cpp
+++ b/storage/ndb/src/ndbapi/NdbOperationExec.cpp
@@ -200,14 +200,14 @@ NdbOperation::prepareSend(Uint32 aTC_ConnectPtr,
OperationType tOperationType = theOperationType;
Uint32 tTupKeyLen = theTupKeyLen;
- Uint8 abortOption = (ao == DefaultAbortOption) ? m_abortOption : ao;
+ Uint8 abortOption = (ao == DefaultAbortOption) ? (Uint8) m_abortOption : (Uint8) ao;
tcKeyReq->setDirtyFlag(tReqInfo, tDirtyIndicator);
tcKeyReq->setOperationType(tReqInfo, tOperationType);
tcKeyReq->setKeyLength(tReqInfo, tTupKeyLen);
// A simple read is always ignore error
- abortOption = tSimpleState ? AO_IgnoreError : abortOption;
+ abortOption = tSimpleState ? (Uint8) AO_IgnoreError : (Uint8) abortOption;
tcKeyReq->setAbortOption(tReqInfo, abortOption);
m_abortOption = abortOption;
diff --git a/storage/ndb/src/ndbapi/SignalSender.cpp b/storage/ndb/src/ndbapi/SignalSender.cpp
index 0c0a9bd0e1f..d6d9f4446ce 100644
--- a/storage/ndb/src/ndbapi/SignalSender.cpp
+++ b/storage/ndb/src/ndbapi/SignalSender.cpp
@@ -19,15 +19,6 @@
#include <signaldata/NFCompleteRep.hpp>
#include <signaldata/NodeFailRep.hpp>
-#ifdef NOT_USED
-static
-void
-require(bool x)
-{
- if (!x)
- abort();
-}
-#endif
SimpleSignal::SimpleSignal(bool dealloc){
memset(this, 0, sizeof(* this));
diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp
index e276eb7d6f9..0e1c3f506f8 100644
--- a/storage/ndb/tools/restore/consumer_restore.cpp
+++ b/storage/ndb/tools/restore/consumer_restore.cpp
@@ -182,6 +182,7 @@ BackupRestore::finalize_table(const TableS & table){
}
+#ifdef NOT_USED
static bool default_nodegroups(NdbDictionary::Table *table)
{
Uint16 *node_groups = (Uint16*)table->getFragmentData();
@@ -197,6 +198,7 @@ static bool default_nodegroups(NdbDictionary::Table *table)
}
return true;
}
+#endif
static Uint32 get_no_fragments(Uint64 max_rows, Uint32 no_nodes)
@@ -424,7 +426,7 @@ bool BackupRestore::translate_frm(NdbDictionary::Table *table)
{
const void *pack_data, *data, *new_pack_data;
char *new_data;
- uint data_len, pack_len, new_data_len, new_pack_len;
+ uint data_len, new_data_len, new_pack_len;
uint no_parts, extra_growth;
DBUG_ENTER("translate_frm");
@@ -1181,6 +1183,7 @@ BackupRestore::endOfTuples()
tuple_free();
}
+#ifdef NOT_USED
static bool use_part_id(const NdbDictionary::Table *table)
{
if (table->getDefaultNoPartitionsFlag() &&
@@ -1189,6 +1192,7 @@ static bool use_part_id(const NdbDictionary::Table *table)
else
return true;
}
+#endif
static Uint32 get_part_id(const NdbDictionary::Table *table,
Uint32 hash_value)