Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-02-22 16:59:57+02:00, monty@stripped +43 -0
Fixed compiler warnings (for linux and win32 and win64)
Fixed a couple of usage of not initialized warnings (unlikely cases)
client/mysqldump.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +2 -2
Fixed compiler warnings from 'max' build
client/mysqltest.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +9 -8
Removed compiler warnings
cmd-line-utils/readline/xmalloc.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +2 -2
Fixed compiler warnings from 'max' build
extra/comp_err.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +4 -0
Fixed compiler warnings from 'max' build
extra/yassl/include/openssl/ssl.h@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +6 -2
Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit
extra/yassl/include/socket_wrapper.hpp@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +2 -4
Moved socket_t to ssl.h, to be able to removed compiler warnings on windows 64 bit
extra/yassl/src/ssl.cpp@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -1
Changed prototype for SSL_set_fd() to fix compiler warnings (and possible errors) on windows 64 bit
extra/yassl/taocrypt/src/integer.cpp@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -1
Fixed compiler warnings
include/my_global.h@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +15 -0
Added my_offsetof() macro from 5.1 to get rid of compiler warnings
innobase/include/ut0byte.ic@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +2 -2
Fixed compiler warnings on win64
innobase/include/ut0ut.ic@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -1
Fixed compiler warnings on win64
libmysql/libmysql.def@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +0 -1
Fixed compiler warnings on win64
myisam/mi_packrec.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -1
Fixed compiler warnings on win64
myisam/myisamchk.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -0
Fixed compiler warnings from 'max' build
mysys/base64.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +2 -2
Fixed compiler warnings on win64
mysys/mf_keycache.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +4 -1
Fixed compiler warnings from 'max' build
mysys/my_getopt.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -0
Fixed compiler warnings from 'max' build
mysys/my_init.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +2 -0
Fixed compiler warnings from 'max' build
mysys/my_thr_init.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +3 -3
Fixed compiler warnings
mysys/ptr_cmp.c@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -1
Fixed compiler warnings from 'max' build
ndb/include/kernel/signaldata/DictTabInfo.hpp@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +5 -5
Fixed compiler warnings
server-tools/instance-manager/mysql_connection.cc@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -1
Fixed compiler warnings
server-tools/instance-manager/mysqlmanager.cc@stripped, 2007-02-22 16:59:54+02:00, monty@stripped +1 -1
Fixed compiler warnings
sql/filesort.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +1 -1
Initalize variable that was used unitialized in error conditions
sql/ha_berkeley.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +10 -0
Moved get_auto_primary_key() here as int5store() gives (wrong) compiler warnings in win64
sql/ha_berkeley.h@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +1 -7
Moved get_auto_primary_key() to ha_berkeley.cc
sql/ha_innodb.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +6 -3
Fixed compiler warnings
sql/item.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +2 -0
Fixed compiler warnings from 'max' build
sql/item_timefunc.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +1 -1
Fixed compiler warnings
sql/mysqld.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +2 -2
Fixed compiler warnings
sql/sql_acl.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +2 -0
Fixed compiler warnings from 'max' build
sql/sql_base.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +1 -0
Fixed compiler warnings from 'max' build
sql/sql_insert.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +1 -0
Initialize variable that may be used unitialized on error conditions (not fatal)
sql/sql_prepare.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +1 -0
Fixed compiler warnings from 'max' build
sql/sql_select.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +2 -2
Fixed compiler warnings
sql/sql_show.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +4 -3
Fixed compiler warnings
sql/udf_example.def@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +0 -1
Fixed compiler warnings on win64
sql/unireg.cc@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +3 -0
Initialize variable that may be used unitialized on error conditions
strings/ctype-ucs2.c@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +4 -1
Fixed compiler warnings
strings/ctype-utf8.c@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +2 -0
Fixed compiler warnings
strings/decimal.c@stripped, 2007-02-22 16:59:55+02:00, monty@stripped +3 -0
Fixed compiler warnings
support-files/compiler_warnings.supp@stripped, 2007-02-22 16:59:56+02:00, monty@stripped +8 -0
Ignore warnings from sql_yacc.cc that are hard to remove
Ignore some not important warnings from windows 64 bit build
tools/mysqlmanager.c@stripped, 2007-02-22 16:59:56+02:00, monty@stripped +1 -1
Fixed compiler warnings
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: monty
# Host: narttu.mysql.fi
# Root: /home/my/mysql-5.0
--- 1.256/client/mysqldump.c 2007-01-22 14:10:36 +02:00
+++ 1.257/client/mysqldump.c 2007-02-22 16:59:54 +02:00
@@ -2016,7 +2016,8 @@
*/
-static void dump_triggers_for_table(char *table, char *db)
+static void dump_triggers_for_table(char *table,
+ char *db __attribute__((unused)))
{
char *result_table;
char name_buff[NAME_LEN*4+3], table_buff[NAME_LEN*2+3];
@@ -2025,7 +2026,6 @@
FILE *sql_file= md_result_file;
MYSQL_RES *result;
MYSQL_ROW row;
-
DBUG_ENTER("dump_triggers_for_table");
DBUG_PRINT("enter", ("db: %s, table: %s", db, table));
--- 1.25/extra/comp_err.c 2006-12-23 21:04:04 +02:00
+++ 1.26/extra/comp_err.c 2007-02-22 16:59:54 +02:00
@@ -41,7 +41,9 @@
static char *STATEFILE= (char*) "sql_state.h";
static char *TXTFILE= (char*) "../sql/share/errmsg.txt";
static char *DATADIRECTORY= (char*) "../sql/share/";
+#ifndef DBUG_OFF
static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace";
+#endif
/* Header for errmsg.sys files */
uchar file_head[]= { 254, 254, 2, 1 };
@@ -402,6 +404,8 @@
int rcount= 0;
DBUG_ENTER("parse_input_file");
+ *top_error= 0;
+ *top_lang= 0;
if (!(file= my_fopen(file_name, O_RDONLY | O_SHARE, MYF(MY_WME))))
DBUG_RETURN(0);
--- 1.41/myisam/mi_packrec.c 2007-01-22 11:31:53 +02:00
+++ 1.42/myisam/mi_packrec.c 2007-02-22 16:59:54 +02:00
@@ -564,7 +564,7 @@
*/
value|= (max_bits - bits) << 8 | IS_CHAR;
- for (end= table + (1 << bits); table < end; table++)
+ for (end= table + ((uint) 1 << bits); table < end; table++)
{
*table= (uint16) value;
}
--- 1.124/myisam/myisamchk.c 2006-12-23 21:04:06 +02:00
+++ 1.125/myisam/myisamchk.c 2007-02-22 16:59:54 +02:00
@@ -720,6 +720,7 @@
case 2:
method_conv= MI_STATS_METHOD_IGNORE_NULLS;
break;
+ default: assert(0); /* Impossible */
}
check_param.stats_method= method_conv;
break;
--- 1.60/mysys/mf_keycache.c 2007-01-22 14:10:36 +02:00
+++ 1.61/mysys/mf_keycache.c 2007-02-22 16:59:54 +02:00
@@ -167,8 +167,10 @@
struct st_my_thread_var *thread);
#endif
static void free_block(KEY_CACHE *keycache, BLOCK_LINK *block);
+#ifndef DBUG_OFF
static void test_key_cache(KEY_CACHE *keycache,
const char *where, my_bool lock);
+#endif
#define KEYCACHE_HASH(f, pos) \
(((ulong) ((pos) >> keycache->key_cache_shift)+ \
@@ -2605,7 +2607,8 @@
0 on success (always because it can't fail)
*/
-int reset_key_cache_counters(const char *name, KEY_CACHE *key_cache)
+int reset_key_cache_counters(const char *name __attribute__((unused)),
+ KEY_CACHE *key_cache)
{
DBUG_ENTER("reset_key_cache_counters");
if (!key_cache->key_cache_inited)
--- 1.47/mysys/my_init.c 2006-12-23 21:04:07 +02:00
+++ 1.48/mysys/my_init.c 2007-02-22 16:59:54 +02:00
@@ -197,7 +197,9 @@
}
if (!(infoflag & MY_DONT_FREE_DBUG))
+ {
DBUG_END(); /* Must be done before my_thread_end */
+ }
#ifdef THREAD
my_thread_end();
my_thread_global_end();
--- 1.40/mysys/my_thr_init.c 2007-02-20 11:01:52 +02:00
+++ 1.41/mysys/my_thr_init.c 2007-02-22 16:59:54 +02:00
@@ -54,8 +54,8 @@
race conditions in NPTL pthread_exit code.
*/
-static
-pthread_handler_t nptl_pthread_exit_hack_handler(void *arg)
+static pthread_handler_t
+nptl_pthread_exit_hack_handler(void *arg __attribute__((unused)))
{
/* Do nothing! */
pthread_exit(0);
@@ -400,9 +400,9 @@
static uint get_thread_lib(void)
{
+#ifdef _CS_GNU_LIBPTHREAD_VERSION
char buff[64];
-#ifdef _CS_GNU_LIBPTHREAD_VERSION
confstr(_CS_GNU_LIBPTHREAD_VERSION, buff, sizeof(buff));
if (!strncasecmp(buff, "NPTL", 4))
--- 1.7/mysys/ptr_cmp.c 2006-12-23 21:04:08 +02:00
+++ 1.8/mysys/ptr_cmp.c 2007-02-22 16:59:54 +02:00
@@ -185,7 +185,7 @@
case 3: pos= (my_off_t) mi_uint3korr(ptr); break;
case 2: pos= (my_off_t) mi_uint2korr(ptr); break;
case 1: pos= (my_off_t) mi_uint2korr(ptr); break;
- default: DBUG_ASSERT(0);
+ default: DBUG_ASSERT(0); return 0;
}
return pos;
}
--- 1.7/cmd-line-utils/readline/xmalloc.c 2005-07-19 04:00:16 +03:00
+++ 1.8/cmd-line-utils/readline/xmalloc.c 2007-02-22 16:59:54 +02:00
@@ -57,7 +57,7 @@
temp = malloc (bytes);
if (temp == 0)
- memory_error_and_abort ("xmalloc");
+ memory_error_and_abort ((char*) "xmalloc");
return (temp);
}
@@ -71,7 +71,7 @@
temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
if (temp == 0)
- memory_error_and_abort ("xrealloc");
+ memory_error_and_abort ((char*) "xrealloc");
return (temp);
}
--- 1.115/sql/filesort.cc 2007-02-21 13:04:59 +02:00
+++ 1.116/sql/filesort.cc 2007-02-22 16:59:55 +02:00
@@ -98,7 +98,7 @@
uint maxbuffer;
BUFFPEK *buffpek;
ha_rows records= HA_POS_ERROR;
- uchar **sort_keys;
+ uchar **sort_keys= 0;
IO_CACHE tempfile, buffpek_pointers, *selected_records_file, *outfile;
SORTPARAM param;
bool multi_byte_charset;
--- 1.165/sql/ha_berkeley.cc 2006-12-30 22:02:06 +02:00
+++ 1.166/sql/ha_berkeley.cc 2007-02-22 16:59:55 +02:00
@@ -233,6 +233,7 @@
return 0;
}
+
bool berkeley_flush_logs()
{
int error;
@@ -436,6 +437,15 @@
}
}
return flags;
+}
+
+
+void ha_berkeley::get_auto_primary_key(byte *to)
+{
+ pthread_mutex_lock(&share->mutex);
+ share->auto_ident++;
+ int5store(to,share->auto_ident);
+ pthread_mutex_unlock(&share->mutex);
}
--- 1.80/sql/ha_berkeley.h 2006-12-30 22:02:06 +02:00
+++ 1.81/sql/ha_berkeley.h 2007-02-22 16:59:55 +02:00
@@ -141,13 +141,7 @@
enum thr_lock_type lock_type);
void get_status();
- inline void get_auto_primary_key(byte *to)
- {
- pthread_mutex_lock(&share->mutex);
- share->auto_ident++;
- int5store(to,share->auto_ident);
- pthread_mutex_unlock(&share->mutex);
- }
+ void get_auto_primary_key(byte *to);
ulonglong get_auto_increment();
void print_error(int error, myf errflag);
uint8 table_cache_type() { return HA_CACHE_TBL_TRANSACT; }
--- 1.249/sql/item.cc 2007-02-21 13:04:59 +02:00
+++ 1.250/sql/item.cc 2007-02-22 16:59:55 +02:00
@@ -1521,6 +1521,8 @@
doesn't display each argument's characteristics.
- if nargs is 1, then this error cannot happen.
*/
+ LINT_INIT(safe_args[0]);
+ LINT_INIT(safe_args[1]);
if (nargs >=2 && nargs <= 3)
{
safe_args[0]= args[0];
--- 1.140/sql/item_timefunc.cc 2007-02-21 13:05:00 +02:00
+++ 1.141/sql/item_timefunc.cc 2007-02-22 16:59:55 +02:00
@@ -1608,7 +1608,7 @@
void Item_func_sysdate_local::store_now_in_TIME(TIME *now_time)
{
THD *thd= current_thd;
- thd->variables.time_zone->gmt_sec_to_TIME(now_time, time(NULL));
+ thd->variables.time_zone->gmt_sec_to_TIME(now_time, (my_time_t) time(NULL));
thd->time_zone_used= 1;
}
--- 1.588/sql/mysqld.cc 2007-02-21 14:07:05 +02:00
+++ 1.589/sql/mysqld.cc 2007-02-22 16:59:55 +02:00
@@ -324,6 +324,7 @@
#ifndef EMBEDDED_LIBRARY
static struct passwd *user_info;
static pthread_t select_thread;
+static uint thr_kill_signal;
#endif
static pthread_cond_t COND_thread_cache, COND_flush_thread_cache;
@@ -522,7 +523,6 @@
pthread_cond_t COND_refresh,COND_thread_count, COND_global_read_lock;
pthread_t signal_thread;
pthread_attr_t connection_attrib;
-static uint thr_kill_signal;
File_parser_dummy_hook file_parser_dummy_hook;
@@ -3216,7 +3216,7 @@
#ifdef HAVE_REPLICATION
if (opt_bin_log && expire_logs_days)
{
- long purge_time= time(0) - expire_logs_days*24*60*60;
+ long purge_time= (long) (time(0) - expire_logs_days*24*60*60);
if (purge_time >= 0)
mysql_bin_log.purge_logs_before_date(purge_time);
}
--- 1.216/sql/sql_acl.cc 2007-01-12 13:22:49 +02:00
+++ 1.217/sql/sql_acl.cc 2007-02-22 16:59:55 +02:00
@@ -5021,6 +5021,8 @@
user= grant_name->user;
host= grant_name->host.hostname;
break;
+ default:
+ assert(0);
}
if (! user)
user= "";
--- 1.365/sql/sql_base.cc 2007-01-31 16:04:28 +02:00
+++ 1.366/sql/sql_base.cc 2007-02-22 16:59:55 +02:00
@@ -2975,6 +2975,7 @@
if (nj_col->view_field)
{
Item *item;
+ LINT_INIT(arena);
if (register_tree_change)
arena= thd->activate_stmt_arena_if_needed(&backup);
/*
--- 1.215/sql/sql_insert.cc 2007-02-21 19:38:39 +02:00
+++ 1.216/sql/sql_insert.cc 2007-02-22 16:59:55 +02:00
@@ -410,6 +410,7 @@
#ifndef EMBEDDED_LIBRARY
if (lock_type == TL_WRITE_DELAYED)
{
+ res= 1;
if (thd->locked_tables)
{
DBUG_ASSERT(table_list->db); /* Must be set in the parser */
--- 1.492/sql/sql_select.cc 2007-02-21 13:05:03 +02:00
+++ 1.493/sql/sql_select.cc 2007-02-22 16:59:55 +02:00
@@ -8081,7 +8081,7 @@
*/
if (nested_join->join_list.elements != 1)
{
- nested_join->nj_map= 1 << first_unused++;
+ nested_join->nj_map= (nested_join_map) 1 << first_unused++;
first_unused= build_bitmap_for_nested_joins(&nested_join->join_list,
first_unused);
}
@@ -10056,6 +10056,7 @@
enum_nested_loop_state error= NESTED_LOOP_OK;
JOIN_TAB *join_tab;
DBUG_ENTER("do_select");
+ LINT_INIT(join_tab);
join->procedure=procedure;
join->tmp_table= table; /* Save for easy recursion */
@@ -10100,7 +10101,6 @@
else
{
DBUG_ASSERT(join->tables);
- DBUG_ASSERT(join_tab);
error= sub_select(join,join_tab,0);
if (error == NESTED_LOOP_OK || error == NESTED_LOOP_NO_MORE_ROWS)
error= sub_select(join,join_tab,1);
--- 1.340/sql/sql_show.cc 2007-02-21 13:05:03 +02:00
+++ 1.341/sql/sql_show.cc 2007-02-22 16:59:55 +02:00
@@ -2515,20 +2515,21 @@
if (file->create_time)
{
thd->variables.time_zone->gmt_sec_to_TIME(&time,
- file->create_time);
+ (my_time_t) file->create_time);
table->field[14]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
table->field[14]->set_notnull();
}
if (file->update_time)
{
thd->variables.time_zone->gmt_sec_to_TIME(&time,
- file->update_time);
+ (my_time_t) file->update_time);
table->field[15]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
table->field[15]->set_notnull();
}
if (file->check_time)
{
- thd->variables.time_zone->gmt_sec_to_TIME(&time, file->check_time);
+ thd->variables.time_zone->gmt_sec_to_TIME(&time,
+ (my_time_t) file->check_time);
table->field[16]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
table->field[16]->set_notnull();
}
--- 1.82/sql/unireg.cc 2007-02-21 13:05:04 +02:00
+++ 1.83/sql/unireg.cc 2007-02-22 16:59:55 +02:00
@@ -839,7 +839,10 @@
field->field_name,
&table);
if (!regfield)
+ {
+ error= 1;
goto err; // End of memory
+ }
if (!(field->flags & NOT_NULL_FLAG))
{
--- 1.64/strings/ctype-ucs2.c 2006-12-23 21:04:29 +02:00
+++ 1.65/strings/ctype-ucs2.c 2007-02-22 16:59:55 +02:00
@@ -206,6 +206,7 @@
const uchar *se=s+slen;
const uchar *te=t+tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
+ LINT_INIT(s_wc);
while ( s < se && t < te )
{
@@ -320,7 +321,8 @@
const char *se=s+len;
const char *te=t+len;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
-
+ LINT_INIT(s_wc);
+
while ( s < se && t < te )
{
int plane;
@@ -1382,6 +1384,7 @@
my_wc_t s_wc,t_wc;
const uchar *se=s+slen;
const uchar *te=t+tlen;
+ LINT_INIT(s_wc);
while ( s < se && t < te )
{
--- 1.104/strings/ctype-utf8.c 2007-01-22 14:10:42 +02:00
+++ 1.105/strings/ctype-utf8.c 2007-02-22 16:59:55 +02:00
@@ -2310,6 +2310,7 @@
const uchar *se=s+slen;
const uchar *te=t+tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
+ LINT_INIT(s_wc);
while ( s < se && t < te )
{
@@ -2379,6 +2380,7 @@
my_wc_t s_wc,t_wc;
const uchar *se= s+slen, *te= t+tlen;
MY_UNICASE_INFO **uni_plane= cs->caseinfo;
+ LINT_INIT(s_wc);
#ifndef VARCHAR_WITH_DIFF_ENDSPACE_ARE_DIFFERENT_FOR_UNIQUE
diff_if_only_endspace_difference= 0;
--- 1.2/sql/udf_example.def 2006-11-16 17:19:27 +02:00
+++ 1.3/sql/udf_example.def 2007-02-22 16:59:55 +02:00
@@ -1,5 +1,4 @@
LIBRARY udf_example
-DESCRIPTION 'MySQL Sample for UDF'
VERSION 1.0
EXPORTS
lookup
--- 1.61/mysys/my_getopt.c 2007-02-14 00:25:05 +02:00
+++ 1.62/mysys/my_getopt.c 2007-02-22 16:59:54 +02:00
@@ -194,6 +194,7 @@
Find first the right option. Return error in case of an ambiguous,
or unknown option
*/
+ LINT_INIT(prev_found);
optp= longopts;
if (!(opt_found= findopt(opt_str, length, &optp, &prev_found)))
{
--- 1.3/support-files/compiler_warnings.supp 2007-02-21 19:38:39 +02:00
+++ 1.4/support-files/compiler_warnings.supp 2007-02-22 16:59:56 +02:00
@@ -2,3 +2,11 @@
DictTabInfo.cpp : .*macro was used incorrectly.*
DbdihMain.cpp : .*unused variable.* : 6666-6705
DbtupExecQuery.cpp : .*unused variable.* : 1448-1449
+sql_yacc.cc : .*switch statement contains 'default' but no 'case' labels.*
+
+#
+# Ignore all conversion warnings on windows 64
+# (Is safe as we are not yet supporting strings >= 2G)
+#
+.* : conversion from 'size_t' to .*int'.*
+.* : conversion from '__int64' to .*int'.*
--- 1.19/server-tools/instance-manager/mysqlmanager.cc 2006-12-30 22:02:06 +02:00
+++ 1.20/server-tools/instance-manager/mysqlmanager.cc 2007-02-22 16:59:54 +02:00
@@ -199,7 +199,7 @@
MY_INIT(progname);
log_init();
umask(0117);
- srand(time(0));
+ srand((uint) time(0));
}
--- 1.23/ndb/include/kernel/signaldata/DictTabInfo.hpp 2007-01-22 14:10:37 +02:00
+++ 1.24/ndb/include/kernel/signaldata/DictTabInfo.hpp 2007-02-22 16:59:54 +02:00
@@ -46,17 +46,17 @@
#endif
#define DTIMAP(x, y, z) \
- { DictTabInfo::y, offsetof(x, z), SimpleProperties::Uint32Value, 0, (~0), 0 }
+ { DictTabInfo::y, my_offsetof(x, z), SimpleProperties::Uint32Value, 0, (~0), 0 }
#define DTIMAP2(x, y, z, u, v) \
- { DictTabInfo::y, offsetof(x, z), SimpleProperties::Uint32Value, u, v, 0 }
+ { DictTabInfo::y, my_offsetof(x, z), SimpleProperties::Uint32Value, u, v, 0 }
#define DTIMAPS(x, y, z, u, v) \
- { DictTabInfo::y, offsetof(x, z), SimpleProperties::StringValue, u, v, 0 }
+ { DictTabInfo::y, my_offsetof(x, z), SimpleProperties::StringValue, u, v, 0 }
#define DTIMAPB(x, y, z, u, v, l) \
- { DictTabInfo::y, offsetof(x, z), SimpleProperties::BinaryValue, u, v, \
- offsetof(x, l) }
+ { DictTabInfo::y, my_offsetof(x, z), SimpleProperties::BinaryValue, u, v, \
+ my_offsetof(x, l) }
#define DTIBREAK(x) \
{ DictTabInfo::x, 0, SimpleProperties::InvalidValue, 0, 0, 0 }
--- 1.14/mysys/base64.c 2006-12-23 21:04:07 +02:00
+++ 1.15/mysys/base64.c 2007-02-22 16:59:54 +02:00
@@ -98,10 +98,10 @@
}
-static inline unsigned
+static inline uint
pos(unsigned char c)
{
- return strchr(base64_table, c) - base64_table;
+ return (uint) (strchr(base64_table, c) - base64_table);
}
--- 1.44/libmysql/libmysql.def 2006-04-22 01:48:08 +03:00
+++ 1.45/libmysql/libmysql.def 2007-02-22 16:59:54 +02:00
@@ -1,5 +1,4 @@
LIBRARY LIBMYSQL
-DESCRIPTION 'MySQL 5.0 Client Library'
VERSION 6.0
EXPORTS
_dig_vec_lower
--- 1.4/innobase/include/ut0byte.ic 2004-12-02 19:42:32 +02:00
+++ 1.5/innobase/include/ut0byte.ic 2007-02-22 16:59:54 +02:00
@@ -388,8 +388,8 @@
ut_ad(TRUE == 1);
if (val) {
- return((1 << n) | a);
+ return(((ulint) 1 << n) | a);
} else {
- return(~(1 << n) & a);
+ return(~((ulint) 1 << n) & a);
}
}
--- 1.3/innobase/include/ut0ut.ic 2003-10-07 17:19:31 +03:00
+++ 1.4/innobase/include/ut0ut.ic 2007-02-22 16:59:54 +02:00
@@ -170,5 +170,5 @@
/* out: 2 to power n */
ulint n) /* in: number */
{
- return(1 << n);
+ return((ulint) 1 << n);
}
--- 1.307/sql/ha_innodb.cc 2006-12-23 21:04:24 +02:00
+++ 1.308/sql/ha_innodb.cc 2007-02-22 16:59:55 +02:00
@@ -2711,7 +2711,8 @@
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);
}
@@ -2780,7 +2781,8 @@
(const char *) blob_data,
(const char *) blob_data
+ blob_len,
- key_len / cs->mbmaxlen,
+ (uint) (key_len /
+ cs->mbmaxlen),
&error);
}
@@ -2852,7 +2854,8 @@
(const char *)src_start,
(const char *)src_start
+ key_len,
- key_len / cs->mbmaxlen,
+ (uint) (key_len /
+ cs->mbmaxlen),
&error);
}
}
--- 1.135/include/my_global.h 2007-02-21 13:04:55 +02:00
+++ 1.136/include/my_global.h 2007-02-22 16:59:54 +02:00
@@ -846,6 +846,21 @@
#define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size)
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B))
+/*
+ Custom version of standard offsetof() macro which can be used to get
+ offsets of members in class for non-POD types (according to the current
+ version of C++ standard offsetof() macro can't be used in such cases and
+ attempt to do so causes warnings to be emitted, OTOH in many cases it is
+ still OK to assume that all instances of the class has the same offsets
+ for the same members).
+
+ This is temporary solution which should be removed once File_parser class
+ and related routines are refactored.
+*/
+
+#define my_offsetof(TYPE, MEMBER) \
+ ((size_t)((char *)&(((TYPE *)0x10)->MEMBER) - (char*)0x10))
+
#define NullS (char *) 0
/* Nowdays we do not support MessyDos */
#ifndef NEAR
--- 1.275/client/mysqltest.c 2007-01-22 14:10:36 +02:00
+++ 1.276/client/mysqltest.c 2007-02-22 16:59:54 +02:00
@@ -1844,7 +1844,7 @@
void do_chmod_file(struct st_command *command)
{
- ulong mode= 0;
+ long mode= 0;
static DYNAMIC_STRING ds_mode;
static DYNAMIC_STRING ds_file;
const struct command_arg chmod_file_args[] = {
@@ -1864,7 +1864,7 @@
die("You must write a 4 digit octal number for mode");
DBUG_PRINT("info", ("chmod %o %s", (uint)mode, ds_file.str));
- handle_command_error(command, chmod(ds_file.str, mode));
+ handle_command_error(command, chmod(ds_file.str, (mode_t) mode));
dynstr_free(&ds_mode);
dynstr_free(&ds_file);
DBUG_VOID_RETURN;
@@ -6275,7 +6275,8 @@
void replace_strings_append(REPLACE *rep, DYNAMIC_STRING* ds,
- const char *str, int len)
+ const char *str,
+ int len __attribute__((unused)))
{
reg1 REPLACE *rep_pos;
reg2 REPLACE_STRING *rep_str;
@@ -6666,7 +6667,7 @@
we need at least what we have so far in the buffer + the part
before this match
*/
- need_buf_len= (res_p - buf) + subs[0].rm_so;
+ need_buf_len= (res_p - buf) + (int) subs[0].rm_so;
/* on this pass, calculate the memory for the result buffer */
while (expr_p < replace_end)
@@ -6676,17 +6677,17 @@
if (c == '\\' && expr_p + 1 < replace_end)
{
- back_ref_num= expr_p[1] - '0';
+ back_ref_num= (int) (expr_p[1] - '0');
}
/* found a valid back_ref (eg. \1)*/
if (back_ref_num >= 0 && back_ref_num <= (int)r.re_nsub)
{
- int start_off,end_off;
+ regoff_t start_off, end_off;
if ((start_off=subs[back_ref_num].rm_so) > -1 &&
(end_off=subs[back_ref_num].rm_eo) > -1)
{
- need_buf_len += (end_off - start_off);
+ need_buf_len += (int) (end_off - start_off);
}
expr_p += 2;
}
@@ -6706,7 +6707,7 @@
/* copy the pre-match part */
if (subs[0].rm_so)
{
- memcpy(res_p, str_p, subs[0].rm_so);
+ memcpy(res_p, str_p, (size_t) subs[0].rm_so);
res_p+= subs[0].rm_so;
}
--- 1.18/server-tools/instance-manager/mysql_connection.cc 2007-01-22 14:10:38 +02:00
+++ 1.19/server-tools/instance-manager/mysql_connection.cc 2007-02-22 16:59:54 +02:00
@@ -135,7 +135,7 @@
/* Initialize random number generator */
{
ulong seed1= (ulong) &rand_st + rand();
- ulong seed2= rand() + time(0);
+ ulong seed2= rand() + (ulong) time(0);
randominit(&rand_st, seed1, seed2);
}
/* Fill scramble - server's random message used for handshake */
--- 1.49/tools/mysqlmanager.c 2006-12-30 22:02:08 +02:00
+++ 1.50/tools/mysqlmanager.c 2007-02-22 16:59:56 +02:00
@@ -1312,7 +1312,7 @@
static my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
- char *argument)
+ char *argument __attribute__((unused)))
{
switch (optid) {
case '#':
--- 1.76/strings/decimal.c 2007-01-22 14:10:43 +02:00
+++ 1.77/strings/decimal.c 2007-02-22 16:59:55 +02:00
@@ -1356,6 +1356,7 @@
{
int i=dig2bytes[intg0x];
dec1 x;
+ LINT_INIT(x);
switch (i)
{
case 1: x=mi_sint1korr(from); break;
@@ -1397,6 +1398,7 @@
{
int i=dig2bytes[frac0x];
dec1 x;
+ LINT_INIT(x);
switch (i)
{
case 1: x=mi_sint1korr(from); break;
@@ -1483,6 +1485,7 @@
sanity(to);
+ LINT_INIT(round_digit);
switch (mode) {
case HALF_UP:
case HALF_EVEN: round_digit=5; break;
--- 1.20/extra/yassl/include/openssl/ssl.h 2007-01-10 20:27:15 +02:00
+++ 1.21/extra/yassl/include/openssl/ssl.h 2007-02-22 16:59:54 +02:00
@@ -33,7 +33,6 @@
#include "opensslv.h" /* for version number */
#include "rsa.h"
-
#define YASSL_VERSION "1.5.8"
@@ -190,11 +189,16 @@
EVP_R_BAD_DECRYPT = 2
};
+#ifdef WIN
+ typedef SOCKET socket_t;
+#else
+ typedef int socket_t;
+#endif
SSL_CTX* SSL_CTX_new(SSL_METHOD*);
SSL* SSL_new(SSL_CTX*);
-int SSL_set_fd (SSL*, int);
+int SSL_set_fd (SSL*, socket_t);
int SSL_connect(SSL*);
int SSL_write(SSL*, const void*, int);
int SSL_read(SSL*, void*, int);
--- 1.10/extra/yassl/include/socket_wrapper.hpp 2006-11-02 20:10:43 +02:00
+++ 1.11/extra/yassl/include/socket_wrapper.hpp 2007-02-22 16:59:54 +02:00
@@ -38,16 +38,14 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#endif
+#include "openssl/ssl.h" /* for socket_t */
namespace yaSSL {
typedef unsigned int uint;
-#ifdef _WIN32
- typedef SOCKET socket_t;
-#else
- typedef int socket_t;
+#ifndef _WIN32
const socket_t INVALID_SOCKET = -1;
const int SD_RECEIVE = 0;
const int SD_SEND = 1;
--- 1.25/extra/yassl/src/ssl.cpp 2007-02-21 19:38:38 +02:00
+++ 1.26/extra/yassl/src/ssl.cpp 2007-02-22 16:59:54 +02:00
@@ -229,7 +229,7 @@
}
-int SSL_set_fd(SSL* ssl, int fd)
+int SSL_set_fd(SSL* ssl, socket_t fd)
{
ssl->useSocket().set_fd(fd);
return SSL_SUCCESS;
--- 1.28/extra/yassl/taocrypt/src/integer.cpp 2007-01-25 20:34:38 +02:00
+++ 1.29/extra/yassl/taocrypt/src/integer.cpp 2007-02-22 16:59:54 +02:00
@@ -3390,7 +3390,7 @@
CopyWords(r.reg_.get_buffer(), a.reg_.get_buffer(), wordCount);
SetWords(r.reg_+wordCount, 0, r.reg_.size()-wordCount);
if (n % WORD_BITS != 0)
- r.reg_[wordCount-1] %= (1 << (n % WORD_BITS));
+ r.reg_[wordCount-1] %= ((word) 1 << (n % WORD_BITS));
}
else
{
--- 1.193/sql/sql_prepare.cc 2007-02-21 13:05:03 +02:00
+++ 1.194/sql/sql_prepare.cc 2007-02-22 16:59:55 +02:00
@@ -2015,6 +2015,7 @@
uint query_len;
DBUG_ENTER("mysql_sql_stmt_prepare");
DBUG_ASSERT(thd->protocol == &thd->protocol_simple);
+ LINT_INIT(query_len);
if ((stmt= (Prepared_statement*) thd->stmt_map.find_by_name(name)))
{
| Thread |
|---|
| • bk commit into 5.0 tree (monty:1.2420) | monty | 22 Feb |