summaryrefslogtreecommitdiff
path: root/storage/innobase/trx
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-05-13 11:45:05 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-05-13 11:45:05 +0300
commit15fa70b8408a2146b300a4e1b19819addafa5929 (patch)
tree228e88d1e8e3b3d46f5a54ab6e1bdcdd4478b82e /storage/innobase/trx
parent19d4e023c681ecb26acf06318e69ecae6c4ec9be (diff)
parent6bc4444d7ca81786de98f27669891692c2d2e21c (diff)
downloadmariadb-git-15fa70b8408a2146b300a4e1b19819addafa5929.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'storage/innobase/trx')
-rw-r--r--storage/innobase/trx/trx0i_s.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/storage/innobase/trx/trx0i_s.cc b/storage/innobase/trx/trx0i_s.cc
index c05a5a5ab39..54425ae934b 100644
--- a/storage/innobase/trx/trx0i_s.cc
+++ b/storage/innobase/trx/trx0i_s.cc
@@ -46,6 +46,7 @@ Created July 17, 2007 Vasil Dimov
#include "trx0sys.h"
#include "que0que.h"
#include "trx0purge.h"
+#include "sql_class.h"
/** Initial number of rows in the table cache */
#define TABLE_CACHE_INITIAL_ROWSNUM 1024
@@ -450,7 +451,6 @@ fill_trx_row(
which to copy volatile
strings */
{
- size_t stmt_len;
const char* s;
ut_ad(lock_mutex_own());
@@ -485,16 +485,14 @@ fill_trx_row(
row->trx_mysql_thread_id = thd_get_thread_id(trx->mysql_thd);
char query[TRX_I_S_TRX_QUERY_MAX_LEN + 1];
- stmt_len = innobase_get_stmt_safe(trx->mysql_thd, query, sizeof(query));
-
- if (stmt_len > 0) {
-
+ if (size_t stmt_len = thd_query_safe(trx->mysql_thd, query,
+ sizeof query)) {
row->trx_query = static_cast<const char*>(
ha_storage_put_memlim(
cache->storage, query, stmt_len + 1,
MAX_ALLOWED_FOR_STORAGE(cache)));
- row->trx_query_cs = innobase_get_charset(trx->mysql_thd);
+ row->trx_query_cs = thd_charset(trx->mysql_thd);
if (row->trx_query == NULL) {