diff options
author | unknown <guilhem@mysql.com> | 2005-10-14 15:34:52 +0200 |
---|---|---|
committer | unknown <guilhem@mysql.com> | 2005-10-14 15:34:52 +0200 |
commit | 5dfd72a038b85670c35270db7d1417dc5e7f3464 (patch) | |
tree | 53f7e9af374c43bd67783e388f26d08ee8a79640 /sql | |
parent | 9cc7d75ea3acf8cf2f2491e8740d48f83cf0c47b (diff) | |
download | mariadb-git-5dfd72a038b85670c35270db7d1417dc5e7f3464.tar.gz |
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.
sql/mysqld.cc:
not needed anymore
sql/repl_failsafe.cc:
not needed anymore
sql/slave.cc:
not needed anymore
sql/sql_class.cc:
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 may be called if check_connection() fails.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/mysqld.cc | 1 | ||||
-rw-r--r-- | sql/repl_failsafe.cc | 1 | ||||
-rw-r--r-- | sql/slave.cc | 1 | ||||
-rw-r--r-- | sql/sql_class.cc | 2 |
4 files changed, 2 insertions, 3 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index bb5402de3fd..e1e87652255 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -3460,7 +3460,6 @@ static int bootstrap(FILE *file) THD *thd= new THD; thd->bootstrap=1; - thd->client_capabilities=0; my_net_init(&thd->net,(st_vio*) 0); thd->max_client_packet_length= thd->net.max_packet; thd->master_access= ~(ulong)0; diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index 2d8e8a5bf81..61fd5d9bce4 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -67,7 +67,6 @@ static int init_failsafe_rpl_thread(THD* thd) */ thd->system_thread = thd->bootstrap = 1; thd->host_or_ip= ""; - thd->client_capabilities = 0; my_net_init(&thd->net, 0); thd->net.read_timeout = slave_net_timeout; thd->max_client_packet_length=thd->net.max_packet; diff --git a/sql/slave.cc b/sql/slave.cc index 2fc4eef0f64..b2862a437bb 100644 --- a/sql/slave.cc +++ b/sql/slave.cc @@ -2617,7 +2617,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type) thd->system_thread = (thd_type == SLAVE_THD_SQL) ? SYSTEM_THREAD_SLAVE_SQL : SYSTEM_THREAD_SLAVE_IO; thd->host_or_ip= ""; - thd->client_capabilities = 0; my_net_init(&thd->net, 0); thd->net.read_timeout = slave_net_timeout; thd->master_access= ~(ulong)0; diff --git a/sql/sql_class.cc b/sql/sql_class.cc index 11b45b848c8..947da6b10d6 100644 --- a/sql/sql_class.cc +++ b/sql/sql_class.cc @@ -186,6 +186,7 @@ THD::THD() variables.pseudo_thread_id= 0; one_shot_set= 0; file_id = 0; + query_id= 0; warn_id= 0; db_charset= global_system_variables.collation_database; mysys_var=0; @@ -196,6 +197,7 @@ THD::THD() net.vio=0; #endif net.last_error[0]=0; // If error on boot + client_capabilities= 0; // minimalistic client ull=0; system_thread=cleanup_done=0; peer_port= 0; // For SHOW PROCESSLIST |