summaryrefslogtreecommitdiff
path: root/sql/repl_failsafe.cc
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2015-08-24 14:42:07 +0300
committerMonty <monty@mariadb.org>2015-08-27 22:21:08 +0300
commit3cb578c001b2feabd2410f281d20eb6566371453 (patch)
tree4e3781e38f6531ea91ff127c024869c6b88c5849 /sql/repl_failsafe.cc
parentba340d8c47657774ba6d69bfc918dbebaaef6086 (diff)
downloadmariadb-git-3cb578c001b2feabd2410f281d20eb6566371453.tar.gz
MDEV-6152: Remove calls to current_thd while creating Item
- Part 3: Adding mem_root to push_back() and push_front() Other things: - Added THD as an argument to some partition functions. - Added memory overflow checking for XML tag's in read_xml()
Diffstat (limited to 'sql/repl_failsafe.cc')
-rw-r--r--sql/repl_failsafe.cc25
1 files changed, 17 insertions, 8 deletions
diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc
index 4860935e9bf..4cf7df5227f 100644
--- a/sql/repl_failsafe.cc
+++ b/sql/repl_failsafe.cc
@@ -233,17 +233,26 @@ bool show_slave_hosts(THD* thd)
MEM_ROOT *mem_root= thd->mem_root;
DBUG_ENTER("show_slave_hosts");
- field_list.push_back(new (mem_root) Item_return_int(thd, "Server_id", 10,
- MYSQL_TYPE_LONG));
- field_list.push_back(new (mem_root) Item_empty_string(thd, "Host", 20));
+ field_list.push_back(new (mem_root)
+ Item_return_int(thd, "Server_id", 10,
+ MYSQL_TYPE_LONG),
+ thd->mem_root);
+ field_list.push_back(new (mem_root)
+ Item_empty_string(thd, "Host", 20),
+ thd->mem_root);
if (opt_show_slave_auth_info)
{
- field_list.push_back(new (mem_root) Item_empty_string(thd, "User", 20));
- field_list.push_back(new (mem_root) Item_empty_string(thd, "Password", 20));
+ field_list.push_back(new (mem_root) Item_empty_string(thd, "User", 20),
+ thd->mem_root);
+ field_list.push_back(new (mem_root) Item_empty_string(thd, "Password", 20),
+ thd->mem_root);
}
- field_list.push_back(new (mem_root) Item_return_int(thd, "Port", 7, MYSQL_TYPE_LONG));
- field_list.push_back(new (mem_root) Item_return_int(thd, "Master_id", 10,
- MYSQL_TYPE_LONG));
+ field_list.push_back(new (mem_root)
+ Item_return_int(thd, "Port", 7, MYSQL_TYPE_LONG),
+ thd->mem_root);
+ field_list.push_back(new (mem_root)
+ Item_return_int(thd, "Master_id", 10, MYSQL_TYPE_LONG),
+ thd->mem_root);
if (protocol->send_result_set_metadata(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))