diff options
author | unknown <monty@mysql.com> | 2004-05-17 01:52:13 +0300 |
---|---|---|
committer | unknown <monty@mysql.com> | 2004-05-17 01:52:13 +0300 |
commit | a495f76c8eed91414d321cc7536d46d1bf7bcfee (patch) | |
tree | b9fa88577b516df5fb27de3970ec9eab9aaef532 /sql/sql_show.cc | |
parent | 8ef62cc1ef3e2b16795fa5fbbc45bcdf422f344c (diff) | |
parent | fa163d0ba5f5fc22dbadbd66255879ceeb895c27 (diff) | |
download | mariadb-git-a495f76c8eed91414d321cc7536d46d1bf7bcfee.tar.gz |
Merge with 4.0.20
BitKeeper/etc/logging_ok:
auto-union
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
innobase/btr/btr0btr.c:
Auto merged
innobase/dict/dict0dict.c:
Auto merged
innobase/dict/dict0load.c:
Auto merged
innobase/eval/eval0eval.c:
Auto merged
innobase/ibuf/ibuf0ibuf.c:
Auto merged
innobase/include/ut0mem.h:
Auto merged
innobase/lock/lock0lock.c:
Auto merged
innobase/row/row0ins.c:
Auto merged
innobase/row/row0mysql.c:
Auto merged
innobase/row/row0sel.c:
Auto merged
innobase/row/row0umod.c:
Auto merged
innobase/row/row0upd.c:
Auto merged
innobase/trx/trx0trx.c:
Auto merged
innobase/ut/ut0dbg.c:
Auto merged
innobase/ut/ut0mem.c:
Auto merged
myisam/mi_dynrec.c:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/t/fulltext.test:
Auto merged
mysql-test/t/rpl_rotate_logs.test:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_show.cc:
Auto merged
innobase/os/os0file.c:
Merge with 4.0.20
Ensure that we call F_UNLCK for files on which we call F_WRLCK.
This is to ensure that this code will be portable accross most platforms.
myisam/ft_boolean_search.c:
Merge with 4.0.20 (keep original file)
myisam/ft_parser.c:
Merge with 4.0.20 (keep original file)
myisam/ftdefs.h:
Merge with 4.0.20 (keep original file)
Diffstat (limited to 'sql/sql_show.cc')
-rw-r--r-- | sql/sql_show.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 51b44af63ec..80634c68ac7 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -1597,10 +1597,13 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose) thd_info->query=0; if (tmp->query) { - /* query_length is always set before tmp->query */ + /* + query_length is always set to 0 when we set query = NULL; see + the comment in sql_class.h why this prevents crashes in possible + races with query_length + */ uint length= min(max_query_length, tmp->query_length); - thd_info->query=(char*) thd->memdup(tmp->query,length+1); - thd_info->query[length]=0; + thd_info->query=(char*) thd->strmake(tmp->query,length); } thread_infos.append(thd_info); } |