summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Widenius <monty@askmonty.org>2010-08-04 21:36:11 +0300
committerMichael Widenius <monty@askmonty.org>2010-08-04 21:36:11 +0300
commit1f5b93e7720874c2b4a31e11af3fd8729d2beea7 (patch)
tree9932285301ba8c3bfd23ab2bb399ddd32ccfb8a4
parentcd9706b27ee113e0d448cb9c509fa9a4d553c5ee (diff)
downloadmariadb-git-1f5b93e7720874c2b4a31e11af3fd8729d2beea7.tar.gz
Fixed compiler warnings
Fixed some wrong test cases Fixed bug in null handling in XtraDB extra/comp_err.c: Fixed compiler warnings extra/my_print_defaults.c: Fixed compiler warnings mysql-test/suite/binlog/t/binlog_killed.test: Added support for timeouts mysql-test/suite/funcs_1/r/is_columns_is.result: Updated results (INNODB_SYS_TABLES had got new column) scripts/mysql_install_db.sh: Fixed typo sql/mysql_priv.h: Removed not needed argument for compare_record() sql/sql_insert.cc: Removed not needed argument for compare_record() sql/sql_update.cc: Removed not needed argument for compare_record() The argument is not needed becasue we copy the full record[0] to record[1] and the comparison should work even if all columns are not read sql/table.cc: The comparison of rows is independent of HA_PARTIAL_COLUMN_READ storage/maria/maria_chk.c: Fixed compiler warnings storage/maria/maria_read_log.c: Fixed compiler warnings storage/myisam/myisamchk.c: Fixed compiler warnings storage/myisam/myisampack.c: Fixed compiler warnings storage/xtradb/dict/dict0load.c: Fixed compiler warnings storage/xtradb/row/row0sel.c: Fixed null handling in XtraDB. (See comment) storage/xtradb/trx/trx0sys.c: Fixed compiler warnings support-files/compiler_warnings.supp: Fixed compiler warnings
-rw-r--r--extra/comp_err.c3
-rw-r--r--extra/my_print_defaults.c6
-rw-r--r--mysql-test/suite/binlog/t/binlog_killed.test2
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_is.result18
-rw-r--r--mysql-test/suite/funcs_1/t/is_columns_is.test1
-rw-r--r--scripts/mysql_install_db.sh2
-rw-r--r--sql/mysql_priv.h2
-rw-r--r--sql/sql_insert.cc3
-rw-r--r--sql/sql_update.cc25
-rw-r--r--sql/table.cc6
-rw-r--r--storage/maria/maria_chk.c15
-rw-r--r--storage/maria/maria_read_log.c4
-rw-r--r--storage/myisam/myisamchk.c12
-rw-r--r--storage/myisam/myisampack.c4
-rw-r--r--storage/xtradb/dict/dict0load.c1
-rw-r--r--storage/xtradb/row/row0sel.c6
-rw-r--r--storage/xtradb/trx/trx0sys.c6
-rw-r--r--support-files/compiler_warnings.supp1
18 files changed, 58 insertions, 59 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c
index 1571efec448..58395cd6344 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -108,7 +108,8 @@ static struct my_option my_long_options[]=
NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Prints version", 0, 0, 0, GET_NO_ARG,
NO_ARG, 0, 0, 0, 0, 0, 0},
- {"charset", 'C', "Charset dir", &charsets_dir, &charsets_dir,
+ {"charset", 'C', "Charset dir",
+ (char**) &charsets_dir, (char**) &charsets_dir,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"in_file", 'F', "Input file", &TXTFILE, &TXTFILE,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
diff --git a/extra/my_print_defaults.c b/extra/my_print_defaults.c
index cc74208b783..da7061471fa 100644
--- a/extra/my_print_defaults.c
+++ b/extra/my_print_defaults.c
@@ -49,7 +49,7 @@ static struct my_option my_long_options[] =
{"config-file", 'c', "Deprecated, please use --defaults-file instead. "
"Name of config file to read; if no extension is given, default "
"extension (e.g., .ini or .cnf) will be added",
- &config_file, &config_file, 0, GET_STR, REQUIRED_ARG,
+ (char**) &config_file, (char**) &config_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
#ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit",
@@ -61,7 +61,7 @@ static struct my_option my_long_options[] =
{"defaults-file", 'c', "Like --config-file, except: if first option, "
"then read this file only, do not read global or per-user config "
"files; should be the first option",
- &config_file, &config_file, 0, GET_STR, REQUIRED_ARG,
+ (char**) &config_file, (char*) &config_file, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0},
{"defaults-extra-file", 'e',
"Read this file after the global config file and before the config "
@@ -70,7 +70,7 @@ static struct my_option my_long_options[] =
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"defaults-group-suffix", 'g',
"In addition to the given groups, read also groups with this suffix",
- &my_defaults_group_suffix, &my_defaults_group_suffix,
+ (char**) &my_defaults_group_suffix, (char**) &my_defaults_group_suffix,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"extra-file", 'e',
"Deprecated. Synonym for --defaults-extra-file.",
diff --git a/mysql-test/suite/binlog/t/binlog_killed.test b/mysql-test/suite/binlog/t/binlog_killed.test
index e2db326129d..ce6d344af32 100644
--- a/mysql-test/suite/binlog/t/binlog_killed.test
+++ b/mysql-test/suite/binlog/t/binlog_killed.test
@@ -202,7 +202,7 @@ eval kill query $ID;
rollback;
connection con2;
---error 0,ER_QUERY_INTERRUPTED
+--error 0,ER_QUERY_INTERRUPTED,ER_LOCK_WAIT_TIMEOUT
reap;
# todo 1,2 above
rollback;
diff --git a/mysql-test/suite/funcs_1/r/is_columns_is.result b/mysql-test/suite/funcs_1/r/is_columns_is.result
index 42e0d70d719..7460359b87d 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_is.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_is.result
@@ -198,14 +198,15 @@ NULL information_schema INNODB_SYS_INDEXES PAGE_NO 7 0 NO bigint NULL NULL 19 0
NULL information_schema INNODB_SYS_INDEXES SPACE 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema INNODB_SYS_INDEXES TABLE_ID 1 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema INNODB_SYS_INDEXES TYPE 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
-NULL information_schema INNODB_SYS_TABLES CLUSTER_NAME 7 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
-NULL information_schema INNODB_SYS_TABLES ID 2 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
-NULL information_schema INNODB_SYS_TABLES MIX_ID 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
-NULL information_schema INNODB_SYS_TABLES MIX_LEN 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
-NULL information_schema INNODB_SYS_TABLES NAME 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
-NULL information_schema INNODB_SYS_TABLES N_COLS 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
-NULL information_schema INNODB_SYS_TABLES SPACE 8 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
-NULL information_schema INNODB_SYS_TABLES TYPE 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_SYS_TABLES CLUSTER_NAME 8 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
+NULL information_schema INNODB_SYS_TABLES ID 3 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_SYS_TABLES MIX_ID 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_SYS_TABLES MIX_LEN 7 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_SYS_TABLES NAME 2 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
+NULL information_schema INNODB_SYS_TABLES N_COLS 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_SYS_TABLES SCHEMA 1 NO varchar 192 576 NULL NULL utf8 utf8_general_ci varchar(192) select
+NULL information_schema INNODB_SYS_TABLES SPACE 9 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
+NULL information_schema INNODB_SYS_TABLES TYPE 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema INNODB_TABLE_STATS clust_size 4 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema INNODB_TABLE_STATS modified 6 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
NULL information_schema INNODB_TABLE_STATS other_size 5 0 NO bigint NULL NULL 19 0 NULL NULL bigint(21) unsigned select
@@ -670,6 +671,7 @@ NULL information_schema INNODB_SYS_INDEXES N_FIELDS bigint NULL NULL NULL NULL b
NULL information_schema INNODB_SYS_INDEXES TYPE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES SPACE bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_INDEXES PAGE_NO bigint NULL NULL NULL NULL bigint(21) unsigned
+3.0000 information_schema INNODB_SYS_TABLES SCHEMA varchar 192 576 utf8 utf8_general_ci varchar(192)
3.0000 information_schema INNODB_SYS_TABLES NAME varchar 192 576 utf8 utf8_general_ci varchar(192)
NULL information_schema INNODB_SYS_TABLES ID bigint NULL NULL NULL NULL bigint(21) unsigned
NULL information_schema INNODB_SYS_TABLES N_COLS bigint NULL NULL NULL NULL bigint(21) unsigned
diff --git a/mysql-test/suite/funcs_1/t/is_columns_is.test b/mysql-test/suite/funcs_1/t/is_columns_is.test
index eb5c119baf4..c34bb968cc9 100644
--- a/mysql-test/suite/funcs_1/t/is_columns_is.test
+++ b/mysql-test/suite/funcs_1/t/is_columns_is.test
@@ -18,6 +18,7 @@
--source include/not_embedded.inc
# This test depends on having the PBXT information_schema stuff.
--source include/have_pbxt.inc
+#--source include/have_xtradb.inc
let $my_where = WHERE table_schema = 'information_schema'
AND table_name <> 'profiling';
diff --git a/scripts/mysql_install_db.sh b/scripts/mysql_install_db.sh
index ea00b3a183b..8bae2ec9db1 100644
--- a/scripts/mysql_install_db.sh
+++ b/scripts/mysql_install_db.sh
@@ -479,7 +479,7 @@ then
echo "Support MariaDB development by buying support/new features from"
echo "Monty Program Ab. You can contact us about this at sales@askmonty.org".
echo "Alternatively consider joining our community based development effort:"
- echo "http://askmonty.org/wiki/index.php/MariaDB#How_can_I_participate_in_the_development_of_MariaDB.3F"
+ echo "http://askmonty.org/wiki/index.php/MariaDB#How_can_I_participate_in_the_development_of_MariaDB"
echo
fi
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 46a4cf3cf06..bf973b7bfa0 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -1064,7 +1064,7 @@ bool dispatch_command(enum enum_server_command command, THD *thd,
char* packet, uint packet_length);
void log_slow_statement(THD *thd);
bool check_dup(const char *db, const char *name, TABLE_LIST *tables);
-bool compare_record(TABLE *table, bool all_columns_exists);
+bool compare_record(TABLE *table);
bool append_file_to_dir(THD *thd, const char **filename_ptr,
const char *table_name);
void wait_while_table_is_used(THD *thd, TABLE *table,
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 6dd19f6e203..6b5d60d8613 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -1511,8 +1511,7 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info)
info->touched++;
if (((table->file->ha_table_flags() & HA_PARTIAL_COLUMN_READ) &&
!bitmap_is_subset(table->write_set, table->read_set)) ||
- compare_record(table, bitmap_union_is_set_all(table->write_set,
- table->read_set)))
+ compare_record(table))
{
if ((error=table->file->ha_update_row(table->record[1],
table->record[0])) &&
diff --git a/sql/sql_update.cc b/sql/sql_update.cc
index cce6d612fba..fc45b3d31a2 100644
--- a/sql/sql_update.cc
+++ b/sql/sql_update.cc
@@ -27,9 +27,9 @@
/* Return 0 if row hasn't changed */
-bool compare_record(TABLE *table, bool all_columns_exists)
+bool compare_record(TABLE *table)
{
- if (table->s->can_cmp_whole_record && all_columns_exists)
+ if (table->s->can_cmp_whole_record)
return cmp_record(table,record[1]);
/* Compare null bits */
if (memcmp(table->null_flags,
@@ -186,7 +186,7 @@ int mysql_update(THD *thd,
bool using_limit= limit != HA_POS_ERROR;
bool safe_update= test(thd->options & OPTION_SAFE_UPDATES);
bool used_key_is_modified, transactional_table, will_batch;
- bool can_compare_record, all_columns_exists;
+ bool can_compare_record;
int res;
int error, loc_error;
uint used_index= MAX_KEY, dup_key_found;
@@ -574,9 +574,6 @@ int mysql_update(THD *thd,
can_compare_record= (!(table->file->ha_table_flags() &
HA_PARTIAL_COLUMN_READ) ||
bitmap_is_subset(table->write_set, table->read_set));
- all_columns_exists= (can_compare_record &&
- bitmap_union_is_set_all(table->write_set,
- table->read_set));
while (!(error=info.read_record(&info)) && !thd->killed)
{
@@ -594,7 +591,7 @@ int mysql_update(THD *thd,
found++;
- if (!can_compare_record || compare_record(table, all_columns_exists))
+ if (!can_compare_record || compare_record(table))
{
if ((res= table_list->view_check_option(thd, ignore)) !=
VIEW_CHECK_OK)
@@ -1761,14 +1758,11 @@ bool multi_update::send_data(List<Item> &not_used_values)
*/
if (table == table_to_update)
{
- bool can_compare_record, all_columns_exists;
+ bool can_compare_record;
can_compare_record= (!(table->file->ha_table_flags() &
HA_PARTIAL_COLUMN_READ) ||
bitmap_is_subset(table->write_set,
table->read_set));
- all_columns_exists= (can_compare_record &&
- bitmap_union_is_set_all(table->write_set,
- table->read_set));
table->status|= STATUS_UPDATED;
store_record(table,record[1]);
if (fill_record_n_invoke_before_triggers(thd, *fields_for_table[offset],
@@ -1783,7 +1777,7 @@ bool multi_update::send_data(List<Item> &not_used_values)
*/
table->auto_increment_field_not_null= FALSE;
found++;
- if (!can_compare_record || compare_record(table, all_columns_exists))
+ if (!can_compare_record || compare_record(table))
{
int error;
if ((error= cur_table->view_check_option(thd, ignore)) !=
@@ -1970,7 +1964,7 @@ int multi_update::do_updates()
DBUG_RETURN(0);
for (cur_table= update_tables; cur_table; cur_table= cur_table->next_local)
{
- bool can_compare_record, all_columns_exists;
+ bool can_compare_record;
uint offset= cur_table->shared;
table = cur_table->table;
@@ -2013,9 +2007,6 @@ int multi_update::do_updates()
HA_PARTIAL_COLUMN_READ) ||
bitmap_is_subset(table->write_set,
table->read_set));
- all_columns_exists= (can_compare_record &&
- bitmap_union_is_set_all(table->write_set,
- table->read_set));
for (;;)
{
@@ -2057,7 +2048,7 @@ int multi_update::do_updates()
TRG_ACTION_BEFORE, TRUE))
goto err2;
- if (!can_compare_record || compare_record(table, all_columns_exists))
+ if (!can_compare_record || compare_record(table))
{
int error;
if ((error= cur_table->view_check_option(thd, ignore)) !=
diff --git a/sql/table.cc b/sql/table.cc
index 736fb77d7a3..2129da90a29 100644
--- a/sql/table.cc
+++ b/sql/table.cc
@@ -1599,11 +1599,7 @@ static int open_binary_frm(THD *thd, TABLE_SHARE *share, uchar *head,
share->last_null_bit_pos= null_bit_pos;
share->null_bytes_for_compare= null_bits_are_used ? share->null_bytes : 0;
share->can_cmp_whole_record= (share->blob_fields == 0 &&
- share->varchar_fields == 0 &&
- (share->null_bytes_for_compare ==
- share->null_bytes ||
- !(handler_file->ha_table_flags() &
- HA_PARTIAL_COLUMN_READ)));
+ share->varchar_fields == 0);
share->db_low_byte_first= handler_file->low_byte_first();
share->column_bitmap_size= bitmap_buffer_size(share->fields);
diff --git a/storage/maria/maria_chk.c b/storage/maria/maria_chk.c
index cee736c4552..169bc4e853c 100644
--- a/storage/maria/maria_chk.c
+++ b/storage/maria/maria_chk.c
@@ -213,7 +213,7 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.",
- &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (char**) &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c',
"Check table for errors.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -265,7 +265,7 @@ static struct my_option my_long_options[] =
0, 0, 0, 0, 0, 0},
{"log-dir", OPT_LOG_DIR,
"Path for log files.",
- &opt_log_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (char**) &opt_log_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"max-record-length", OPT_MAX_RECORD_LENGTH,
"Skip rows bigger than this if maria_chk can't allocate memory to hold it",
&check_param.max_record_length,
@@ -307,7 +307,8 @@ static struct my_option my_long_options[] =
0, GET_ULL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"set-collation", OPT_SET_COLLATION,
"Change the collation used by the index",
- &set_collation_name, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (char**) &set_collation_name, 0, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
{"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -329,9 +330,7 @@ static struct my_option my_long_options[] =
&check_param.opt_sort_key,
&check_param.opt_sort_key,
0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
- {"tmpdir", 't',
- "Path for temporary files.",
- &opt_tmpdir,
+ {"tmpdir", 't', "Path for temporary files.", (char**) &opt_tmpdir,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"transaction-log", OPT_TRANSACTION_LOG,
"Log repair command to transaction log",
@@ -385,13 +384,13 @@ static struct my_option my_long_options[] =
HA_FT_MAXCHARLEN, 0, 1, 0},
{ "maria_ft_stopword_file", OPT_FT_STOPWORD_FILE,
"Use stopwords from this file instead of built-in list.",
- &ft_stopword_file, &ft_stopword_file, 0, GET_STR,
+ (char**) &ft_stopword_file, (char**) &ft_stopword_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "stats_method", OPT_STATS_METHOD,
"Specifies how index statistics collection code should treat NULLs. "
"Possible values of name are \"nulls_unequal\" (default behavior for 4.1/5.0), "
"\"nulls_equal\" (emulate 4.0 behavior), and \"nulls_ignored\".",
- &maria_stats_method_str, &maria_stats_method_str, 0,
+ (char**) &maria_stats_method_str, (char**) &maria_stats_method_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ "zerofill", 'z',
"Fill empty space in data and index files with zeroes",
diff --git a/storage/maria/maria_read_log.c b/storage/maria/maria_read_log.c
index a90cfdce004..56247535af8 100644
--- a/storage/maria/maria_read_log.c
+++ b/storage/maria/maria_read_log.c
@@ -164,7 +164,7 @@ static struct my_option my_long_options[] =
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.",
- &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (char**) &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c',
"if --display-only, check if record is fully readable (for debugging)",
(uchar **) &opt_check, (uchar **) &opt_check, 0,
@@ -200,7 +200,7 @@ static struct my_option my_long_options[] =
#else
"colon (:)"
#endif
- , &opt_tmpdir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ , (char**) &opt_tmpdir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"undo", 'u', "Apply UNDO records to tables. (disable with --disable-undo)",
(uchar **) &opt_apply_undo, (uchar **) &opt_apply_undo, 0,
GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
diff --git a/storage/myisam/myisamchk.c b/storage/myisam/myisamchk.c
index 86ddd03fc30..9ecbe76369f 100644
--- a/storage/myisam/myisamchk.c
+++ b/storage/myisam/myisamchk.c
@@ -168,7 +168,7 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.",
- &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (char**) &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"check", 'c',
"Check table for errors.",
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -251,7 +251,8 @@ static struct my_option my_long_options[] =
0, GET_ULL, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"set-collation", OPT_SET_COLLATION,
"Change the collation used by the index",
- &set_collation_name, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ (char**) &set_collation_name, 0, 0, GET_STR, REQUIRED_ARG,
+ 0, 0, 0, 0, 0, 0},
{"set-variable", 'O',
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -267,8 +268,7 @@ static struct my_option my_long_options[] =
&check_param.opt_sort_key,
0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"tmpdir", 't',
- "Path for temporary files.",
- &opt_tmpdir,
+ "Path for temporary files.", (char**) &opt_tmpdir,
0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"update-state", 'U',
"Mark tables as crashed if any errors were found.",
@@ -327,13 +327,13 @@ static struct my_option my_long_options[] =
HA_FT_MAXCHARLEN, 0, 1, 0},
{ "ft_stopword_file", OPT_FT_STOPWORD_FILE,
"Use stopwords from this file instead of built-in list.",
- &ft_stopword_file, &ft_stopword_file, 0, GET_STR,
+ (char**) &ft_stopword_file, (char**) &ft_stopword_file, 0, GET_STR,
REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"stats_method", OPT_STATS_METHOD,
"Specifies how index statistics collection code should treat NULLs. "
"Possible values of name are \"nulls_unequal\" (default behavior for 4.1/5.0), "
"\"nulls_equal\" (emulate 4.0 behavior), and \"nulls_ignored\".",
- &myisam_stats_method_str, &myisam_stats_method_str, 0,
+ (char**) &myisam_stats_method_str, (char**) &myisam_stats_method_str, 0,
GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
};
diff --git a/storage/myisam/myisampack.c b/storage/myisam/myisampack.c
index 255d8f39479..f2b28a008fc 100644
--- a/storage/myisam/myisampack.c
+++ b/storage/myisam/myisampack.c
@@ -259,8 +259,8 @@ static struct my_option my_long_options[] =
{"backup", 'b', "Make a backup of the table as table_name.OLD.",
&backup, &backup, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"character-sets-dir", OPT_CHARSETS_DIR_MP,
- "Directory where character sets are.", &charsets_dir,
- &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+ "Directory where character sets are.", (char**) &charsets_dir,
+ (char**) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"force", 'f',
diff --git a/storage/xtradb/dict/dict0load.c b/storage/xtradb/dict/dict0load.c
index ba0374595ce..528c3786254 100644
--- a/storage/xtradb/dict/dict0load.c
+++ b/storage/xtradb/dict/dict0load.c
@@ -40,6 +40,7 @@ Created 4/24/1996 Heikki Tuuri
#include "rem0cmp.h"
#include "srv0start.h"
#include "srv0srv.h"
+#include "trx0sys.h"
/****************************************************************//**
Compare the name of an index column.
diff --git a/storage/xtradb/row/row0sel.c b/storage/xtradb/row/row0sel.c
index 000cc3586fd..43e67ff6ded 100644
--- a/storage/xtradb/row/row0sel.c
+++ b/storage/xtradb/row/row0sel.c
@@ -2663,6 +2663,12 @@ row_sel_store_mysql_rec(
prebuilt->blob_heap = NULL;
}
+ /* init null bytes with default values as they might be
+ left uninitialized in some cases and these uninited bytes
+ might be copied into mysql record buffer that leads to
+ valgrind warnings */
+ memcpy(mysql_rec, prebuilt->default_rec, prebuilt->null_bitmap_len);
+
for (i = 0; i < prebuilt->n_template; i++) {
templ = prebuilt->mysql_template + i;
diff --git a/storage/xtradb/trx/trx0sys.c b/storage/xtradb/trx/trx0sys.c
index 7f50973d65e..47a21c3a318 100644
--- a/storage/xtradb/trx/trx0sys.c
+++ b/storage/xtradb/trx/trx0sys.c
@@ -1143,12 +1143,14 @@ trx_sysf_dummy_create(
ulint space,
mtr_t* mtr)
{
+#ifdef UNDEFINED
trx_sysf_t* sys_header;
ulint slot_no;
- buf_block_t* block;
- page_t* page;
ulint page_no;
ulint i;
+#endif
+ page_t* page;
+ buf_block_t* block;
ut_ad(mtr);
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
index c8d2926145d..7651ae5aee4 100644
--- a/support-files/compiler_warnings.supp
+++ b/support-files/compiler_warnings.supp
@@ -70,6 +70,7 @@ term\.c : .*
#
.*/extra/libevent/.* : .*unused parameter.*
.*/extra/libevent/select\.c : .*comparison between signed and unsigned.* : 270-280
+signal\.c : .*unused parameter.*
#
# Ignore warnings from system libraries