Skip to content

Commit 0aeaff3

Browse files
takaidohigasiclaude
andcommitted
Fix thread variable linking errors
Define mysql_thread___eventslog_file_rotation_mode and mysql_thread___auditlog_file_rotation_mode directly in MySQL_Thread.cpp to resolve undefined reference linker errors. The variables were declared but not defined, causing linking failures during compilation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 58576b4 commit 0aeaff3

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

include/proxysql_structs.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,12 +1318,10 @@ __thread int mysql_thread___eventslog_buffer_max_query_length;
13181318
__thread int mysql_thread___eventslog_default_log;
13191319
__thread int mysql_thread___eventslog_format;
13201320
__thread int mysql_thread___eventslog_stmt_parameters;
1321-
__thread char * mysql_thread___eventslog_file_rotation_mode;
13221321

13231322
/* variables used by audit log */
13241323
__thread char * mysql_thread___auditlog_filename;
13251324
__thread int mysql_thread___auditlog_filesize;
1326-
__thread char * mysql_thread___auditlog_file_rotation_mode;
13271325

13281326
/* variables used by the monitoring module */
13291327
__thread int mysql_thread___monitor_enabled;

lib/MySQL_Thread.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,10 @@ extern "C" {
197197

198198
__thread unsigned int __thread_MySQL_Thread_Variables_version;
199199

200+
// Thread variables for rotation mode functionality
201+
__thread char * mysql_thread___eventslog_file_rotation_mode;
202+
__thread char * mysql_thread___auditlog_file_rotation_mode;
203+
200204
volatile static unsigned int __global_MySQL_Thread_Variables_version;
201205

202206

0 commit comments

Comments
 (0)