summaryrefslogtreecommitdiff
path: root/sql/sql_cache.cc
diff options
context:
space:
mode:
authorIgnacio Galarza <iggy@mysql.com>2009-02-10 17:47:54 -0500
committerIgnacio Galarza <iggy@mysql.com>2009-02-10 17:47:54 -0500
commit2b85c64d65385297f4a90265ae47cb298891dd5f (patch)
tree6d7f0073845344099159d82b6dfe2e017670b700 /sql/sql_cache.cc
parent1a7b0ec920bb496019dbbddfabd463f498af34c6 (diff)
downloadmariadb-git-2b85c64d65385297f4a90265ae47cb298891dd5f.tar.gz
Bug#29125 Windows Server X64: so many compiler warnings
- Remove bothersome warning messages. This change focuses on the warnings that are covered by the ignore file: support-files/compiler_warnings.supp. - Strings are guaranteed to be max uint in length
Diffstat (limited to 'sql/sql_cache.cc')
-rw-r--r--sql/sql_cache.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_cache.cc b/sql/sql_cache.cc
index b55fa148e24..fe3f0a09670 100644
--- a/sql/sql_cache.cc
+++ b/sql/sql_cache.cc
@@ -3126,7 +3126,7 @@ Query_cache::process_and_count_tables(THD *thd, TABLE_LIST *tables_used,
{
ha_myisammrg *handler = (ha_myisammrg *)tables_used->table->file;
MYRG_INFO *file = handler->myrg_info();
- table_count+= (file->end_table - file->open_tables);
+ table_count+= (uint) (file->end_table - file->open_tables);
}
}
}
@@ -3313,7 +3313,7 @@ my_bool Query_cache::move_by_type(byte **border,
*pprev = block->pprev,
*pnext = block->pnext,
*new_block =(Query_cache_block *) *border;
- uint tablename_offset = block->table()->table() - block->table()->db();
+ size_t tablename_offset= block->table()->table() - block->table()->db();
char *data = (char*) block->data();
byte *key;
uint key_length;
@@ -3625,7 +3625,7 @@ uint Query_cache::filename_2_table_key (char *key, const char *path,
filename= tablename + dirname_length(tablename + 2) + 2;
/* Find start of databasename */
for (dbname= filename - 2 ; dbname[-1] != FN_LIBCHAR ; dbname--) ;
- *db_length= (filename - dbname) - 1;
+ *db_length= (uint) ((filename - dbname) - 1);
DBUG_PRINT("qcache", ("table '%-.*s.%s'", *db_length, dbname, filename));
DBUG_RETURN((uint) (strmov(strmake(key, dbname, *db_length) + 1,
@@ -3934,8 +3934,8 @@ my_bool Query_cache::check_integrity(bool locked)
}
else
{
- int idx = (((byte*)bin) - ((byte*)bins)) /
- sizeof(Query_cache_memory_bin);
+ int idx = (int) ((((byte*)bin) - ((byte*)bins)) /
+ sizeof(Query_cache_memory_bin));
if (in_list(bins[idx].free_blocks, block, "free memory"))
result = 1;
}