summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Botchkov <holyfoot@askmonty.org>2022-07-03 16:37:15 +0400
committerAlexey Botchkov <holyfoot@askmonty.org>2022-07-24 23:32:06 +0400
commitf8e6ba143511d8c46b834fbe1dcf28811e2eed4b (patch)
tree2a187bc6075e16623fe127a41edea75153f88882
parent04a4351398b5de62c97caebcc6a4dffb692341d1 (diff)
downloadmariadb-git-f8e6ba143511d8c46b834fbe1dcf28811e2eed4b.tar.gz
MDEV-27595 Backport SQL service, introduced by MDEV-19275.
Embedded-server related fixes.
-rw-r--r--libmysqld/emb_qcache.cc2
-rw-r--r--libmysqld/lib_sql.cc11
-rw-r--r--sql/protocol.cc4
-rw-r--r--sql/protocol.h2
4 files changed, 9 insertions, 10 deletions
diff --git a/libmysqld/emb_qcache.cc b/libmysqld/emb_qcache.cc
index 603542e820e..95e09cd8635 100644
--- a/libmysqld/emb_qcache.cc
+++ b/libmysqld/emb_qcache.cc
@@ -490,7 +490,7 @@ int emb_load_querycache_result(THD *thd, Querycache_stream *src)
*prev_row= NULL;
data->embedded_info->prev_ptr= prev_row;
return_ok:
- net_send_eof(thd, thd->server_status,
+ thd->protocol->net_send_eof(thd, thd->server_status,
thd->get_stmt_da()->current_statement_warn_count());
DBUG_RETURN(0);
err:
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index e6b677a6523..9d50f4c968d 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -1126,7 +1126,7 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
for (uint pos= 0 ; (item= it++); pos++)
{
- if (prot.store_field_metadata(thd, item, pos))
+ if (prot.store_item_metadata(thd, item, pos))
goto err;
}
@@ -1241,8 +1241,7 @@ bool Protocol_binary::write()
@retval FALSE Success
*/
-bool
-net_send_ok(THD *thd,
+bool Protocol::net_send_ok(THD *thd,
uint server_status, uint statement_warn_count,
ulonglong affected_rows, ulonglong id, const char *message,
bool, bool)
@@ -1277,7 +1276,7 @@ net_send_ok(THD *thd,
*/
bool
-net_send_eof(THD *thd, uint server_status, uint statement_warn_count)
+Protocol::net_send_eof(THD *thd, uint server_status, uint statement_warn_count)
{
bool error= write_eof_packet(thd, server_status, statement_warn_count);
thd->cur_data= 0;
@@ -1285,8 +1284,8 @@ net_send_eof(THD *thd, uint server_status, uint statement_warn_count)
}
-bool net_send_error_packet(THD *thd, uint sql_errno, const char *err,
- const char *sqlstate)
+bool Protocol::net_send_error_packet(THD *thd, uint sql_errno, const char *err,
+ const char *sqlstate)
{
uint error;
char converted_err[MYSQL_ERRMSG_SIZE];
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 5f89c396139..7f9fda9e40d 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -906,7 +906,7 @@ bool Protocol::send_result_set_metadata(List<Item> *list, uint flags)
for (uint pos= 0; (item=it++); pos++)
{
prot.prepare_for_resend();
- if (prot.store_field_metadata(thd, item, pos))
+ if (prot.store_item_metadata(thd, item, pos))
goto err;
if (prot.write())
DBUG_RETURN(1);
@@ -986,7 +986,7 @@ bool Protocol::write()
#endif /* EMBEDDED_LIBRARY */
-bool Protocol_text::store_field_metadata(THD *thd, Item *item, uint pos)
+bool Protocol_text::store_item_metadata(THD *thd, Item *item, uint pos)
{
Send_field field(thd, item);
return store_field_metadata(thd, field, item->charset_for_protocol(), pos);
diff --git a/sql/protocol.h b/sql/protocol.h
index bcd98388f66..c33c797fc4f 100644
--- a/sql/protocol.h
+++ b/sql/protocol.h
@@ -201,7 +201,7 @@ public:
bool store_field_metadata(const THD *thd, const Send_field &field,
CHARSET_INFO *charset_for_protocol,
uint pos);
- bool store_field_metadata(THD *thd, Item *item, uint pos);
+ bool store_item_metadata(THD *thd, Item *item, uint pos);
bool store_field_metadata_for_list_fields(const THD *thd, Field *field,
const TABLE_LIST *table_list,
uint pos);