mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
fix for Valgrind errors: query_id needs to be inited early (already fixed in 5.0 by Konstantin) and so does client_capabilities (not fixed in 5.0);
because they are used by net_printf() and push_warning(), which can be called if check_connection() fails.
This commit is contained in:
@ -3460,7 +3460,6 @@ static int bootstrap(FILE *file)
|
|||||||
|
|
||||||
THD *thd= new THD;
|
THD *thd= new THD;
|
||||||
thd->bootstrap=1;
|
thd->bootstrap=1;
|
||||||
thd->client_capabilities=0;
|
|
||||||
my_net_init(&thd->net,(st_vio*) 0);
|
my_net_init(&thd->net,(st_vio*) 0);
|
||||||
thd->max_client_packet_length= thd->net.max_packet;
|
thd->max_client_packet_length= thd->net.max_packet;
|
||||||
thd->master_access= ~(ulong)0;
|
thd->master_access= ~(ulong)0;
|
||||||
|
@ -67,7 +67,6 @@ static int init_failsafe_rpl_thread(THD* thd)
|
|||||||
*/
|
*/
|
||||||
thd->system_thread = thd->bootstrap = 1;
|
thd->system_thread = thd->bootstrap = 1;
|
||||||
thd->host_or_ip= "";
|
thd->host_or_ip= "";
|
||||||
thd->client_capabilities = 0;
|
|
||||||
my_net_init(&thd->net, 0);
|
my_net_init(&thd->net, 0);
|
||||||
thd->net.read_timeout = slave_net_timeout;
|
thd->net.read_timeout = slave_net_timeout;
|
||||||
thd->max_client_packet_length=thd->net.max_packet;
|
thd->max_client_packet_length=thd->net.max_packet;
|
||||||
|
@ -2617,7 +2617,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
|
|||||||
thd->system_thread = (thd_type == SLAVE_THD_SQL) ?
|
thd->system_thread = (thd_type == SLAVE_THD_SQL) ?
|
||||||
SYSTEM_THREAD_SLAVE_SQL : SYSTEM_THREAD_SLAVE_IO;
|
SYSTEM_THREAD_SLAVE_SQL : SYSTEM_THREAD_SLAVE_IO;
|
||||||
thd->host_or_ip= "";
|
thd->host_or_ip= "";
|
||||||
thd->client_capabilities = 0;
|
|
||||||
my_net_init(&thd->net, 0);
|
my_net_init(&thd->net, 0);
|
||||||
thd->net.read_timeout = slave_net_timeout;
|
thd->net.read_timeout = slave_net_timeout;
|
||||||
thd->master_access= ~(ulong)0;
|
thd->master_access= ~(ulong)0;
|
||||||
|
@ -186,6 +186,7 @@ THD::THD()
|
|||||||
variables.pseudo_thread_id= 0;
|
variables.pseudo_thread_id= 0;
|
||||||
one_shot_set= 0;
|
one_shot_set= 0;
|
||||||
file_id = 0;
|
file_id = 0;
|
||||||
|
query_id= 0;
|
||||||
warn_id= 0;
|
warn_id= 0;
|
||||||
db_charset= global_system_variables.collation_database;
|
db_charset= global_system_variables.collation_database;
|
||||||
mysys_var=0;
|
mysys_var=0;
|
||||||
@ -196,6 +197,7 @@ THD::THD()
|
|||||||
net.vio=0;
|
net.vio=0;
|
||||||
#endif
|
#endif
|
||||||
net.last_error[0]=0; // If error on boot
|
net.last_error[0]=0; // If error on boot
|
||||||
|
client_capabilities= 0; // minimalistic client
|
||||||
ull=0;
|
ull=0;
|
||||||
system_thread=cleanup_done=0;
|
system_thread=cleanup_done=0;
|
||||||
peer_port= 0; // For SHOW PROCESSLIST
|
peer_port= 0; // For SHOW PROCESSLIST
|
||||||
|
Reference in New Issue
Block a user