summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client/mysqltest.c28
-rw-r--r--mysql-test/lib/mtr_report.pl76
-rw-r--r--mysql-test/mysql-test-run-shell.sh9
-rw-r--r--mysql-test/r/func_misc.result6
-rw-r--r--mysql-test/t/disabled.def3
-rw-r--r--mysql-test/t/func_misc.test4
-rw-r--r--mysys/array.c18
-rw-r--r--mysys/hash.c8
-rw-r--r--mysys/my_compress.c4
-rw-r--r--mysys/my_conio.c6
-rw-r--r--mysys/my_pread.c1
-rw-r--r--mysys/my_quick.c2
-rw-r--r--sql/ha_ndbcluster_binlog.cc20
-rw-r--r--sql/ha_partition.cc2
-rw-r--r--sql/log.cc2
-rw-r--r--sql/slave.cc4
-rw-r--r--sql/sql_class.cc2
-rw-r--r--sql/sql_map.cc4
-rw-r--r--sql/sql_plugin.cc6
-rw-r--r--sql/stacktrace.c8
-rw-r--r--storage/archive/azio.c4
-rw-r--r--storage/blackhole/ha_blackhole.cc4
-rw-r--r--storage/example/ha_example.cc2
-rw-r--r--strings/ctype-ucs2.c6
-rw-r--r--support-files/compiler_warnings.supp9
25 files changed, 168 insertions, 70 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 4442cd538d3..50080636054 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -1222,7 +1222,8 @@ VAR* var_get(const char *var_name, const char **var_name_end, my_bool raw,
if (length >= MAX_VAR_NAME_LENGTH)
die("Too long variable name: %s", save_var_name);
- if (!(v = (VAR*) hash_search(&var_hash, save_var_name, length)))
+ if (!(v = (VAR*) hash_search(&var_hash, (const uchar*) save_var_name,
+ length)))
{
char buff[MAX_VAR_NAME_LENGTH+1];
strmake(buff, save_var_name, length);
@@ -1253,7 +1254,7 @@ err:
VAR *var_obtain(const char *name, int len)
{
VAR* v;
- if ((v = (VAR*)hash_search(&var_hash, name, len)))
+ if ((v = (VAR*)hash_search(&var_hash, (const uchar *) name, len)))
return v;
v = var_init(0, name, len, "", 0);
my_hash_insert(&var_hash, (uchar*)v);
@@ -4667,7 +4668,7 @@ void free_win_path_patterns()
for (i=0 ; i < patterns.elements ; i++)
{
const char** pattern= dynamic_element(&patterns, i, const char**);
- my_free(*pattern, MYF(0));
+ my_free((char*) *pattern, MYF(0));
}
delete_dynamic(&patterns);
}
@@ -7488,7 +7489,8 @@ REPLACE *init_replace(char * *from, char * *to,uint count,
for (i=1 ; i <= found_sets ; i++)
{
pos=from[found_set[i-1].table_offset];
- rep_str[i].found= !bcmp(pos,"\\^",3) ? 2 : 1;
+ rep_str[i].found= !bcmp((const uchar*) pos,
+ (const uchar*) "\\^", 3) ? 2 : 1;
rep_str[i].replace_string=to_array[found_set[i-1].table_offset];
rep_str[i].to_offset=found_set[i-1].found_offset-start_at_word(pos);
rep_str[i].from_offset=found_set[i-1].found_offset-replace_len(pos)+
@@ -7686,15 +7688,17 @@ int find_found(FOUND_SET *found_set,uint table_offset, int found_offset)
uint start_at_word(char * pos)
{
- return (((!bcmp(pos,"\\b",2) && pos[2]) || !bcmp(pos,"\\^",2)) ? 1 : 0);
+ return (((!bcmp((const uchar*) pos, (const uchar*) "\\b",2) && pos[2]) ||
+ !bcmp((const uchar*) pos, (const uchar*) "\\^", 2)) ? 1 : 0);
}
uint end_of_word(char * pos)
{
char * end=strend(pos);
- return ((end > pos+2 && !bcmp(end-2,"\\b",2)) ||
- (end >= pos+2 && !bcmp(end-2,"\\$",2))) ?
- 1 : 0;
+ return ((end > pos+2 && !bcmp((const uchar*) end-2,
+ (const uchar*) "\\b", 2)) ||
+ (end >= pos+2 && !bcmp((const uchar*) end-2,
+ (const uchar*) "\\$",2))) ? 1 : 0;
}
/****************************************************************************
@@ -7721,7 +7725,7 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
if (!(pa->str= (uchar*) my_malloc((uint) (PS_MALLOC-MALLOC_OVERHEAD),
MYF(MY_WME))))
{
- my_free(pa->typelib.type_names,MYF(0));
+ my_free((char*) pa->typelib.type_names,MYF(0));
DBUG_RETURN (-1);
}
pa->max_count=(PC_MALLOC-MALLOC_OVERHEAD)/(sizeof(uchar*)+
@@ -7767,9 +7771,9 @@ int insert_pointer_name(reg1 POINTER_ARRAY *pa,char * name)
old_count*sizeof(*pa->flag));
}
pa->flag[pa->typelib.count]=0; /* Reset flag */
- pa->typelib.type_names[pa->typelib.count++]= pa->str+pa->length;
+ pa->typelib.type_names[pa->typelib.count++]= (char*) pa->str+pa->length;
pa->typelib.type_names[pa->typelib.count]= NullS; /* Put end-mark */
- VOID(strmov(pa->str+pa->length,name));
+ VOID(strmov((char*) pa->str+pa->length,name));
pa->length+=length;
DBUG_RETURN(0);
} /* insert_pointer_name */
@@ -7782,7 +7786,7 @@ void free_pointer_array(POINTER_ARRAY *pa)
if (pa->typelib.count)
{
pa->typelib.count=0;
- my_free(pa->typelib.type_names,MYF(0));
+ my_free((char*) pa->typelib.type_names,MYF(0));
pa->typelib.type_names=0;
my_free(pa->str,MYF(0));
}
diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl
index ce206a35727..8a74b1f42f0 100644
--- a/mysql-test/lib/mtr_report.pl
+++ b/mysql-test/lib/mtr_report.pl
@@ -265,8 +265,13 @@ sub mtr_report_stats ($) {
else
{
# We report different types of problems in order
- foreach my $pattern ( "^Warning:", "^Error:", "^==.* at 0x",
- "InnoDB: Warning", "missing DBUG_RETURN",
+ foreach my $pattern ( "^Warning:",
+ "\\[Warning\\]",
+ "\\[ERROR\\]",
+ "^Error:", "^==.* at 0x",
+ "InnoDB: Warning",
+ "^safe_mutex:",
+ "missing DBUG_RETURN",
"mysqld: Warning",
"allocated at line",
"Attempting backtrace", "Assertion .* failed" )
@@ -281,10 +286,69 @@ sub mtr_report_stats ($) {
while ( <ERR> )
{
# Skip some non fatal warnings from the log files
- if ( /Warning:\s+Table:.* on (delete|rename)/ or
- /Warning:\s+Setting lower_case_table_names=2/ or
- /Warning:\s+One can only use the --user.*root/ or
- /InnoDB: Warning: we did not need to do crash recovery/)
+ if (
+ /\"SELECT UNIX_TIMESTAMP\(\)\" failed on master/ or
+ /Aborted connection/ or
+ /Client requested master to start replication from impossible position/ or
+ /Could not find first log file name in binary log/ or
+ /Enabling keys got errno/ or
+ /Error reading master configuration/ or
+ /Error reading packet/ or
+ /Event Scheduler/ or
+ /Failed to open log/ or
+ /Failed to open the existing master info file/ or
+ /Forcing shutdown of [0-9]* plugins/ or
+ /Got error [0-9]* when reading table/ or
+ /Incorrect definition of table/ or
+ /Incorrect information in file/ or
+ /InnoDB: Warning: we did not need to do crash recovery/ or
+ /Invalid \(old\?\) table or database name/ or
+ /Lock wait timeout exceeded/ or
+ /Log entry on master is longer than max_allowed_packet/ or
+ /unknown option '--loose-/ or
+ /unknown variable 'loose-/ or
+ /You have forced lower_case_table_names to 0 through a command-line option/ or
+ /Setting lower_case_table_names=2/ or
+ /NDB Binlog:/ or
+ /NDB: failed to setup table/ or
+ /NDB: only row based binary logging/ or
+ /Neither --relay-log nor --relay-log-index were used/ or
+ /Query partially completed/ or
+ /Slave I.O thread aborted while waiting for relay log/ or
+ /Slave SQL thread is stopped because UNTIL condition/ or
+ /Slave SQL thread retried transaction/ or
+ /Slave \(additional info\)/ or
+ /Slave: .*Duplicate column name/ or
+ /Slave: .*master may suffer from/ or
+ /Slave: According to the master's version/ or
+ /Slave: Column [0-9]* type mismatch/ or
+ /Slave: Error .* doesn't exist/ or
+ /Slave: Error .*Deadlock found/ or
+ /Slave: Error .*Unknown table/ or
+ /Slave: Error in Write_rows event: / or
+ /Slave: Field .* of table .* has no default value/ or
+ /Slave: Query caused different errors on master and slave/ or
+ /Slave: Table .* doesn't exist/ or
+ /Slave: Table width mismatch/ or
+ /Slave: The incident LOST_EVENTS occured on the master/ or
+ /Slave: Unknown error.* 1105/ or
+ /Slave: Can't drop database.* database doesn't exist/ or
+ /Sort aborted/ or
+ /Time-out in NDB/ or
+ /Warning:\s+One can only use the --user.*root/ or
+ /Warning:\s+Setting lower_case_table_names=2/ or
+ /Warning:\s+Table:.* on (delete|rename)/ or
+ /You have an error in your SQL syntax/ or
+ /deprecated/ or
+ /description of time zone/ or
+ /equal MySQL server ids/ or
+ /error .*connecting to master/ or
+ /error reading log entry/ or
+ /lower_case_table_names is set/ or
+ /skip-name-resolve mode/ or
+ /slave SQL thread aborted/ or
+ /Slave: .*Duplicate entry/
+ )
{
next; # Skip these lines
}
diff --git a/mysql-test/mysql-test-run-shell.sh b/mysql-test/mysql-test-run-shell.sh
index 953478fa9f4..54323c878a9 100644
--- a/mysql-test/mysql-test-run-shell.sh
+++ b/mysql-test/mysql-test-run-shell.sh
@@ -629,6 +629,11 @@ else
TEST_MODE=`echo $TEST_MODE | sed 's/^ *//'`
fi
+#
+# Skip tests that doesn't work with shell version
+#
+SKIP_TEST="$SKIP_TEST bootstrap"
+
#++
# mysqld Environment Parameters
#--
@@ -900,8 +905,8 @@ MYSQL_DUMP="$MYSQL_DUMP --no-defaults --debug-info -uroot --socket=$MASTER_MYSOC
MYSQL_SLAP="$MYSQL_SLAP -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSLAP_OPT"
MYSQL_DUMP_SLAVE="$MYSQL_DUMP_DIR --no-defaults -uroot --socket=$SLAVE_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_SHOW="$MYSQL_SHOW --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLSHOW_OPT"
-MYSQL_BINLOG="$MYSQL_BINLOG --debug-info --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
-MYSQL_IMPORT="$MYSQL_IMPORT --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
+MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --debug-info --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
+MYSQL_IMPORT="$MYSQL_IMPORT --no-defaults --debug-info -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
MYSQL="$MYSQL --no-defaults --debug-info --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
export MYSQL MYSQL_CHECK MYSQL_DUMP MYSQL_DUMP_SLAVE MYSQL_SHOW MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES MYSQL_IMPORT
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 7526134c476..86b237d9afe 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -22,8 +22,10 @@ hex(inet_aton('127.1.1'))
select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_utf8'')));
length(uuid()) charset(uuid()) length(unhex(replace(uuid(),_utf8'-',_utf8'')))
36 utf8 16
-select cast(uuid_short()-uuid_short() as signed);
-cast(uuid_short()-uuid_short() as signed)
+set @a= uuid_short();
+set @b= uuid_short();
+select cast(@a - @b as signed);
+cast(@a - @b as signed)
-1
select length(format('nan', 2)) > 0;
length(format('nan', 2)) > 0
diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def
index e2a0b30c592..8f5403844d3 100644
--- a/mysql-test/t/disabled.def
+++ b/mysql-test/t/disabled.def
@@ -15,6 +15,9 @@ im_options : Bug#20294 2006-07-24 stewart Instance manager test
im_daemon_life_cycle : Bug#20294 2007-05-14 alik Instance manager tests fail randomly
im_cmd_line : Bug#20294 2007-05-14 alik Instance manager tests fail randomly
im_life_cycle : BUG#27851 Instance manager dies on ASSERT in ~Thread_registry() or from not being able to close a mysqld instance.
+im_instance_conf : BUG#28743 Instance manager generates warnings in test suite
+im_utils : BUG#28743 Instance manager generates warnings in test suite
+
concurrent_innodb : BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences
ndb_autodiscover : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
ndb_autodiscover2 : BUG#18952 2006-02-16 jmiller Needs to be fixed w.r.t binlog
diff --git a/mysql-test/t/func_misc.test b/mysql-test/t/func_misc.test
index 7437b0008e4..4d28ebf9404 100644
--- a/mysql-test/t/func_misc.test
+++ b/mysql-test/t/func_misc.test
@@ -16,7 +16,9 @@ select length(uuid()), charset(uuid()), length(unhex(replace(uuid(),_utf8'-',_ut
# As we can assume we are the only user for the mysqld server, the difference
# between two calls should be -1
-select cast(uuid_short()-uuid_short() as signed);
+set @a= uuid_short();
+set @b= uuid_short();
+select cast(@a - @b as signed);
#
# Test for core dump with nan
diff --git a/mysys/array.c b/mysys/array.c
index d9c17d817cc..8a539f18a20 100644
--- a/mysys/array.c
+++ b/mysys/array.c
@@ -63,7 +63,7 @@ my_bool init_dynamic_array2(DYNAMIC_ARRAY *array, uint element_size,
array->size_of_element=element_size;
if ((array->buffer= init_buffer))
DBUG_RETURN(FALSE);
- if (!(array->buffer=(char*) my_malloc_ci(element_size*init_alloc,MYF(MY_WME))))
+ if (!(array->buffer=(uchar*) my_malloc_ci(element_size*init_alloc,MYF(MY_WME))))
{
array->max_element=0;
DBUG_RETURN(TRUE);
@@ -132,7 +132,7 @@ uchar *alloc_dynamic(DYNAMIC_ARRAY *array)
if (array->elements == array->max_element)
{
char *new_ptr;
- if (array->buffer == (char *)(array + 1))
+ if (array->buffer == (uchar *)(array + 1))
{
/*
In this senerio, the buffer is statically preallocated,
@@ -152,7 +152,7 @@ uchar *alloc_dynamic(DYNAMIC_ARRAY *array)
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR))))
return 0;
- array->buffer=new_ptr;
+ array->buffer= (uchar*) new_ptr;
array->max_element+=array->alloc_increment;
}
return array->buffer+(array->elements++ * array->size_of_element);
@@ -206,7 +206,7 @@ my_bool set_dynamic(DYNAMIC_ARRAY *array, uchar* element, uint idx)
char *new_ptr;
size=(idx+array->alloc_increment)/array->alloc_increment;
size*= array->alloc_increment;
- if (array->buffer == (char *)(array + 1))
+ if (array->buffer == (uchar *)(array + 1))
{
/*
In this senerio, the buffer is statically preallocated,
@@ -224,7 +224,7 @@ my_bool set_dynamic(DYNAMIC_ARRAY *array, uchar* element, uint idx)
array->size_of_element,
MYF(MY_WME | MY_ALLOW_ZERO_PTR))))
return TRUE;
- array->buffer=new_ptr;
+ array->buffer= (uchar*) new_ptr;
array->max_element=size;
}
bzero((uchar*) (array->buffer+array->elements*array->size_of_element),
@@ -273,7 +273,7 @@ void delete_dynamic(DYNAMIC_ARRAY *array)
/*
Just mark as empty if we are using a static buffer
*/
- if (array->buffer == (char *)(array + 1))
+ if (array->buffer == (uchar *)(array + 1))
array->elements= 0;
else
if (array->buffer)
@@ -295,7 +295,7 @@ void delete_dynamic(DYNAMIC_ARRAY *array)
void delete_dynamic_element(DYNAMIC_ARRAY *array, uint idx)
{
- char *ptr=array->buffer+array->size_of_element*idx;
+ char *ptr= (char*) array->buffer+array->size_of_element*idx;
array->elements--;
memmove(ptr,ptr+array->size_of_element,
(array->elements-idx)*array->size_of_element);
@@ -318,12 +318,12 @@ void freeze_size(DYNAMIC_ARRAY *array)
/*
Do nothing if we are using a static buffer
*/
- if (array->buffer == (char *)(array + 1))
+ if (array->buffer == (uchar *)(array + 1))
return;
if (array->buffer && array->max_element != elements)
{
- array->buffer=(char*) my_realloc(array->buffer,
+ array->buffer=(uchar*) my_realloc(array->buffer,
elements*array->size_of_element,
MYF(MY_WME));
array->max_element=elements;
diff --git a/mysys/hash.c b/mysys/hash.c
index 698c2299f4d..d8c914d13dd 100644
--- a/mysys/hash.c
+++ b/mysys/hash.c
@@ -308,7 +308,8 @@ static int hashcmp(const HASH *hash, HASH_LINK *pos, const uchar *key,
my_bool my_hash_insert(HASH *info,const uchar *record)
{
int flag;
- uint halfbuff,hash_nr,first_index,idx;
+ size_t idx;
+ uint halfbuff,hash_nr,first_index;
uchar *ptr_to_rec,*ptr_to_rec2;
HASH_LINK *data,*empty,*gpos,*gpos2,*pos;
@@ -535,7 +536,8 @@ exit:
my_bool hash_update(HASH *hash, uchar *record, uchar *old_key,
size_t old_key_length)
{
- uint idx,new_index,new_pos_index,blength,records,empty;
+ uint new_index,new_pos_index,blength,records,empty;
+ size_t idx;
HASH_LINK org_link,*data,*previous,*pos;
DBUG_ENTER("hash_update");
@@ -546,7 +548,7 @@ my_bool hash_update(HASH *hash, uchar *record, uchar *old_key,
if ((found= hash_first(hash, new_key, idx, &state)))
do
{
- if (found != record)
+ if (found != (char*) record)
DBUG_RETURN(1); /* Duplicate entry */
}
while ((found= hash_next(hash, new_key, idx, &state)));
diff --git a/mysys/my_compress.c b/mysys/my_compress.c
index 3966be8b6bb..d495a1c1c6d 100644
--- a/mysys/my_compress.c
+++ b/mysys/my_compress.c
@@ -68,7 +68,7 @@ uchar *my_compress_alloc(const uchar *packet, size_t *len, size_t *complen)
return 0; /* Not enough memory */
tmp_complen= *complen;
- res= compress((Bytef*) compbuf, &tmp_complen, (Bytef*) packet, *len);
+ res= compress((Bytef*) compbuf, &tmp_complen, (Bytef*) packet, (uLong) *len);
*complen= tmp_complen;
if (res != Z_OK)
@@ -120,7 +120,7 @@ my_bool my_uncompress(uchar *packet, size_t len, size_t *complen)
tmp_complen= *complen;
error= uncompress((Bytef*) compbuf, &tmp_complen, (Bytef*) packet,
- len);
+ (uLong) len);
*complen= tmp_complen;
if (error != Z_OK)
{ /* Probably wrong packet */
diff --git a/mysys/my_conio.c b/mysys/my_conio.c
index d03f63a11a9..1ea1f7a820a 100644
--- a/mysys/my_conio.c
+++ b/mysys/my_conio.c
@@ -125,6 +125,7 @@ char* my_cgets(char *buffer, size_t clen, size_t* plen)
{
ULONG state;
char *result;
+ DWORD plen_res;
CONSOLE_SCREEN_BUFFER_INFO csbi;
pthread_auto_mutex_decl(my_conio_cs);
@@ -171,7 +172,8 @@ char* my_cgets(char *buffer, size_t clen, size_t* plen)
do
{
clen= min(clen, (size_t) csbi.dwSize.X*csbi.dwSize.Y);
- if (!ReadConsole((HANDLE)my_coninpfh, (LPVOID)buffer, clen - 1, plen, NULL))
+ if (!ReadConsole((HANDLE)my_coninpfh, (LPVOID)buffer, clen - 1, &plen_res,
+ NULL))
{
result= NULL;
clen>>= 1;
@@ -183,7 +185,7 @@ char* my_cgets(char *buffer, size_t clen, size_t* plen)
}
}
while (GetLastError() == ERROR_NOT_ENOUGH_MEMORY);
-
+ *plen= plen_res;
if (result != NULL)
{
diff --git a/mysys/my_pread.c b/mysys/my_pread.c
index 070494e4f1d..6e98132db73 100644
--- a/mysys/my_pread.c
+++ b/mysys/my_pread.c
@@ -182,6 +182,7 @@ size_t my_pwrite(int Filedes, const uchar *Buffer, size_t Count,
else
break; /* Return bytes written */
}
+ DBUG_EXECUTE_IF("check", my_seek(Filedes, -1, SEEK_SET, MYF(0)););
if (MyFlags & (MY_NABP | MY_FNABP))
DBUG_RETURN(0); /* Want only errors */
DBUG_RETURN(writenbytes+written); /* purecov: inspected */
diff --git a/mysys/my_quick.c b/mysys/my_quick.c
index af8ef05bd5f..c19fe08572d 100644
--- a/mysys/my_quick.c
+++ b/mysys/my_quick.c
@@ -50,7 +50,7 @@ size_t my_quick_write(File Filedes,const uchar *Buffer,size_t Count)
#ifndef DBUG_OFF
writtenbytes =
#endif
- write(Filedes,Buffer,Count)) != Count)
+ (size_t) write(Filedes,Buffer,Count)) != Count)
{
#ifndef DBUG_OFF
if ((writtenbytes == 0 || writtenbytes == (size_t) -1) && errno == EINTR)
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index 8b2250a9a9b..391051d8775 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -1893,16 +1893,16 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
pthread_mutex_lock(&LOCK_open);
if (ndbcluster_check_if_local_table(schema->db, schema->name))
{
- DBUG_PRINT("info", ("NDB binlog: Skipping locally defined table '%s.%s'",
+ DBUG_PRINT("info", ("NDB Binlog: Skipping locally defined table '%s.%s'",
schema->db, schema->name));
- sql_print_error("NDB binlog: Skipping locally defined table '%s.%s' from "
+ sql_print_error("NDB Binlog: Skipping locally defined table '%s.%s' from "
"binlog schema event '%s' from node %d. ",
schema->db, schema->name, schema->query,
schema->node_id);
}
else if (ndb_create_table_from_engine(thd, schema->db, schema->name))
{
- sql_print_error("NDB binlog: Could not discover table '%s.%s' from "
+ sql_print_error("NDB Binlog: Could not discover table '%s.%s' from "
"binlog schema event '%s' from node %d. "
"my_errno: %d",
schema->db, schema->name, schema->query,
@@ -1910,7 +1910,7 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
List_iterator_fast<MYSQL_ERROR> it(thd->warn_list);
MYSQL_ERROR *err;
while ((err= it++))
- sql_print_warning("NDB binlog: (%d)%s", err->code, err->msg);
+ sql_print_warning("NDB Binlog: (%d)%s", err->code, err->msg);
}
pthread_mutex_unlock(&LOCK_open);
log_query= 1;
@@ -1931,7 +1931,7 @@ ndb_binlog_thread_handle_schema_event(THD *thd, Ndb *ndb,
else
{
/* Database contained local tables, leave it */
- sql_print_error("NDB binlog: Skipping drop database '%s' since it contained local tables "
+ sql_print_error("NDB Binlog: Skipping drop database '%s' since it contained local tables "
"binlog schema event '%s' from node %d. ",
schema->db, schema->query,
schema->node_id);
@@ -2179,23 +2179,23 @@ ndb_binlog_thread_handle_schema_event_post_epoch(THD *thd,
pthread_mutex_lock(&LOCK_open);
if (ndbcluster_check_if_local_table(schema->db, schema->name))
{
- DBUG_PRINT("info", ("NDB binlog: Skipping locally defined table '%s.%s'",
+ DBUG_PRINT("info", ("NDB Binlog: Skipping locally defined table '%s.%s'",
schema->db, schema->name));
- sql_print_error("NDB binlog: Skipping locally defined table '%s.%s' from "
+ sql_print_error("NDB Binlog: Skipping locally defined table '%s.%s' from "
"binlog schema event '%s' from node %d. ",
schema->db, schema->name, schema->query,
schema->node_id);
}
else if (ndb_create_table_from_engine(thd, schema->db, schema->name))
{
- sql_print_error("NDB binlog: Could not discover table '%s.%s' from "
+ sql_print_error("NDB Binlog: Could not discover table '%s.%s' from "
"binlog schema event '%s' from node %d. my_errno: %d",
schema->db, schema->name, schema->query,
schema->node_id, my_errno);
List_iterator_fast<MYSQL_ERROR> it(thd->warn_list);
MYSQL_ERROR *err;
while ((err= it++))
- sql_print_warning("NDB binlog: (%d)%s", err->code, err->msg);
+ sql_print_warning("NDB Binlog: (%d)%s", err->code, err->msg);
}
pthread_mutex_unlock(&LOCK_open);
}
@@ -4113,7 +4113,7 @@ restart:
injector::transaction::binlog_pos start= trans.start_pos();
if (int r= trans.commit())
{
- sql_print_error("NDB binlog: "
+ sql_print_error("NDB Binlog: "
"Error during COMMIT of GCI. Error: %d",
r);
/* TODO: Further handling? */
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 36711cc100b..e9f4bc4c745 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1965,7 +1965,7 @@ bool ha_partition::create_handler_file(const char *name)
MYF(MY_WME))) >= 0)
{
result= my_write(file, (uchar *) file_buffer, tot_len_byte,
- MYF(MY_WME | MY_NABP));
+ MYF(MY_WME | MY_NABP)) != 0;
VOID(my_close(file, MYF(0)));
}
else
diff --git a/sql/log.cc b/sql/log.cc
index 11afdc8d20d..6ef1c1ea912 100644
--- a/sql/log.cc
+++ b/sql/log.cc
@@ -4855,7 +4855,7 @@ void TC_LOG_MMAP::close()
case 3:
my_free((uchar*)pages, MYF(0));
case 2:
- my_munmap((uchar*)data, (size_t)file_length);
+ my_munmap((char*)data, (size_t)file_length);
case 1:
my_close(fd, MYF(0));
}
diff --git a/sql/slave.cc b/sql/slave.cc
index 7504585696d..aa42bad3265 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -601,9 +601,9 @@ void slave_print_msg(enum loglevel level, RELAY_LOG_INFO const *rli,
my_vsnprintf(pbuff, pbuffsize, msg, args);
/* If the msg string ends with '.', do not add a ',' it would be ugly */
if (pbuff[0] && (*(strend(pbuff)-1) == '.'))
- (*report_function)("Slave: %s Error_code: %d", pbuff, err_code);
+ (*report_function)("Slave: %s Error_code: %d", pbuff, err_code);
else
- (*report_function)("Slave: %s, Error_code: %d", pbuff, err_code);
+ (*report_function)("Slave: %s. Error_code: %d", pbuff, err_code);
DBUG_VOID_RETURN;
}
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index ffa058164dd..ef1690516f0 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -927,7 +927,7 @@ void THD::add_changed_table(TABLE *table)
DBUG_ASSERT((options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) &&
table->file->has_transactions());
add_changed_table(table->s->table_cache_key.str,
- table->s->table_cache_key.length);
+ (long) table->s->table_cache_key.length);
DBUG_VOID_RETURN;
}
diff --git a/sql/sql_map.cc b/sql/sql_map.cc
index 0a494377fc6..7b707f813fc 100644
--- a/sql/sql_map.cc
+++ b/sql/sql_map.cc
@@ -48,7 +48,7 @@ mapped_files::mapped_files(const char * filename,uchar *magic,uint magic_length)
if (map && memcmp(map,magic,magic_length))
{
my_error(ER_WRONG_MAGIC, MYF(0), name);
- VOID(my_munmap(map,size));
+ VOID(my_munmap((char*) map,size));
map=0;
}
if (!map)
@@ -66,7 +66,7 @@ mapped_files::~mapped_files()
#ifdef HAVE_MMAP
if (file >= 0)
{
- VOID(my_munmap(map,size));
+ VOID(my_munmap((char*) map,size));
VOID(my_close(file,MYF(0)));
file= -1; map=0;
}
diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc
index f0dd586977b..37301751d03 100644
--- a/sql/sql_plugin.cc
+++ b/sql/sql_plugin.cc
@@ -1056,7 +1056,7 @@ static uchar *get_hash_key(const uchar *buff, size_t *length,
}
-static uchar *get_bookmark_hash_key(const uchar *buff, uint *length,
+static uchar *get_bookmark_hash_key(const uchar *buff, size_t *length,
my_bool not_used __attribute__((unused)))
{
struct st_bookmark *var= (st_bookmark *)buff;
@@ -2879,9 +2879,9 @@ static int construct_options(MEM_ROOT *mem_root, struct st_plugin_int *tmp,
if (!opt->update)
{
opt->update= update_func_str;
- if (!(opt->flags & PLUGIN_VAR_MEMALLOC))
+ if (!(opt->flags & PLUGIN_VAR_MEMALLOC | PLUGIN_VAR_READONLY))
{
- opt->flags |= PLUGIN_VAR_READONLY;
+ opt->flags|= PLUGIN_VAR_READONLY;
sql_print_warning("Server variable %s of plugin %s was forced "
"to be read-only: string variable without "
"update_func and PLUGIN_VAR_MEMALLOC flag",
diff --git a/sql/stacktrace.c b/sql/stacktrace.c
index 36e64087c5e..40507907120 100644
--- a/sql/stacktrace.c
+++ b/sql/stacktrace.c
@@ -206,9 +206,11 @@ terribly wrong...\n");
fprintf(stderr, "Stack trace seems successful - bottom reached\n");
end:
- fprintf(stderr, "Please read http://dev.mysql.com/doc/mysql/en/using-stack-trace.html and follow instructions on how to resolve the stack trace. Resolved\n\
-stack trace is much more helpful in diagnosing the problem, so please do \n\
-resolve it\n");
+ fprintf(stderr,
+ "Please read http://dev.mysql.com/doc/refman/5.1/en/resolve-stack-dump.html\n"
+ "and follow instructions on how to resolve the stack trace.\n"
+ "Resolved stack trace is much more helpful in diagnosing the\n"
+ "problem, so please do resolve it\n");
}
#endif /* TARGET_OS_LINUX */
#endif /* HAVE_STACKTRACE */
diff --git a/storage/archive/azio.c b/storage/archive/azio.c
index 1f7e9d7c1de..ee2fee34953 100644
--- a/storage/archive/azio.c
+++ b/storage/archive/azio.c
@@ -557,6 +557,7 @@ int do_flush (azio_stream *s, int flush)
{
uInt len;
int done = 0;
+ my_off_t afterwrite_pos;
if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
@@ -597,7 +598,10 @@ int do_flush (azio_stream *s, int flush)
s->dirty= AZ_STATE_CLEAN; /* Mark it clean, we should be good now */
else
s->dirty= AZ_STATE_SAVED; /* Mark it clean, we should be good now */
+
+ afterwrite_pos= my_tell(s->file, MYF(0));
write_header(s);
+ my_seek(s->file, afterwrite_pos, SEEK_SET, MYF(0));
return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
}
diff --git a/storage/blackhole/ha_blackhole.cc b/storage/blackhole/ha_blackhole.cc
index 1441b7f71fb..03da7808948 100644
--- a/storage/blackhole/ha_blackhole.cc
+++ b/storage/blackhole/ha_blackhole.cc
@@ -287,8 +287,8 @@ static void blackhole_free_key(st_blackhole_share *share)
my_free((uchar*) share, MYF(0));
}
-static uchar* blackhole_get_key(st_blackhole_share *share, uint *length,
- my_bool not_used __attribute__((unused)))
+static uchar* blackhole_get_key(st_blackhole_share *share, size_t *length,
+ my_bool not_used __attribute__((unused)))
{
*length= share->table_name_length;
return (uchar*) share->table_name;
diff --git a/storage/example/ha_example.cc b/storage/example/ha_example.cc
index cd43672bb88..06efc727837 100644
--- a/storage/example/ha_example.cc
+++ b/storage/example/ha_example.cc
@@ -114,7 +114,7 @@ pthread_mutex_t example_mutex;
Function we use in the creation of our hash to get key.
*/
-static uchar* example_get_key(EXAMPLE_SHARE *share,uint *length,
+static uchar* example_get_key(EXAMPLE_SHARE *share, size_t *length,
my_bool not_used __attribute__((unused)))
{
*length=share->table_name_length;
diff --git a/strings/ctype-ucs2.c b/strings/ctype-ucs2.c
index 88a686ff256..38b2789c545 100644
--- a/strings/ctype-ucs2.c
+++ b/strings/ctype-ucs2.c
@@ -1586,8 +1586,8 @@ my_bool my_like_range_ucs2(CHARSET_INFO *cs,
-ulong my_scan_ucs2(CHARSET_INFO *cs __attribute__((unused)),
- const char *str, const char *end, int sequence_type)
+size_t my_scan_ucs2(CHARSET_INFO *cs __attribute__((unused)),
+ const char *str, const char *end, int sequence_type)
{
const char *str0= str;
end--; /* for easier loop condition, because of two bytes per character */
@@ -1600,7 +1600,7 @@ ulong my_scan_ucs2(CHARSET_INFO *cs __attribute__((unused)),
if (str[0] != '\0' || str[1] != ' ')
break;
}
- return (ulong) (str - str0);
+ return (size_t) (str - str0);
default:
return 0;
}
diff --git a/support-files/compiler_warnings.supp b/support-files/compiler_warnings.supp
index 04f5a30bafa..0a2c720b81b 100644
--- a/support-files/compiler_warnings.supp
+++ b/support-files/compiler_warnings.supp
@@ -51,6 +51,11 @@ db_vrfy.c : .*comparison is always false due to limited range of data type.*
.* : conversion from '.*size_t' to 'uint32'.*
.* : conversion from '.*size_t' to 'off_t'.*
.* : conversion from '.*size_t' to 'size_s'.*
+.* : conversion from '.*size_t' to 'DWORD'.*
+.* : conversion from '.*size_t' to 'uLongf'.*
+.* : conversion from '.*size_t' to 'UINT'.*
+.* : conversion from '.*size_t' to 'uInt'.*
+.* : conversion from '.*size_t' to 'uint16'.*
#
# The following should be fixed by the ndb team
@@ -64,7 +69,9 @@ db_vrfy.c : .*comparison is always false due to limited range of data type.*
#
listener.cc : .*conversion from 'SOCKET' to 'int'.*
net_serv.cc : .*conversion from 'SOCKET' to 'int'.*
-mi_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 567
+
+# allow a little moving space for the warning below
+mi_packrec.c : .*result of 32-bit shift implicitly converted to 64 bits.* : 560-600
#
# Wrong compiler warnings