diff options
author | Konstantin Osipov <kostja@sun.com> | 2009-10-22 00:02:06 +0400 |
---|---|---|
committer | Konstantin Osipov <kostja@sun.com> | 2009-10-22 00:02:06 +0400 |
commit | d4632dff5aea3eacfe3c6a126c6b8ca9c839b5ec (patch) | |
tree | 5a3482665c78a3698f529755e2407524f79327d9 /libmysqld/lib_sql.cc | |
parent | 2b91a639cc767928ca063a466b4058e22f8fb7ff (diff) | |
download | mariadb-git-d4632dff5aea3eacfe3c6a126c6b8ca9c839b5ec.tar.gz |
Backport of revno 2630.28.10, 2630.28.31, 2630.28.26, 2630.33.1,
2630.39.1, 2630.28.29, 2630.34.3, 2630.34.2, 2630.34.1, 2630.29.29,
2630.29.28, 2630.31.1, 2630.28.13, 2630.28.10, 2617.23.14 and
some other minor revisions.
This patch implements:
WL#4264 "Backup: Stabilize Service Interface" -- all the
server prerequisites except si_objects.{h,cc} themselves (they can
be just copied over, when needed).
WL#4435: Support OUT-parameters in prepared statements.
(and all issues in the initial patches for these two
tasks, that were discovered in pushbuild and during testing).
Bug#39519: mysql_stmt_close() should flush all data
associated with the statement.
After execution of a prepared statement, send OUT parameters of the invoked
stored procedure, if any, to the client.
When using the binary protocol, send the parameters in an additional result
set over the wire. When using the text protocol, assign out parameters to
the user variables from the CALL(@var1, @var2, ...) specification.
The following refactoring has been made:
- Protocol::send_fields() was renamed to Protocol::send_result_set_metadata();
- A new Protocol::send_result_set_row() was introduced to incapsulate
common functionality for sending row data.
- Signature of Protocol::prepare_for_send() was changed: this operation
does not need a list of items, the number of items is fully sufficient.
The following backward incompatible changes have been made:
- CLIENT_MULTI_RESULTS is now enabled by default in the client;
- CLIENT_PS_MULTI_RESUTLS is now enabled by default in the client.
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r-- | libmysqld/lib_sql.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 31f9d97a413..20ee59365bc 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -148,7 +148,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command, return result; } -static void emb_flush_use_result(MYSQL *mysql) +static void emb_flush_use_result(MYSQL *mysql, my_bool) { THD *thd= (THD*) mysql->thd; if (thd->cur_data) @@ -653,7 +653,7 @@ int check_embedded_connection(MYSQL *mysql, const char *db) strmake(sctx->priv_host, (char*) my_localhost, MAX_HOSTNAME-1); sctx->priv_user= sctx->user= my_strdup(mysql->user, MYF(0)); result= check_user(thd, COM_CONNECT, NULL, 0, db, true); - net_end_statement(thd); + thd->protocol->end_statement(); emb_read_query_result(mysql); return result; } @@ -879,7 +879,7 @@ void Protocol_text::remove_last_row() } -bool Protocol::send_fields(List<Item> *list, uint flags) +bool Protocol::send_result_set_metadata(List<Item> *list, uint flags) { List_iterator_fast<Item> it(*list); Item *item; @@ -888,7 +888,7 @@ bool Protocol::send_fields(List<Item> *list, uint flags) CHARSET_INFO *thd_cs= thd->variables.character_set_results; CHARSET_INFO *cs= system_charset_info; MYSQL_DATA *data; - DBUG_ENTER("send_fields"); + DBUG_ENTER("send_result_set_metadata"); if (!thd->mysql) // bootstrap file handling DBUG_RETURN(0); @@ -982,7 +982,7 @@ bool Protocol::send_fields(List<Item> *list, uint flags) write_eof_packet(thd, thd->server_status, thd->warning_info->statement_warn_count()); - DBUG_RETURN(prepare_for_send(list)); + DBUG_RETURN(prepare_for_send(list->elements)); err: my_error(ER_OUT_OF_RESOURCES, MYF(0)); /* purecov: inspected */ DBUG_RETURN(1); /* purecov: inspected */ |