summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2003-02-28 14:33:10 +0200
committermonty@narttu.mysql.fi <>2003-02-28 14:33:10 +0200
commit959e1428dabe4af8330b0abbfa1ef278a99d8f36 (patch)
tree07d664d95954d0dd9492864f34b32bd92d47936a /sql
parent3503d4797b3701aaa29329fc470ea8a03409f10e (diff)
parent9147f8b522885f299ed2829cc66286595a9e59bb (diff)
downloadmariadb-git-959e1428dabe4af8330b0abbfa1ef278a99d8f36.tar.gz
Merge work:/my/mysql-4.1 into narttu.mysql.fi:/my/mysql-4.1
Diffstat (limited to 'sql')
-rw-r--r--sql/log_event.cc4
-rw-r--r--sql/mysqld.cc2
-rw-r--r--sql/repl_failsafe.cc2
-rw-r--r--sql/slave.cc2
-rw-r--r--sql/sql_class.cc2
-rw-r--r--sql/sql_insert.cc1
-rw-r--r--sql/sql_show.cc5
7 files changed, 9 insertions, 9 deletions
diff --git a/sql/log_event.cc b/sql/log_event.cc
index 36d4b16225a..a1cb144a894 100644
--- a/sql/log_event.cc
+++ b/sql/log_event.cc
@@ -1937,14 +1937,14 @@ int Rand_log_event::write_data(IO_CACHE* file)
#ifdef MYSQL_CLIENT
void Rand_log_event::print(FILE* file, bool short_form, char* last_db)
{
- char llbuff[22];
+ char llbuff[22],llbuff2[22];
if (!short_form)
{
print_header(file);
fprintf(file, "\tRand\n");
}
fprintf(file, "SET @@RAND_SEED1=%s, @@RAND_SEED2=%s;\n",
- llstr(seed1, llbuff),llstr(seed2, llbuff));
+ llstr(seed1, llbuff),llstr(seed2, llbuff2));
fflush(file);
}
#endif // MYSQL_CLIENT
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index d2ce0768cfb..ce87a8c15ac 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -2352,6 +2352,7 @@ int main(int argc, char **argv)
if (init_thread_environment())
unireg_abort(1);
pthread_attr_setstacksize(&connection_attrib,thread_stack);
+#ifdef HAVE_PTHREAD_ATTR_GETSTACKSIZE
{
/* Retrieve used stack size; Needed for checking stack overflows */
size_t stack_size;
@@ -2363,6 +2364,7 @@ int main(int argc, char **argv)
thread_stack= stack_size;
}
}
+#endif
(void) thr_setconcurrency(concurrency); // 10 by default
select_thread=pthread_self();
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 9a7fb2282f4..3991d9f21f1 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -59,13 +59,13 @@ static int init_failsafe_rpl_thread(THD* thd)
{
DBUG_ENTER("init_failsafe_rpl_thread");
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;
thd->master_access= ~0;
thd->priv_user = 0;
- thd->system_thread = 1;
pthread_mutex_lock(&LOCK_thread_count);
thd->thread_id = thread_id++;
pthread_mutex_unlock(&LOCK_thread_count);
diff --git a/sql/slave.cc b/sql/slave.cc
index 4b6ebfab5c8..ce6c7702e3c 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -1863,6 +1863,7 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
{
DBUG_ENTER("init_slave_thread");
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;
@@ -1870,7 +1871,6 @@ static int init_slave_thread(THD* thd, SLAVE_THD_TYPE thd_type)
thd->priv_user = 0;
thd->slave_thread = 1;
thd->options = (((opt_log_slave_updates) ? OPTION_BIN_LOG:0) | OPTION_AUTO_IS_NULL) ;
- thd->system_thread = 1;
thd->client_capabilities = CLIENT_LOCAL_FILES;
thd->real_id=pthread_self();
pthread_mutex_lock(&LOCK_thread_count);
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 23a8a6fa8f1..d215db8736a 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -83,7 +83,7 @@ THD::THD():user_time(0), is_fatal_error(0),
global_read_lock(0), bootstrap(0)
{
host=user=priv_user=db=query=ip=0;
- host_or_ip="unknown ip";
+ host_or_ip= "connecting host";
locked=killed=count_cuted_fields=some_tables_deleted=no_errors=password=
query_start_used=prepare_command=0;
db_length=query_length=col_access=0;
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 0a06822d36e..9ca51ebc053 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -588,6 +588,7 @@ public:
bzero((char*) &thd.net,sizeof(thd.net)); // Safety
thd.system_thread=1;
+ thd.host_or_ip= "";
bzero((char*) &info,sizeof(info));
pthread_mutex_init(&mutex,MY_MUTEX_INIT_FAST);
pthread_cond_init(&cond,NULL);
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 41c137011d2..fd7127bcd00 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1326,10 +1326,7 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
thd_info->user=thd->strdup(tmp->user ? tmp->user :
(tmp->system_thread ?
"system user" : "unauthenticated user"));
- thd_info->host=thd->strdup(tmp->host ? tmp->host :
- (tmp->ip ? tmp->ip :
- (tmp->system_thread ? "none" :
- "connecting host")));
+ thd_info->host= thd->strdup(tmp->host_or_ip);
if ((thd_info->db=tmp->db)) // Safe test
thd_info->db=thd->strdup(thd_info->db);
thd_info->command=(int) tmp->command;