summaryrefslogtreecommitdiff
path: root/sql/sql_repl.cc
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2016-01-27 13:42:53 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2016-01-28 11:12:03 +0400
commitefb36ac5d5a5e2b7937545e2d3fddb1b7c8b7f9a (patch)
treeec8e821ca35531d4f828e3627de271cd90530283 /sql/sql_repl.cc
parent75a1d866dd4c00b91ca9b29593ad41543f084544 (diff)
downloadmariadb-git-efb36ac5d5a5e2b7937545e2d3fddb1b7c8b7f9a.tar.gz
MDEV-5273 Prepared statement doesn't return metadata after prepare.
SHOW MASTER STATUS fixed.
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r--sql/sql_repl.cc34
1 files changed, 20 insertions, 14 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc
index e524153ad15..3a73237ad4f 100644
--- a/sql/sql_repl.cc
+++ b/sql/sql_repl.cc
@@ -4088,6 +4088,25 @@ err:
}
+void show_binlog_info_get_fields(THD *thd, List<Item> *field_list)
+{
+ MEM_ROOT *mem_root= thd->mem_root;
+ field_list->push_back(new (mem_root)
+ Item_empty_string(thd, "File", FN_REFLEN),
+ mem_root);
+ field_list->push_back(new (mem_root)
+ Item_return_int(thd, "Position", 20,
+ MYSQL_TYPE_LONGLONG),
+ mem_root);
+ field_list->push_back(new (mem_root)
+ Item_empty_string(thd, "Binlog_Do_DB", 255),
+ mem_root);
+ field_list->push_back(new (mem_root)
+ Item_empty_string(thd, "Binlog_Ignore_DB", 255),
+ mem_root);
+}
+
+
/**
Execute a SHOW MASTER STATUS statement.
@@ -4100,23 +4119,10 @@ err:
bool show_binlog_info(THD* thd)
{
Protocol *protocol= thd->protocol;
- MEM_ROOT *mem_root= thd->mem_root;
DBUG_ENTER("show_binlog_info");
List<Item> field_list;
- field_list.push_back(new (mem_root)
- Item_empty_string(thd, "File", FN_REFLEN),
- mem_root);
- field_list.push_back(new (mem_root)
- Item_return_int(thd, "Position", 20,
- MYSQL_TYPE_LONGLONG),
- mem_root);
- field_list.push_back(new (mem_root)
- Item_empty_string(thd, "Binlog_Do_DB", 255),
- mem_root);
- field_list.push_back(new (mem_root)
- Item_empty_string(thd, "Binlog_Ignore_DB", 255),
- mem_root);
+ show_binlog_info_get_fields(thd, &field_list);
if (protocol->send_result_set_metadata(&field_list,
Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))