summaryrefslogtreecommitdiff
path: root/storage/innobase/trx
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-10-30 06:42:51 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2019-10-30 06:42:51 +0200
commit44b0c8697135be4139c4431bbf02fbf4433e058f (patch)
treea537b74931a483d4eca7a730403a7f1011283284 /storage/innobase/trx
parent814534745b92dfbc27886358c0def3059ef04539 (diff)
downloadmariadb-git-44b0c8697135be4139c4431bbf02fbf4433e058f.tar.gz
Clean up ut_strlcpy(), ut_strlcpy_rev()
ut_strlcpy(): Replace with the standard function strncpy(). ut_strlcpy_rev(): Define in the same compilation unit where the only caller resides. Avoid unnecessary definition in non-debug builds.
Diffstat (limited to 'storage/innobase/trx')
-rw-r--r--storage/innobase/trx/trx0trx.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc
index 869fe08a6ba..7e72b909e2d 100644
--- a/storage/innobase/trx/trx0trx.cc
+++ b/storage/innobase/trx/trx0trx.cc
@@ -72,7 +72,8 @@ trx_set_detailed_error(
trx_t* trx, /*!< in: transaction struct */
const char* msg) /*!< in: detailed error message */
{
- ut_strlcpy(trx->detailed_error, msg, MAX_DETAILED_ERROR_LEN);
+ strncpy(trx->detailed_error, msg, MAX_DETAILED_ERROR_LEN - 1);
+ trx->detailed_error[MAX_DETAILED_ERROR_LEN - 1] = '\0';
}
/*************************************************************//**