Skip to content

Commit 6950f83

Browse files
committed
fix most annoying warnings on Windows
1 parent 642978c commit 6950f83

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

sql/field.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3753,7 +3753,7 @@ class Column_definition: public Sql_alloc
37533753
const char *field_name_arg) const
37543754
{
37553755
return ::make_field(share, mem_root, ptr,
3756-
length, null_pos, null_bit,
3756+
(uint32)length, null_pos, null_bit,
37573757
pack_flag, sql_type, charset,
37583758
geom_type, srid, unireg_check, interval,
37593759
field_name_arg);

sql/sql_audit.h

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ void mysql_audit_general_log(THD *thd, time_t time,
108108

109109
if (thd)
110110
{
111-
event.general_thread_id= thd->thread_id;
111+
event.general_thread_id= (unsigned long)thd->thread_id;
112112
event.general_charset= thd->variables.character_set_client;
113113
event.database= thd->db;
114114
event.database_length= thd->db_length;
@@ -158,7 +158,7 @@ void mysql_audit_general(THD *thd, uint event_subtype,
158158
{
159159
event.general_user= user_buff;
160160
event.general_user_length= make_user_name(thd, user_buff);
161-
event.general_thread_id= thd->thread_id;
161+
event.general_thread_id= (unsigned long)thd->thread_id;
162162
event.general_query= thd->query_string.str();
163163
event.general_query_length= thd->query_string.length();
164164
event.general_charset= thd->query_string.charset();
@@ -194,7 +194,7 @@ void mysql_audit_notify_connection_connect(THD *thd)
194194
event.event_subclass= MYSQL_AUDIT_CONNECTION_CONNECT;
195195
event.status= thd->get_stmt_da()->is_error() ?
196196
thd->get_stmt_da()->sql_errno() : 0;
197-
event.thread_id= thd->thread_id;
197+
event.thread_id= (unsigned long)thd->thread_id;
198198
event.user= sctx->user;
199199
event.user_length= safe_strlen(sctx->user);
200200
event.priv_user= sctx->priv_user;
@@ -224,7 +224,7 @@ void mysql_audit_notify_connection_disconnect(THD *thd, int errcode)
224224

225225
event.event_subclass= MYSQL_AUDIT_CONNECTION_DISCONNECT;
226226
event.status= errcode;
227-
event.thread_id= thd->thread_id;
227+
event.thread_id= (unsigned long)thd->thread_id;
228228
event.user= sctx->user;
229229
event.user_length= safe_strlen(sctx->user);
230230
event.priv_user= sctx->priv_user;
@@ -255,7 +255,7 @@ void mysql_audit_notify_connection_change_user(THD *thd)
255255
event.event_subclass= MYSQL_AUDIT_CONNECTION_CHANGE_USER;
256256
event.status= thd->get_stmt_da()->is_error() ?
257257
thd->get_stmt_da()->sql_errno() : 0;
258-
event.thread_id= thd->thread_id;
258+
event.thread_id= (unsigned long)thd->thread_id;
259259
event.user= sctx->user;
260260
event.user_length= safe_strlen(sctx->user);
261261
event.priv_user= sctx->priv_user;
@@ -285,7 +285,7 @@ void mysql_audit_external_lock(THD *thd, TABLE_SHARE *share, int lock)
285285

286286
event.event_subclass= MYSQL_AUDIT_TABLE_LOCK;
287287
event.read_only= lock == F_RDLCK;
288-
event.thread_id= thd->thread_id;
288+
event.thread_id= (unsigned long)thd->thread_id;
289289
event.user= sctx->user;
290290
event.priv_user= sctx->priv_user;
291291
event.priv_host= sctx->priv_host;
@@ -319,7 +319,7 @@ void mysql_audit_create_table(TABLE *table)
319319

320320
event.event_subclass= MYSQL_AUDIT_TABLE_CREATE;
321321
event.read_only= 0;
322-
event.thread_id= thd->thread_id;
322+
event.thread_id= (unsigned long)thd->thread_id;
323323
event.user= sctx->user;
324324
event.priv_user= sctx->priv_user;
325325
event.priv_host= sctx->priv_host;
@@ -351,7 +351,7 @@ void mysql_audit_drop_table(THD *thd, TABLE_LIST *table)
351351

352352
event.event_subclass= MYSQL_AUDIT_TABLE_DROP;
353353
event.read_only= 0;
354-
event.thread_id= thd->thread_id;
354+
event.thread_id= (unsigned long)thd->thread_id;
355355
event.user= sctx->user;
356356
event.priv_user= sctx->priv_user;
357357
event.priv_host= sctx->priv_host;
@@ -384,7 +384,7 @@ void mysql_audit_rename_table(THD *thd, const char *old_db, const char *old_tb,
384384

385385
event.event_subclass= MYSQL_AUDIT_TABLE_RENAME;
386386
event.read_only= 0;
387-
event.thread_id= thd->thread_id;
387+
event.thread_id= (unsigned long)thd->thread_id;
388388
event.user= sctx->user;
389389
event.priv_user= sctx->priv_user;
390390
event.priv_host= sctx->priv_host;
@@ -416,7 +416,7 @@ void mysql_audit_alter_table(THD *thd, TABLE_LIST *table)
416416

417417
event.event_subclass= MYSQL_AUDIT_TABLE_ALTER;
418418
event.read_only= 0;
419-
event.thread_id= thd->thread_id;
419+
event.thread_id= (unsigned long)thd->thread_id;
420420
event.user= sctx->user;
421421
event.priv_user= sctx->priv_user;
422422
event.priv_host= sctx->priv_host;

0 commit comments

Comments
 (0)