summaryrefslogtreecommitdiff
path: root/sql/sql_show.cc
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-10-16 13:29:42 +0300
committerGeorgi Kodinov <joro@sun.com>2009-10-16 13:29:42 +0300
commit8f6f3dba21272158d13cb49e99274167af1461ad (patch)
tree4a635fd50a6abdd9b0c814cb889d2996fc60eb3e /sql/sql_show.cc
parent9c76415a03a92d19d3d73b0c6e776c89f7863e5e (diff)
downloadmariadb-git-8f6f3dba21272158d13cb49e99274167af1461ad.tar.gz
Bug #40877: multi statement execution fails in 5.1.30
Implemented the server infrastructure for the fix: 1. Added a function LEX_STRING *thd_query_string(THD) to return a LEX_STRING structure instead of char *. This is the function that must be called in innodb instead of thd_query() 2. Did some encapsulation in THD : aggregated thd_query and thd_query_length into a LEX_STRING and made accessor and mutator methods for easy code updating. 3. Updated the server code to use the new methods where applicable.
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r--sql/sql_show.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index 75c9ea6c524..2c1f360104b 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -1864,10 +1864,10 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
thd_info->query=0;
/* Lock THD mutex that protects its data when looking at it. */
pthread_mutex_lock(&tmp->LOCK_thd_data);
- if (tmp->query)
+ if (tmp->query())
{
- uint length= min(max_query_length, tmp->query_length);
- thd_info->query=(char*) thd->strmake(tmp->query,length);
+ uint length= min(max_query_length, tmp->query_length());
+ thd_info->query= (char*) thd->strmake(tmp->query(),length);
}
pthread_mutex_unlock(&tmp->LOCK_thd_data);
thread_infos.append(thd_info);
@@ -1992,11 +1992,11 @@ int fill_schema_processlist(THD* thd, TABLE_LIST* tables, COND* cond)
pthread_mutex_unlock(&mysys_var->mutex);
/* INFO */
- if (tmp->query)
+ if (tmp->query())
{
- table->field[7]->store(tmp->query,
+ table->field[7]->store(tmp->query(),
min(PROCESS_LIST_INFO_WIDTH,
- tmp->query_length), cs);
+ tmp->query_length()), cs);
table->field[7]->set_notnull();
}