maria-developers team mailing list archive
-
maria-developers team
-
Mailing list archive
-
Message #09623
Re: 7e70658: MDEV-9947: COM_MULTI united response
Hi, Sanja!
Looks ok to me. You're simply disable net_flush as far as I can see.
For comments and questions, see below...
On May 09, Oleksandr Byelkin wrote:
> revision-id: 7e70658d1e88b4a255e3c28426f8259e5e596a85 (mariadb-10.2.0-20-g7e70658)
> parent(s): c0a59b46be5be341bd6ffc9fe188a236ced46522
> committer: Oleksandr Byelkin
> timestamp: 2016-05-09 15:26:18 +0200
> message:
>
> MDEV-9947: COM_MULTI united response
> diff --git a/sql/protocol.cc b/sql/protocol.cc
> index 9e52870..0bf2a05 100644
> --- a/sql/protocol.cc
> +++ b/sql/protocol.cc
> @@ -208,7 +208,8 @@ bool net_send_error(THD *thd, uint sql_errno,
> const char *err,
> bool
> net_send_ok(THD *thd,
> uint server_status, uint statement_warn_count,
> - ulonglong affected_rows, ulonglong id, const char
> *message)
> + ulonglong affected_rows, ulonglong id, const char
> *message,
> + bool postpond_flush)
"postpone" or "delay" or even (looking at how you use it) "skip"
> {
> NET *net= &thd->net;
> uchar buff[MYSQL_ERRMSG_SIZE+10],*pos;
> diff --git a/sql/sql_error.h b/sql/sql_error.h
> index e03c3dd..98c8d77 100644
> --- a/sql/sql_error.h
> +++ b/sql/sql_error.h
> @@ -704,6 +704,12 @@ class Diagnostics_area
> const char *message() const
> { DBUG_ASSERT(m_status == DA_ERROR || m_status == DA_OK); return
> m_message; }
>
> + bool postpond_flush() const
> + { DBUG_ASSERT(m_status == DA_OK); return m_postpond_flush; }
What if one uses COM_MULTI to send two commands and the first
fails (results in an error). Will the second be executed?
(This is a question about *sending*, client-to-server, not about
MDEV-9947)
> +
> + void set_postpond_flush()
> + { m_postpond_flush= TRUE; }
> +
> uint sql_errno() const
> { DBUG_ASSERT(m_status == DA_ERROR); return m_sql_errno; }
>
> @@ -857,6 +863,8 @@ class Diagnostics_area
> /** Set to make set_error_status after set_{ok,eof}_status
> possible. */
> bool m_can_overwrite_status;
A comment would've been nice...
> + bool m_postpond_flush;
> +
> /** Message buffer. Can be used by OK or ERROR status. */
> char m_message[MYSQL_ERRMSG_SIZE];
Regards,
Sergei
Chief Architect MariaDB
and security@xxxxxxxxxxx
Follow ups