mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
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.
This commit is contained in:
@ -551,7 +551,7 @@ char *thd_get_error_context_description(THD *thd, char *buffer,
|
||||
const char *proc_info= thd->proc_info;
|
||||
|
||||
len= my_snprintf(header, sizeof(header),
|
||||
"MySQL thread id %lu, OS thread handle 0x%lx, query id %lu",
|
||||
"MySQL thread id %lu, OS thread handle %lu, query id %lu",
|
||||
thd->thread_id, (ulong) thd->real_id, (ulong) thd->query_id);
|
||||
str.length(0);
|
||||
str.append(header, len);
|
||||
@ -915,7 +915,7 @@ THD::THD(my_thread_id id, bool is_wsrep_applier)
|
||||
by adding the address of the stack.
|
||||
*/
|
||||
tmp= (ulong) (my_rnd(&sql_rand) * 0xffffffff);
|
||||
my_rnd_init(&rand, tmp + (ulong) &rand, tmp + (ulong) ::global_query_id);
|
||||
my_rnd_init(&rand, tmp + (ulong)((size_t) &rand), tmp + (ulong) ::global_query_id);
|
||||
substitute_null_with_insert_id = FALSE;
|
||||
lock_info.mysql_thd= (void *)this;
|
||||
|
||||
@ -3537,7 +3537,7 @@ void Query_arena::free_items()
|
||||
{
|
||||
next= free_list->next;
|
||||
DBUG_ASSERT(free_list != next);
|
||||
DBUG_PRINT("info", ("free item: 0x%lx", (ulong) free_list));
|
||||
DBUG_PRINT("info", ("free item: %p", free_list));
|
||||
free_list->delete_self();
|
||||
}
|
||||
/* Postcondition: free_list is 0 */
|
||||
@ -3987,7 +3987,7 @@ int select_materialize_with_stats::send_data(List<Item> &items)
|
||||
void TMP_TABLE_PARAM::init()
|
||||
{
|
||||
DBUG_ENTER("TMP_TABLE_PARAM::init");
|
||||
DBUG_PRINT("enter", ("this: 0x%lx", (ulong)this));
|
||||
DBUG_PRINT("enter", ("this: %p", this));
|
||||
field_count= sum_func_count= func_count= hidden_field_count= 0;
|
||||
group_parts= group_length= group_null_parts= 0;
|
||||
quick_group= 1;
|
||||
|
Reference in New Issue
Block a user