summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysqltest.c4
-rw-r--r--mysys/my_bitmap.c2
-rw-r--r--mysys/my_handler.c6
-rw-r--r--mysys/thr_lock.c7
-rw-r--r--plugin/fulltext/plugin_example.c6
-rw-r--r--sql/ha_ndbcluster.h2
-rw-r--r--sql/ha_ndbcluster_binlog.cc21
-rw-r--r--sql/handler.cc8
-rw-r--r--sql/mysql_priv.h2
-rw-r--r--sql/mysqld.cc7
-rw-r--r--sql/set_var.cc3
-rw-r--r--sql/set_var.h4
-rw-r--r--storage/archive/archive_test.c2
13 files changed, 45 insertions, 29 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 11e2cc0048e..b21e3883631 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -4095,8 +4095,8 @@ static void append_metadata(DYNAMIC_STRING *ds,
static void append_info(DYNAMIC_STRING *ds, ulonglong affected_rows,
const char *info)
{
- char buf[40];
- sprintf(buf,"affected rows: %llu\n", affected_rows);
+ char buf[40], buff2[21];
+ sprintf(buf,"affected rows: %s\n", llstr(affected_rows, buff2));
dynstr_append(ds, buf);
if (info)
{
diff --git a/mysys/my_bitmap.c b/mysys/my_bitmap.c
index 92b0cbb1371..2c85ce0bf04 100644
--- a/mysys/my_bitmap.c
+++ b/mysys/my_bitmap.c
@@ -101,7 +101,7 @@ static inline void bitmap_unlock(MY_BITMAP *map __attribute__((unused)))
my_bool bitmap_init(MY_BITMAP *map, my_bitmap_map *buf, uint n_bits,
- my_bool thread_safe)
+ my_bool thread_safe __attribute__((unused)))
{
DBUG_ENTER("bitmap_init");
if (!buf)
diff --git a/mysys/my_handler.c b/mysys/my_handler.c
index 56f2298a9f0..da619a49ffd 100644
--- a/mysys/my_handler.c
+++ b/mysys/my_handler.c
@@ -504,6 +504,7 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
switch ((enum ha_base_keytype) keyseg->type) {
case HA_KEYTYPE_TEXT:
case HA_KEYTYPE_BINARY:
+ case HA_KEYTYPE_BIT:
if (keyseg->flag & HA_SPACE_PACK)
{
int a_length;
@@ -515,7 +516,9 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
a= end;
break;
case HA_KEYTYPE_VARTEXT1:
+ case HA_KEYTYPE_VARTEXT2:
case HA_KEYTYPE_VARBINARY1:
+ case HA_KEYTYPE_VARBINARY2:
{
int a_length;
get_key_length(a_length, a);
@@ -545,6 +548,9 @@ HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, uchar *a)
case HA_KEYTYPE_DOUBLE:
a= end;
break;
+ case HA_KEYTYPE_END:
+ DBUG_ASSERT(0);
+ break;
}
}
return keyseg;
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index b4de57229bf..74d6f7431a8 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -1123,10 +1123,12 @@ void thr_downgrade_write_lock(THR_LOCK_DATA *in_data,
enum thr_lock_type new_lock_type)
{
THR_LOCK *lock=in_data->lock;
- THR_LOCK_DATA *data, *next;
enum thr_lock_type old_lock_type= in_data->type;
+#ifdef TO_BE_REMOVED
+ THR_LOCK_DATA *data, *next;
bool start_writers= FALSE;
bool start_readers= FALSE;
+#endif
DBUG_ENTER("thr_downgrade_write_only_lock");
pthread_mutex_lock(&lock->mutex);
@@ -1134,7 +1136,8 @@ void thr_downgrade_write_lock(THR_LOCK_DATA *in_data,
DBUG_ASSERT(old_lock_type > new_lock_type);
in_data->type= new_lock_type;
check_locks(lock,"after downgrading lock",0);
-#if 0
+
+#if TO_BE_REMOVED
switch (old_lock_type)
{
case TL_WRITE_ONLY:
diff --git a/plugin/fulltext/plugin_example.c b/plugin/fulltext/plugin_example.c
index eefb10bd26b..beb02128774 100644
--- a/plugin/fulltext/plugin_example.c
+++ b/plugin/fulltext/plugin_example.c
@@ -97,7 +97,8 @@ static int simple_parser_plugin_deinit(void)
1 failure (cannot happen)
*/
-static int simple_parser_init(MYSQL_FTPARSER_PARAM *param)
+static int simple_parser_init(MYSQL_FTPARSER_PARAM *param
+ __attribute__((unused)))
{
return(0);
}
@@ -117,7 +118,8 @@ static int simple_parser_init(MYSQL_FTPARSER_PARAM *param)
1 failure (cannot happen)
*/
-static int simple_parser_deinit(MYSQL_FTPARSER_PARAM *param)
+static int simple_parser_deinit(MYSQL_FTPARSER_PARAM *param
+ __attribute__((unused)))
{
return(0);
}
diff --git a/sql/ha_ndbcluster.h b/sql/ha_ndbcluster.h
index f2e2ff9ddc2..2e78a00ef94 100644
--- a/sql/ha_ndbcluster.h
+++ b/sql/ha_ndbcluster.h
@@ -851,7 +851,7 @@ private:
char m_dbname[FN_HEADLEN];
//char m_schemaname[FN_HEADLEN];
char m_tabname[FN_HEADLEN];
- ulong m_table_flags;
+ ulonglong m_table_flags;
THR_LOCK_DATA m_lock;
bool m_lock_tuple;
NDB_SHARE *m_share;
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index 516446d4c22..3afba85248e 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -3882,21 +3882,22 @@ ndbcluster_show_status_binlog(THD* thd, stat_print_fn *stat_print,
pthread_mutex_lock(&injector_mutex);
if (injector_ndb)
{
+ char buff1[22],buff2[22],buff3[22],buff4[22],buff5[22];
ndb_latest_epoch= injector_ndb->getLatestGCI();
pthread_mutex_unlock(&injector_mutex);
buflen=
snprintf(buf, sizeof(buf),
- "latest_epoch=%llu, "
- "latest_trans_epoch=%llu, "
- "latest_received_binlog_epoch=%llu, "
- "latest_handled_binlog_epoch=%llu, "
- "latest_applied_binlog_epoch=%llu",
- ndb_latest_epoch,
- g_latest_trans_gci,
- ndb_latest_received_binlog_epoch,
- ndb_latest_handled_binlog_epoch,
- ndb_latest_applied_binlog_epoch);
+ "latest_epoch=%s, "
+ "latest_trans_epoch=%s, "
+ "latest_received_binlog_epoch=%s, "
+ "latest_handled_binlog_epoch=%s, "
+ "latest_applied_binlog_epoch=%s",
+ llstr(ndb_latest_epoch, buff1),
+ llstr(g_latest_trans_gci, buff2),
+ llstr(ndb_latest_received_binlog_epoch, buff3),
+ llstr(ndb_latest_handled_binlog_epoch, buff4),
+ llstr(ndb_latest_applied_binlog_epoch, buff5));
if (stat_print(thd, ndbcluster_hton_name, ndbcluster_hton_name_length,
"binlog", strlen("binlog"),
buf, buflen))
diff --git a/sql/handler.cc b/sql/handler.cc
index a160315dbe9..3331e014001 100644
--- a/sql/handler.cc
+++ b/sql/handler.cc
@@ -3326,16 +3326,18 @@ namespace
if (likely(!(error= bitmap_init(&cols,
use_bitbuf ? bitbuf : NULL,
(n_fields + 7) & ~7UL,
- false))))
+ FALSE))))
{
bitmap_set_all(&cols);
if (likely(!(error= write_locked_table_maps(thd))))
{
error=
RowsEventT::binlog_row_logging_function(thd, table,
- table->file->has_transactions(),
+ table->file->
+ has_transactions(),
&cols, table->s->fields,
- before_record, after_record);
+ before_record,
+ after_record);
}
if (!use_bitbuf)
bitmap_free(&cols);
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index cb9ae481987..e3d28a23c15 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -1518,7 +1518,7 @@ extern bool opt_using_transactions, mysqld_embedded;
extern bool using_update_log, opt_large_files, server_id_supplied;
extern bool opt_update_log, opt_bin_log, opt_error_log;
extern my_bool opt_log, opt_slow_log;
-extern uint log_output_options;
+extern ulong log_output_options;
extern my_bool opt_log_queries_not_using_indexes;
extern bool opt_disable_networking, opt_skip_show_db;
extern my_bool opt_character_set_client_handshake;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 67c25e65b66..73ccecf45df 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -343,7 +343,7 @@ static my_bool opt_sync_bdb_logs;
bool opt_update_log, opt_bin_log;
my_bool opt_log, opt_slow_log;
-uint log_output_options;
+ulong log_output_options;
my_bool opt_log_queries_not_using_indexes= 0;
bool opt_error_log= IF_WIN(1,0);
bool opt_disable_networking=0, opt_skip_show_db=0;
@@ -3225,7 +3225,7 @@ server.");
{
sql_print_error("CSV engine is not present, falling back to the "
"log files");
- log_output_options= log_output_options & ~LOG_TABLE | LOG_FILE;
+ log_output_options= (log_output_options & ~LOG_TABLE) | LOG_FILE;
}
logger.set_handlers(LOG_FILE, opt_slow_log ? log_output_options:LOG_NONE,
@@ -6953,7 +6953,8 @@ static void mysql_init_variables(void)
/* Things reset to zero */
opt_skip_slave_start= opt_reckless_slave = 0;
mysql_home[0]= pidfile_name[0]= log_error_file[0]= 0;
- opt_log= opt_update_log= opt_slow_log= 0;
+ opt_log= opt_slow_log= 0;
+ opt_update_log= 0;
log_output_options= find_bit_type(log_output_str, &log_output_typelib);
opt_bin_log= 0;
opt_disable_networking= opt_skip_show_db=0;
diff --git a/sql/set_var.cc b/sql/set_var.cc
index e6b0625f097..b0ecc7eccef 100644
--- a/sql/set_var.cc
+++ b/sql/set_var.cc
@@ -2724,7 +2724,8 @@ void sys_var_log_output::set_default(THD *thd, enum_var_type type)
}
-byte *sys_var_log_output::value_ptr(THD *thd, enum_var_type type, LEX_STRING *base)
+byte *sys_var_log_output::value_ptr(THD *thd, enum_var_type type,
+ LEX_STRING *base)
{
char buff[256];
String tmp(buff, sizeof(buff), &my_charset_latin1);
diff --git a/sql/set_var.h b/sql/set_var.h
index 719a47906d7..d01ce833d14 100644
--- a/sql/set_var.h
+++ b/sql/set_var.h
@@ -785,10 +785,10 @@ public:
class sys_var_log_output :public sys_var
{
- uint *value;
+ ulong *value;
TYPELIB *enum_names;
public:
- sys_var_log_output(const char *name_arg, uint *value_arg,
+ sys_var_log_output(const char *name_arg, ulong *value_arg,
TYPELIB *typelib, sys_after_update_func func)
:sys_var(name_arg,func), value(value_arg), enum_names(typelib)
{}
diff --git a/storage/archive/archive_test.c b/storage/archive/archive_test.c
index 043d743f1c9..fd4b8385069 100644
--- a/storage/archive/archive_test.c
+++ b/storage/archive/archive_test.c
@@ -4,7 +4,7 @@
#define TEST_STRING "This is a test"
#define BUFFER_LEN 1024
-int main(int argc, char *argv[])
+int main(int argc __attribute__((unused)), char *argv[])
{
int ret;
azio_stream foo, foo1;