summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysql.cc4
-rw-r--r--client/mysqltest.c2
-rw-r--r--myisam/ft_nlq_search.c5
-rw-r--r--myisam/rt_test.c2
-rw-r--r--mysql-test/r/rpl_trunc_binlog.result2
-rw-r--r--mysql-test/t/rpl_trunc_binlog.test2
-rw-r--r--sql/sql_insert.cc4
-rw-r--r--strings/ctype-big5.c10
-rw-r--r--strings/ctype-gbk.c8
-rw-r--r--strings/ctype-mb.c2
-rw-r--r--strings/ctype-uca.c6
-rw-r--r--tests/client_test.c20
12 files changed, 34 insertions, 33 deletions
diff --git a/client/mysql.cc b/client/mysql.cc
index cf80a5594e4..e58790e5232 100644
--- a/client/mysql.cc
+++ b/client/mysql.cc
@@ -1239,7 +1239,6 @@ static void fix_history(String *final_command)
static int not_in_history(const char *line)
{
HIST_ENTRY *oldhist = history_get(history_length);
- int num;
if (oldhist == 0)
return 1;
@@ -1589,7 +1588,6 @@ static int com_server_help(String *buffer __attribute__((unused)),
const char *server_cmd= buffer->ptr();
char cmd_buf[100];
MYSQL_RES *result;
- MYSQL_FIELD *fields;
int error;
if (help_arg[0] != '\'')
@@ -1615,7 +1613,7 @@ static int com_server_help(String *buffer __attribute__((unused)),
{
unsigned int num_fields= mysql_num_fields(result);
my_ulonglong num_rows= mysql_num_rows(result);
- fields= mysql_fetch_fields(result);
+ mysql_fetch_fields(result);
if (num_fields==3 && num_rows==1)
{
if (!(cur= mysql_fetch_row(result)))
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 2cd395a02b8..303473ef558 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -109,7 +109,7 @@ MYSQL_MANAGER* manager=0;
static char **default_argv;
static const char *load_default_groups[]= { "mysqltest","client",0 };
-static char line_buffer[MAX_DELIMITER], *line_buffer_pos= line_buffer;;
+static char line_buffer[MAX_DELIMITER], *line_buffer_pos= line_buffer;
static FILE* file_stack[MAX_INCLUDE_DEPTH];
static FILE** cur_file;
diff --git a/myisam/ft_nlq_search.c b/myisam/ft_nlq_search.c
index 9b42d51ab55..c9caf4f39af 100644
--- a/myisam/ft_nlq_search.c
+++ b/myisam/ft_nlq_search.c
@@ -90,8 +90,9 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
/* Skip rows inserted by current inserted */
for (r=_mi_search(info, keyinfo, keybuff, keylen, SEARCH_FIND, key_root) ;
- (subkeys=ft_sintXkorr(info->lastkey+info->lastkey_length-extra)) > 0 &&
- !r && info->lastpos >= info->state->data_file_length ;
+ !r &&
+ (subkeys=ft_sintXkorr(info->lastkey+info->lastkey_length-extra)) > 0 &&
+ info->lastpos >= info->state->data_file_length ;
r= _mi_search_next(info, keyinfo, info->lastkey,
info->lastkey_length, SEARCH_BIGGER, key_root))
;
diff --git a/myisam/rt_test.c b/myisam/rt_test.c
index c1126c1939a..41cc56d4d78 100644
--- a/myisam/rt_test.c
+++ b/myisam/rt_test.c
@@ -39,7 +39,7 @@ int main(int argc __attribute__((unused)),char *argv[] __attribute__((unused)))
}
-int run_test(const char *filename)
+static int run_test(const char *filename)
{
MI_INFO *file;
MI_UNIQUEDEF uniquedef;
diff --git a/mysql-test/r/rpl_trunc_binlog.result b/mysql-test/r/rpl_trunc_binlog.result
index ad0fb9e5022..085a2937584 100644
--- a/mysql-test/r/rpl_trunc_binlog.result
+++ b/mysql-test/r/rpl_trunc_binlog.result
@@ -10,4 +10,4 @@ reset slave;
start slave;
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master
-# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 slave-relay-bin.000002 123 master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 79 326 None 0 No #
+# 127.0.0.1 root MASTER_PORT 1 master-bin.000002 4 slave-relay-bin.000002 123 master-bin.000001 Yes No 0 Rolling back unfinished transaction (no COMMIT or ROLLBACK) from relay log. A probable cause is that the master died while writing the transaction to its binary log. 0 79 # None 0 No #
diff --git a/mysql-test/t/rpl_trunc_binlog.test b/mysql-test/t/rpl_trunc_binlog.test
index 32052af9184..2ade41ee96d 100644
--- a/mysql-test/t/rpl_trunc_binlog.test
+++ b/mysql-test/t/rpl_trunc_binlog.test
@@ -21,5 +21,5 @@ start slave;
# can't sync_with_master so we must sleep
sleep 3;
--replace_result $MASTER_MYPORT MASTER_PORT
---replace_column 1 # 33 #
+--replace_column 1 # 23 # 33 #
show slave status;
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 1bf95b8bded..3aa0e9511a7 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -411,7 +411,7 @@ int mysql_insert(THD *thd,TABLE_LIST *table_list,
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
else
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
- (ulong) info.deleted+info.updated, (ulong) thd->cuted_fields);
+ (ulong) (info.deleted+info.updated), (ulong) thd->cuted_fields);
::send_ok(thd,info.copied+info.deleted+info.updated,(ulonglong)id,buff);
}
free_underlaid_joins(thd, &thd->lex->select_lex);
@@ -1582,7 +1582,7 @@ bool select_insert::send_eof()
(ulong) (info.records - info.copied), (ulong) thd->cuted_fields);
else
sprintf(buff, ER(ER_INSERT_INFO), (ulong) info.records,
- (ulong) info.deleted+info.updated, (ulong) thd->cuted_fields);
+ (ulong) (info.deleted+info.updated), (ulong) thd->cuted_fields);
::send_ok(thd,info.copied+info.deleted+info.updated,last_insert_id,buff);
DBUG_RETURN(0);
}
diff --git a/strings/ctype-big5.c b/strings/ctype-big5.c
index 2bde29ecc47..ccb8d07e786 100644
--- a/strings/ctype-big5.c
+++ b/strings/ctype-big5.c
@@ -223,7 +223,7 @@ static uint16 big5strokexfrm(uint16 i)
static int my_strnncoll_big5_internal(const uchar **a_res,
const uchar **b_res, uint length)
{
- const char *a= *a_res, *b= *b_res;
+ const uchar *a= *a_res, *b= *b_res;
while (length--)
{
@@ -236,10 +236,10 @@ static int my_strnncoll_big5_internal(const uchar **a_res,
b+= 2;
length--;
}
- else if (sort_order_big5[(uchar) *a++] !=
- sort_order_big5[(uchar) *b++])
- return ((int) sort_order_big5[(uchar) a[-1]] -
- (int) sort_order_big5[(uchar) b[-1]]);
+ else if (sort_order_big5[*a++] !=
+ sort_order_big5[*b++])
+ return ((int) sort_order_big5[a[-1]] -
+ (int) sort_order_big5[b[-1]]);
}
*a_res= a;
*b_res= b;
diff --git a/strings/ctype-gbk.c b/strings/ctype-gbk.c
index 1990060e67b..577f8a33275 100644
--- a/strings/ctype-gbk.c
+++ b/strings/ctype-gbk.c
@@ -2585,7 +2585,7 @@ static uint16 gbksortorder(uint16 i)
int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res,
uint length)
{
- const char *a= *a_res, *b= *b_res;
+ const uchar *a= *a_res, *b= *b_res;
uint a_char,b_char;
while (length--)
@@ -2601,9 +2601,9 @@ int my_strnncoll_gbk_internal(const uchar **a_res, const uchar **b_res,
b+= 2;
length--;
}
- else if (sort_order_gbk[(uchar) *a++] != sort_order_gbk[(uchar) *b++])
- return ((int) sort_order_gbk[(uchar) a[-1]] -
- (int) sort_order_gbk[(uchar) b[-1]]);
+ else if (sort_order_gbk[*a++] != sort_order_gbk[*b++])
+ return ((int) sort_order_gbk[a[-1]] -
+ (int) sort_order_gbk[b[-1]]);
}
*a_res= a;
*b_res= b;
diff --git a/strings/ctype-mb.c b/strings/ctype-mb.c
index ed772a68845..9b02cd3b3da 100644
--- a/strings/ctype-mb.c
+++ b/strings/ctype-mb.c
@@ -283,7 +283,7 @@ uint my_well_formed_len_mb(CHARSET_INFO *cs,
while (pos)
{
- if ((mblen= cs->cset->mb_wc(cs, &wc, b, e)) <0)
+ if ((mblen= cs->cset->mb_wc(cs, &wc, (uchar*) b, (uchar*) e)) <0)
break;
b+= mblen;
pos--;
diff --git a/strings/ctype-uca.c b/strings/ctype-uca.c
index ac805bf0a5a..72c28d92ca8 100644
--- a/strings/ctype-uca.c
+++ b/strings/ctype-uca.c
@@ -6750,8 +6750,8 @@ static int my_strnncollsp_uca(CHARSET_INFO *cs,
int s_res;
int t_res;
- slen= cs->cset->lengthsp(cs, s, slen);
- tlen= cs->cset->lengthsp(cs, t, tlen);
+ slen= cs->cset->lengthsp(cs, (char*) s, slen);
+ tlen= cs->cset->lengthsp(cs, (char*) t, tlen);
my_uca_scanner_init(&sscanner, cs, s, slen);
my_uca_scanner_init(&tscanner, cs, t, tlen);
@@ -6796,7 +6796,7 @@ static void my_hash_sort_uca(CHARSET_INFO *cs,
int s_res;
my_uca_scanner scanner;
- slen= cs->cset->lengthsp(cs, s, slen);
+ slen= cs->cset->lengthsp(cs, (char*) s, slen);
my_uca_scanner_init(&scanner, cs, s, slen);
while ((s_res= my_uca_scanner_next(&scanner)) >0)
diff --git a/tests/client_test.c b/tests/client_test.c
index c244274a2e7..871d09eb324 100644
--- a/tests/client_test.c
+++ b/tests/client_test.c
@@ -2400,7 +2400,8 @@ static void test_long_data_str()
MYSQL_STMT *stmt;
int rc, i;
char data[255];
- long length, length1;
+ long length;
+ ulong length1;
MYSQL_RES *result;
MYSQL_BIND bind[2];
my_bool is_null[2];
@@ -2495,8 +2496,8 @@ static void test_long_data_str1()
MYSQL_STMT *stmt;
int rc, i;
char data[255];
- long length, length1;
- ulong max_blob_length, blob_length;
+ long length;
+ ulong max_blob_length, blob_length, length1;
my_bool true_value;
MYSQL_RES *result;
MYSQL_BIND bind[2];
@@ -3084,7 +3085,7 @@ static void test_bind_result_ext()
char szData[20], bData[20];
ulong szLength, bLength;
MYSQL_BIND bind[8];
- long length[8];
+ ulong length[8];
my_bool is_null[8];
myheader("test_bind_result_ext");
@@ -5376,7 +5377,7 @@ static void test_store_result2()
MYSQL_STMT *stmt;
int rc;
int nData;
- long length;
+ ulong length;
MYSQL_BIND bind[1];
myheader("test_store_result2");
@@ -8094,7 +8095,7 @@ static void test_ts()
MYSQL_TIME ts;
MYSQL_RES *prep_res;
char strts[30];
- long length;
+ ulong length;
int rc, field_count;
char name;
@@ -8974,7 +8975,8 @@ static void test_multi()
char *query;
MYSQL_BIND bind[1];
int rc, i;
- long param= 1, length= 1;
+ long param= 1;
+ ulong length= 1;
myheader("test_multi");
bind[0].buffer_type= MYSQL_TYPE_LONG;
@@ -9100,7 +9102,7 @@ static void test_bind_nagative()
int rc;
MYSQL_BIND bind[1];
long my_val = 0L;
- long my_length = 0L;
+ ulong my_length = 0L;
long my_null = 0L;
myheader("test_insert_select");
@@ -9141,7 +9143,7 @@ static void test_derived()
int rc, i;
MYSQL_BIND bind[1];
long my_val = 0L;
- long my_length = 0L;
+ ulong my_length = 0L;
long my_null = 0L;
const char *query=
"select count(1) from (select f.id from t1 f where f.id=?) as x";