@@ -108,7 +108,7 @@ void mysql_audit_general_log(THD *thd, time_t time,
108
108
109
109
if (thd )
110
110
{
111
- event .general_thread_id = thd -> thread_id ;
111
+ event .general_thread_id = ( unsigned long ) thd -> thread_id ;
112
112
event .general_charset = thd -> variables .character_set_client ;
113
113
event .database = thd -> db ;
114
114
event .database_length = thd -> db_length ;
@@ -158,7 +158,7 @@ void mysql_audit_general(THD *thd, uint event_subtype,
158
158
{
159
159
event .general_user = user_buff ;
160
160
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 ;
162
162
event .general_query = thd -> query_string .str ();
163
163
event .general_query_length = thd -> query_string .length ();
164
164
event .general_charset = thd -> query_string .charset ();
@@ -194,7 +194,7 @@ void mysql_audit_notify_connection_connect(THD *thd)
194
194
event .event_subclass = MYSQL_AUDIT_CONNECTION_CONNECT ;
195
195
event .status = thd -> get_stmt_da ()-> is_error () ?
196
196
thd -> get_stmt_da ()-> sql_errno () : 0 ;
197
- event .thread_id = thd -> thread_id ;
197
+ event .thread_id = ( unsigned long ) thd -> thread_id ;
198
198
event .user = sctx -> user ;
199
199
event .user_length = safe_strlen (sctx -> user );
200
200
event .priv_user = sctx -> priv_user ;
@@ -224,7 +224,7 @@ void mysql_audit_notify_connection_disconnect(THD *thd, int errcode)
224
224
225
225
event .event_subclass = MYSQL_AUDIT_CONNECTION_DISCONNECT ;
226
226
event .status = errcode ;
227
- event .thread_id = thd -> thread_id ;
227
+ event .thread_id = ( unsigned long ) thd -> thread_id ;
228
228
event .user = sctx -> user ;
229
229
event .user_length = safe_strlen (sctx -> user );
230
230
event .priv_user = sctx -> priv_user ;
@@ -255,7 +255,7 @@ void mysql_audit_notify_connection_change_user(THD *thd)
255
255
event .event_subclass = MYSQL_AUDIT_CONNECTION_CHANGE_USER ;
256
256
event .status = thd -> get_stmt_da ()-> is_error () ?
257
257
thd -> get_stmt_da ()-> sql_errno () : 0 ;
258
- event .thread_id = thd -> thread_id ;
258
+ event .thread_id = ( unsigned long ) thd -> thread_id ;
259
259
event .user = sctx -> user ;
260
260
event .user_length = safe_strlen (sctx -> user );
261
261
event .priv_user = sctx -> priv_user ;
@@ -285,7 +285,7 @@ void mysql_audit_external_lock(THD *thd, TABLE_SHARE *share, int lock)
285
285
286
286
event .event_subclass = MYSQL_AUDIT_TABLE_LOCK ;
287
287
event .read_only = lock == F_RDLCK ;
288
- event .thread_id = thd -> thread_id ;
288
+ event .thread_id = ( unsigned long ) thd -> thread_id ;
289
289
event .user = sctx -> user ;
290
290
event .priv_user = sctx -> priv_user ;
291
291
event .priv_host = sctx -> priv_host ;
@@ -319,7 +319,7 @@ void mysql_audit_create_table(TABLE *table)
319
319
320
320
event .event_subclass = MYSQL_AUDIT_TABLE_CREATE ;
321
321
event .read_only = 0 ;
322
- event .thread_id = thd -> thread_id ;
322
+ event .thread_id = ( unsigned long ) thd -> thread_id ;
323
323
event .user = sctx -> user ;
324
324
event .priv_user = sctx -> priv_user ;
325
325
event .priv_host = sctx -> priv_host ;
@@ -351,7 +351,7 @@ void mysql_audit_drop_table(THD *thd, TABLE_LIST *table)
351
351
352
352
event .event_subclass = MYSQL_AUDIT_TABLE_DROP ;
353
353
event .read_only = 0 ;
354
- event .thread_id = thd -> thread_id ;
354
+ event .thread_id = ( unsigned long ) thd -> thread_id ;
355
355
event .user = sctx -> user ;
356
356
event .priv_user = sctx -> priv_user ;
357
357
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,
384
384
385
385
event .event_subclass = MYSQL_AUDIT_TABLE_RENAME ;
386
386
event .read_only = 0 ;
387
- event .thread_id = thd -> thread_id ;
387
+ event .thread_id = ( unsigned long ) thd -> thread_id ;
388
388
event .user = sctx -> user ;
389
389
event .priv_user = sctx -> priv_user ;
390
390
event .priv_host = sctx -> priv_host ;
@@ -416,7 +416,7 @@ void mysql_audit_alter_table(THD *thd, TABLE_LIST *table)
416
416
417
417
event .event_subclass = MYSQL_AUDIT_TABLE_ALTER ;
418
418
event .read_only = 0 ;
419
- event .thread_id = thd -> thread_id ;
419
+ event .thread_id = ( unsigned long ) thd -> thread_id ;
420
420
event .user = sctx -> user ;
421
421
event .priv_user = sctx -> priv_user ;
422
422
event .priv_host = sctx -> priv_host ;
0 commit comments