1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fixed a lot of compiler warnings and errors detected by Forte C++ on Solaris

Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db

I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read()      -> index_read_map()
index_read_idx()  -> index_read_idx_map()
index_read_last() -> index_read_last_map()
This commit is contained in:
monty@mysql.com/nosik.monty.fi
2007-08-13 16:11:25 +03:00
parent 113cd2d064
commit e53a73e26c
131 changed files with 1109 additions and 884 deletions

View File

@ -2704,14 +2704,17 @@ void THD::restore_sub_statement_state(Sub_statement_state *backup)
pthread_mutex_t LOCK_xid_cache;
HASH xid_cache;
static uchar *xid_get_hash_key(const uchar *ptr, size_t *length,
extern "C" uchar *xid_get_hash_key(const uchar *, size_t *, my_bool);
extern "C" void xid_free_hash(void *);
uchar *xid_get_hash_key(const uchar *ptr, size_t *length,
my_bool not_used __attribute__((unused)))
{
*length=((XID_STATE*)ptr)->xid.key_length();
return ((XID_STATE*)ptr)->xid.key();
}
static void xid_free_hash (void *ptr)
void xid_free_hash(void *ptr)
{
if (!((XID_STATE*)ptr)->in_thd)
my_free((uchar*)ptr, MYF(0));
@ -3245,13 +3248,13 @@ int THD::binlog_flush_pending_rows_event(bool stmt_end)
RETURN VALUE
Error code, or 0 if no error.
*/
int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query,
int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query_arg,
ulong query_len, bool is_trans, bool suppress_use,
THD::killed_state killed_status_arg)
{
DBUG_ENTER("THD::binlog_query");
DBUG_PRINT("enter", ("qtype=%d, query='%s'", qtype, query));
DBUG_ASSERT(query && mysql_bin_log.is_open());
DBUG_PRINT("enter", ("qtype: %d query: '%s'", qtype, query_arg));
DBUG_ASSERT(query_arg && mysql_bin_log.is_open());
/*
If we are not in prelocked mode, mysql_unlock_tables() will be
@ -3307,7 +3310,7 @@ int THD::binlog_query(THD::enum_binlog_query_type qtype, char const *query,
flush the pending rows event if necessary.
*/
{
Query_log_event qinfo(this, query, query_len, is_trans, suppress_use,
Query_log_event qinfo(this, query_arg, query_len, is_trans, suppress_use,
killed_status_arg);
qinfo.flags|= LOG_EVENT_UPDATE_TABLE_MAP_VERSION_F;
/*