Below is the list of changes that have just been committed into a local
5.1 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, 2006-11-27 16:24:14+02:00, monty@stripped +15 -0
Removed compiler warnings
Ensure that my_size_t is always unsigned (to get predictiable results from system to system)
Removed some %lld, as these are not portable
BUILD/FINISH.sh@stripped, 2006-11-27 16:24:10+02:00, monty@stripped +1 -1
Remove configure files from storage engines (as some of them may be old versions and may cause conflicts)
client/mysqldump.c@stripped, 2006-11-27 16:24:10+02:00, monty@stripped +2 -2
Removed compiler warning
client/mysqlslap.c@stripped, 2006-11-27 16:24:10+02:00, monty@stripped +1 -1
Removed compiler warning
client/mysqltest.c@stripped, 2006-11-27 16:24:10+02:00, monty@stripped +5 -5
Removed compiler warning
cmd-line-utils/readline/bind.c@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +2 -1
Removed compiler warning
cmd-line-utils/readline/histfile.c@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +4 -2
Removed compiler warning
include/my_global.h@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +18 -3
Ensure that my_size_t is always unsigned (to get predictiable results from system to system)
Moved my_offset_t here from parse_file.h
sql/field.h@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +1 -1
Removed compiler warning
sql/log_event.cc@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +8 -7
Removed compiler warning
sql/parse_file.h@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +0 -17
Moved my_offset_t to my_global.h
sql/rpl_utility.cc@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +2 -1
Removed compiler warning
sql/sql_binlog.cc@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +2 -2
Removed compiler warning
storage/archive/ha_archive.cc@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +14 -12
Removed compiler warning
Removed %lld as it's not portable
storage/heap/hp_write.c@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +1 -1
Removed compiler warning
storage/ndb/include/kernel/signaldata/DictTabInfo.hpp@stripped, 2006-11-27 16:24:11+02:00, monty@stripped +10 -10
Use my_offsetof instead of offsetof to get rid of 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: nosik.monty.fi
# Root: /home/my/mysql-5.1
--- 1.262/client/mysqldump.c 2006-11-27 16:24:21 +02:00
+++ 1.263/client/mysqldump.c 2006-11-27 16:24:21 +02:00
@@ -1560,8 +1560,8 @@
if the user has EXECUTE privilege he see routine names, but NOT the
routine body of other routines that are not the creator of!
*/
- DBUG_PRINT("info",("length of body for %s row[2] '%s' is %d",
- routine_name, row[2], strlen(row[2])));
+ DBUG_PRINT("info",("length of body for %s row[2] '%s' is %ld",
+ routine_name, row[2], (long) strlen(row[2])));
if (strlen(row[2]))
{
char *query_str= NULL;
--- 1.25/storage/heap/hp_write.c 2006-11-27 16:24:21 +02:00
+++ 1.26/storage/heap/hp_write.c 2006-11-27 16:24:21 +02:00
@@ -68,7 +68,7 @@
DBUG_RETURN(0);
err:
- DBUG_PRINT("info",("Duplicate key: %d", keydef - share->keydef));
+ DBUG_PRINT("info",("Duplicate key: %d", (int) (keydef - share->keydef)));
info->errkey= keydef - share->keydef;
if (keydef->algorithm == HA_KEY_ALG_BTREE)
{
--- 1.15/cmd-line-utils/readline/bind.c 2006-11-27 16:24:21 +02:00
+++ 1.16/cmd-line-utils/readline/bind.c 2006-11-27 16:24:21 +02:00
@@ -735,7 +735,8 @@
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if (file_size != finfo.st_size || file_size + 1 < file_size)
+ if ((long long) file_size != (long long) finfo.st_size ||
+ file_size + 1 < file_size)
{
if (file >= 0)
close (file);
--- 1.9/cmd-line-utils/readline/histfile.c 2006-11-27 16:24:21 +02:00
+++ 1.10/cmd-line-utils/readline/histfile.c 2006-11-27 16:24:21 +02:00
@@ -184,7 +184,8 @@
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if (file_size != finfo.st_size || file_size + 1 < file_size)
+ if ((long long) file_size != (long long) finfo.st_size ||
+ file_size + 1 < file_size)
{
errno = overflow_errno;
goto error_and_exit;
@@ -333,7 +334,8 @@
file_size = (size_t)finfo.st_size;
/* check for overflow on very large files */
- if (file_size != finfo.st_size || file_size + 1 < file_size)
+ if ((long long) file_size != (long long) finfo.st_size ||
+ file_size + 1 < file_size)
{
close (file);
#if defined (EFBIG)
--- 1.192/sql/field.h 2006-11-27 16:24:21 +02:00
+++ 1.193/sql/field.h 2006-11-27 16:24:21 +02:00
@@ -239,7 +239,7 @@
*/
my_size_t last_null_byte() const {
my_size_t bytes= do_last_null_byte();
- DBUG_PRINT("debug", ("last_null_byte() ==> %d", bytes));
+ DBUG_PRINT("debug", ("last_null_byte() ==> %ld", (long) bytes));
DBUG_ASSERT(bytes <= table->s->null_bytes);
return bytes;
}
--- 1.257/sql/log_event.cc 2006-11-27 16:24:21 +02:00
+++ 1.258/sql/log_event.cc 2006-11-27 16:24:21 +02:00
@@ -5376,7 +5376,7 @@
const byte* const ptr_rows_data= var_start + byte_count + 1;
my_size_t const data_size= event_len - (ptr_rows_data - (const byte *) buf);
- DBUG_PRINT("info",("m_table_id: %lu m_flags: %d m_width: %lu data_size: %u",
+ DBUG_PRINT("info",("m_table_id: %lu m_flags: %d m_width: %lu data_size: %lu",
m_table_id, m_flags, m_width, data_size));
m_rows_buf= (byte*)my_malloc(data_size, MYF(MY_WME));
@@ -5416,8 +5416,8 @@
would save binlog space. TODO
*/
DBUG_ENTER("Rows_log_event::do_add_row_data");
- DBUG_PRINT("enter", ("row_data: 0x%lx length: %u", (ulong) row_data,
- length));
+ DBUG_PRINT("enter", ("row_data: 0x%lx length: %lu", (ulong) row_data,
+ (ulong) length));
/*
Don't print debug messages when running valgrind since they can
trigger false warnings.
@@ -5597,7 +5597,8 @@
uint32 const mask= NOT_NULL_FLAG | NO_DEFAULT_VALUE_FLAG;
Field *const f= *field_ptr;
- DBUG_PRINT("info", ("processing column '%s' @ 0x%lx", f->field_name, f->ptr));
+ DBUG_PRINT("info", ("processing column '%s' @ 0x%lx", f->field_name,
+ (long) f->ptr));
if (event_type == WRITE_ROWS_EVENT && (f->flags & mask) == mask)
{
slave_print_msg(ERROR_LEVEL, rli, ER_NO_DEFAULT_FOR_FIELD,
@@ -6121,7 +6122,7 @@
uchar *ptr_after_colcnt= (uchar*) ptr_colcnt;
m_colcnt= net_field_length(&ptr_after_colcnt);
- DBUG_PRINT("info",("m_dblen: %d off: %ld m_tbllen: %d off: %ld m_colcnt: %lu off: %ld",
+ DBUG_PRINT("info",("m_dblen: %lu off: %ld m_tbllen: %lu off: %ld m_colcnt: %lu off: %ld",
m_dblen, (long) (ptr_dblen-(const byte*)vpart),
m_tbllen, (long) (ptr_tbllen-(const byte*)vpart),
m_colcnt, (long) (ptr_colcnt-(const byte*)vpart)));
@@ -6527,10 +6528,10 @@
my_ptrdiff_t master_fields)
{
DBUG_PRINT("info", ("Copying to 0x%lx "
- "from field %ld at offset %u "
+ "from field %ld at offset %lu "
"to field %d at offset %lu",
(long) table->record[0],
- master_fields, master_reclength,
+ master_fields, (ulong) master_reclength,
table->s->fields, table->s->reclength));
/*
Copying the extra fields of the slave that does not exist on
--- 1.13/sql/parse_file.h 2006-11-27 16:24:21 +02:00
+++ 1.14/sql/parse_file.h 2006-11-27 16:24:21 +02:00
@@ -106,21 +106,4 @@
MEM_ROOT *mem_root,
bool bad_format_errors);
};
-
-
-/*
- 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))
-
#endif /* _PARSE_FILE_H_ */
--- 1.111/storage/archive/ha_archive.cc 2006-11-27 16:24:21 +02:00
+++ 1.112/storage/archive/ha_archive.cc 2006-11-27 16:24:21 +02:00
@@ -329,10 +329,12 @@
DBUG_PRINT("ha_archive::read_meta_file", ("Check %d", (uint)meta_buffer[0]));
DBUG_PRINT("ha_archive::read_meta_file", ("Version %d", (uint)meta_buffer[1]));
- DBUG_PRINT("ha_archive::read_meta_file", ("Rows %llu", *rows));
- DBUG_PRINT("ha_archive::read_meta_file", ("Checkpoint %llu", check_point));
- DBUG_PRINT("ha_archive::read_meta_file", ("Auto-Increment %llu", *auto_increment));
- DBUG_PRINT("ha_archive::read_meta_file", ("Forced Flushes %llu", *forced_flushes));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Rows %lu", (ulong) *rows));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Checkpoint %lu", (ulong) check_point));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Auto-Increment %lu",
+ (ulong) *auto_increment));
+ DBUG_PRINT("ha_archive::read_meta_file", ("Forced Flushes %lu",
+ (ulong) *forced_flushes));
DBUG_PRINT("ha_archive::read_meta_file", ("Real Path %s", real_path));
DBUG_PRINT("ha_archive::read_meta_file", ("Dirty %d", (int)(*ptr)));
@@ -385,12 +387,12 @@
(uint)ARCHIVE_CHECK_HEADER));
DBUG_PRINT("ha_archive::write_meta_file", ("Version %d",
(uint)ARCHIVE_VERSION));
- DBUG_PRINT("ha_archive::write_meta_file", ("Rows %llu", (ulonglong)rows));
- DBUG_PRINT("ha_archive::write_meta_file", ("Checkpoint %llu", check_point));
- DBUG_PRINT("ha_archive::write_meta_file", ("Auto Increment %llu",
- auto_increment));
- DBUG_PRINT("ha_archive::write_meta_file", ("Forced Flushes %llu",
- forced_flushes));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Rows %lu", (ulong) rows));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Checkpoint %lu", (ulong) check_point));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Auto Increment %lu",
+ (ulong) auto_increment));
+ DBUG_PRINT("ha_archive::write_meta_file", ("Forced Flushes %lu",
+ (ulong) forced_flushes));
DBUG_PRINT("ha_archive::write_meta_file", ("Real path %s",
real_path));
DBUG_PRINT("ha_archive::write_meta_file", ("Dirty %d", (uint)dirty));
@@ -1057,7 +1059,7 @@
if (scan)
{
scan_rows= share->rows_recorded;
- DBUG_PRINT("info", ("archive will retrieve %llu rows", scan_rows));
+ DBUG_PRINT("info", ("archive will retrieve %lu rows", (ulong) scan_rows));
stats.records= 0;
/*
@@ -1318,7 +1320,7 @@
share->rows_recorded++;
}
}
- DBUG_PRINT("info", ("recovered %llu archive rows", share->rows_recorded));
+ DBUG_PRINT("info", ("recovered %lu archive rows", (ulong) share->rows_recorded));
my_free((char*)buf, MYF(0));
if (rc && rc != HA_ERR_END_OF_FILE)
--- 1.5/sql/sql_binlog.cc 2006-11-27 16:24:21 +02:00
+++ 1.6/sql/sql_binlog.cc 2006-11-27 16:24:21 +02:00
@@ -114,8 +114,8 @@
order to be able to read exactly what is necessary.
*/
- DBUG_PRINT("info",("binlog base64 decoded_len=%d, bytes_decoded=%d",
- decoded_len, bytes_decoded));
+ DBUG_PRINT("info",("binlog base64 decoded_len: %lu bytes_decoded: %d",
+ (ulong) decoded_len, bytes_decoded));
/*
Now we start to read events of the buffer, until there are no
--- 1.32/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp 2006-11-27 16:24:21 +02:00
+++ 1.33/storage/ndb/include/kernel/signaldata/DictTabInfo.hpp 2006-11-27 16:24:21 +02:00
@@ -47,17 +47,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 }
@@ -602,17 +602,17 @@
};
#define DFGIMAP(x, y, z) \
- { DictFilegroupInfo::y, offsetof(x, z), SimpleProperties::Uint32Value, 0, (~0), 0 }
+ { DictFilegroupInfo::y, my_offsetof(x, z), SimpleProperties::Uint32Value, 0, (~0), 0 }
#define DFGIMAP2(x, y, z, u, v) \
- { DictFilegroupInfo::y, offsetof(x, z), SimpleProperties::Uint32Value, u, v, 0 }
+ { DictFilegroupInfo::y, my_offsetof(x, z), SimpleProperties::Uint32Value, u, v, 0 }
#define DFGIMAPS(x, y, z, u, v) \
- { DictFilegroupInfo::y, offsetof(x, z), SimpleProperties::StringValue, u, v, 0 }
+ { DictFilegroupInfo::y, my_offsetof(x, z), SimpleProperties::StringValue, u, v, 0 }
#define DFGIMAPB(x, y, z, u, v, l) \
- { DictFilegroupInfo::y, offsetof(x, z), SimpleProperties::BinaryValue, u, v, \
- offsetof(x, l) }
+ { DictFilegroupInfo::y, my_offsetof(x, z), SimpleProperties::BinaryValue, u, v, \
+ my_offsetof(x, l) }
#define DFGIBREAK(x) \
{ DictFilegroupInfo::x, 0, SimpleProperties::InvalidValue, 0, 0, 0 }
--- 1.3/sql/rpl_utility.cc 2006-11-27 16:24:21 +02:00
+++ 1.4/sql/rpl_utility.cc 2006-11-27 16:24:21 +02:00
@@ -131,7 +131,8 @@
slave_print_msg(ERROR_LEVEL, rli, ER_BINLOG_ROW_WRONG_TABLE_DEF,
"Table width mismatch - "
"received %u columns, %s.%s has %u columns",
- size(), tsh->db.str, tsh->table_name.str, tsh->fields);
+ (uint) size(), tsh->db.str, tsh->table_name.str,
+ tsh->fields);
}
for (uint col= 0 ; col < cols_to_check ; ++col)
--- 1.149/include/my_global.h 2006-11-27 16:24:21 +02:00
+++ 1.150/include/my_global.h 2006-11-27 16:24:21 +02:00
@@ -869,9 +869,8 @@
typedef long long my_ptrdiff_t;
#endif
-#if HAVE_SIZE_T
-typedef size_t my_size_t;
-#elif SIZEOF_CHARP <= SIZEOF_LONG
+/* We can't set my_size_t to size_t as we want my_size_t to be unsigned */
+#if SIZEOF_CHARP <= SIZEOF_LONG
typedef unsigned long my_size_t;
#else
typedef unsigned long long my_size_t;
@@ -885,6 +884,22 @@
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
#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 */
--- 1.248/client/mysqltest.c 2006-11-27 16:24:21 +02:00
+++ 1.249/client/mysqltest.c 2006-11-27 16:24:21 +02:00
@@ -893,8 +893,8 @@
die(NullS);
if (!eval_result && (uint) stat_info.st_size != ds->length)
{
- DBUG_PRINT("info",("Size differs: result size: %u file size: %llu",
- ds->length, stat_info.st_size));
+ DBUG_PRINT("info",("Size differs: result size: %u file size: %lu",
+ ds->length, (ulong) stat_info.st_size));
DBUG_PRINT("info",("result: '%s'", ds->str));
DBUG_RETURN(RESULT_LENGTH_MISMATCH);
}
@@ -3077,14 +3077,14 @@
else if (!strncmp(con_options, "COMPRESS", 8))
con_compress= 1;
else
- die("Illegal option to connect: %.*s", end - con_options, con_options);
+ die("Illegal option to connect: %.*s", (int) (end - con_options), con_options);
/* Process next option */
con_options= end;
}
if (next_con == connections_end)
- die("Connection limit exhausted, you can have max %d connections",
- (sizeof(connections)/sizeof(struct st_connection)));
+ die("Connection limit exhausted, you can have max %ld connections",
+ (long) (sizeof(connections)/sizeof(struct st_connection)));
if (find_connection_by_name(ds_connection_name.str))
die("Connection %s already exists", ds_connection_name.str);
--- 1.37/client/mysqlslap.c 2006-11-27 16:24:21 +02:00
+++ 1.38/client/mysqlslap.c 2006-11-27 16:24:21 +02:00
@@ -592,7 +592,7 @@
DBUG_ENTER("get_random_string");
for (x= RAND_STRING_SIZE; x > 0; x--)
*buf_ptr++= ALPHANUMERICS[random() % ALPHANUMERICS_SIZE];
- DBUG_PRINT("info", ("random string: '%*s'", buf_ptr - buf, buf));
+ DBUG_PRINT("info", ("random string: '%*s'", (int) (buf_ptr - buf), buf));
DBUG_RETURN(buf_ptr - buf);
}
--- 1.34/BUILD/FINISH.sh 2006-11-27 16:24:21 +02:00
+++ 1.35/BUILD/FINISH.sh 2006-11-27 16:24:21 +02:00
@@ -5,7 +5,7 @@
commands="\
$make -k distclean || true
-/bin/rm -rf */.deps/*.P config.cache storage/innobase/config.cache autom4te.cache innobase/autom4te.cache;
+/bin/rm -rf */.deps/*.P configure config.cache storage/*/configure storage/*/config.cache autom4te.cache storage/*/autom4te.cache;
path=`dirname $0`
. \"$path/autorun.sh\""
| Thread |
|---|
| • bk commit into 5.1 tree (monty:1.2370) | monty | 27 Nov |