From 0d3e994e33aa85965616a064bbf635ec8d043c1a Mon Sep 17 00:00:00 2001
From: znone <glyc@sina.com.cn>
Date: Fri, 02 Oct 2020 06:11:48 +0000
Subject: [PATCH] The database can be operated asynchronously through asio.

---
 include/qtl_mysql.hpp |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/qtl_mysql.hpp b/include/qtl_mysql.hpp
index 8bb6e6d..179df88 100644
--- a/include/qtl_mysql.hpp
+++ b/include/qtl_mysql.hpp
@@ -1582,7 +1582,7 @@
 		int status  = mysql_close_start(m_mysql);
 		if (status)
 		{
-			wait_close(status, [this, handler]() {
+			wait_close(status, [this, handler]() mutable {
 				handler();
 				m_mysql = nullptr;
 			});
@@ -1781,7 +1781,7 @@
 	void wait_close(int status, CloseHandler&& handler) NOEXCEPT
 	{
 		m_event_handler->set_io_handler(event_flags(status), mysql_get_timeout_value(m_mysql),
-			[this, handler](int flags) {
+			[this, handler](int flags) mutable {
 			MYSQL* ret = nullptr;
 			int status = mysql_close_cont(m_mysql, mysql_status(flags));
 			if (status)
@@ -1809,7 +1809,7 @@
 	void wait_query(int status, int field_count, RowHandler&& row_handler, ResultHandler&& result_handler) NOEXCEPT
 	{
 		m_event_handler->set_io_handler(event_flags(status), mysql_get_timeout_value(m_mysql),
-			[this, field_count, row_handler, result_handler](int flags) {
+			[this, field_count, row_handler, result_handler](int flags) mutable {
 			MYSQL_RES* result = 0;
 			int status = mysql_store_result_cont(&result, m_mysql, mysql_status(flags));
 			if (status)

--
Gitblit v1.9.3