summaryrefslogtreecommitdiff
path: root/storage/myisammrg
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2017-09-19 17:45:17 +0000
committerVladislav Vaintroub <wlad@mariadb.com>2017-09-28 17:20:46 +0000
commiteba44874ca9fc317696630cb371623142289fa99 (patch)
treef67cd5dbcaf102abef2fb26f76357d14feaded04 /storage/myisammrg
parentde7c2e5e545df90fc9814c60a8a5a8d20f22b2c3 (diff)
downloadmariadb-git-eba44874ca9fc317696630cb371623142289fa99.tar.gz
MDEV-13844 : Fix Windows warnings. Fix DBUG_PRINT.
- Fix win64 pointer truncation warnings (usually coming from misusing 0x%lx and long cast in DBUG) - Also fix printf-format warnings Make the above mentioned warnings fatal. - fix pthread_join on Windows to set return value.
Diffstat (limited to 'storage/myisammrg')
-rw-r--r--storage/myisammrg/ha_myisammrg.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/storage/myisammrg/ha_myisammrg.cc b/storage/myisammrg/ha_myisammrg.cc
index 3d91aa67793..93b6e08eda8 100644
--- a/storage/myisammrg/ha_myisammrg.cc
+++ b/storage/myisammrg/ha_myisammrg.cc
@@ -359,7 +359,7 @@ int ha_myisammrg::open(const char *name, int mode __attribute__((unused)),
uint test_if_locked_arg)
{
DBUG_ENTER("ha_myisammrg::open");
- DBUG_PRINT("myrg", ("name: '%s' table: 0x%lx", name, (long) table));
+ DBUG_PRINT("myrg", ("name: '%s' table: %p", name, table));
DBUG_PRINT("myrg", ("test_if_locked_arg: %u", test_if_locked_arg));
/* Must not be used when table is open. */
@@ -413,8 +413,8 @@ int ha_myisammrg::open(const char *name, int mode __attribute__((unused)),
DBUG_RETURN(my_errno ? my_errno : -1);
/* purecov: end */
}
- DBUG_PRINT("myrg", ("MYRG_INFO: 0x%lx child tables: %u",
- (long) file, file->tables));
+ DBUG_PRINT("myrg", ("MYRG_INFO: %p child tables: %u",
+ file, file->tables));
DBUG_RETURN(0);
}
@@ -440,8 +440,8 @@ int ha_myisammrg::add_children_list(void)
List_iterator_fast<Mrg_child_def> it(child_def_list);
Mrg_child_def *mrg_child_def;
DBUG_ENTER("ha_myisammrg::add_children_list");
- DBUG_PRINT("myrg", ("table: '%s'.'%s' 0x%lx", this->table->s->db.str,
- this->table->s->table_name.str, (long) this->table));
+ DBUG_PRINT("myrg", ("table: '%s'.'%s' %p", this->table->s->db.str,
+ this->table->s->table_name.str, this->table));
/* Must call this with open table. */
DBUG_ASSERT(this->file);
@@ -699,12 +699,12 @@ extern "C" MI_INFO *myisammrg_attach_children_callback(void *callback_param)
if ((child->file->ht->db_type != DB_TYPE_MYISAM) ||
!(myisam= ((ha_myisam*) child->file)->file_ptr()))
{
- DBUG_PRINT("error", ("no MyISAM handle for child table: '%s'.'%s' 0x%lx",
+ DBUG_PRINT("error", ("no MyISAM handle for child table: '%s'.'%s' %p",
child->s->db.str, child->s->table_name.str,
- (long) child));
+ child));
}
- DBUG_PRINT("myrg", ("MyISAM handle: 0x%lx", (long) myisam));
+ DBUG_PRINT("myrg", ("MyISAM handle: %p", myisam));
end:
@@ -810,8 +810,8 @@ int ha_myisammrg::attach_children(void)
int error;
Mrg_attach_children_callback_param param(parent_l, this->children_l, child_def_list);
DBUG_ENTER("ha_myisammrg::attach_children");
- DBUG_PRINT("myrg", ("table: '%s'.'%s' 0x%lx", table->s->db.str,
- table->s->table_name.str, (long) table));
+ DBUG_PRINT("myrg", ("table: '%s'.'%s' %p", table->s->db.str,
+ table->s->table_name.str, table));
DBUG_PRINT("myrg", ("test_if_locked: %u", this->test_if_locked));
/* Must call this with open table. */