summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-11-13 04:32:56 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-11-13 04:32:56 +0200
commitb2dd5232d4872d6c9ee565f1a88e70514ceb1780 (patch)
treecc883c29a267741cd55709a13efacbb4c9507bb2
parentc19ef508b89b8abd2d320153a3d8960f60a0ad84 (diff)
downloadmariadb-git-b2dd5232d4872d6c9ee565f1a88e70514ceb1780.tar.gz
InnoDB: Remove ut_vsnprintf() and the use of my_vsnprintf(); use vsnprintf()
-rw-r--r--storage/innobase/buf/buf0buf.cc2
-rw-r--r--storage/innobase/buf/buf0dump.cc4
-rw-r--r--storage/innobase/handler/ha_innodb.cc4
-rw-r--r--storage/innobase/include/ut0ut.h27
-rw-r--r--storage/innobase/ut/ut0ut.cc22
5 files changed, 5 insertions, 54 deletions
diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc
index 3a201f5cef4..7382a40c781 100644
--- a/storage/innobase/buf/buf0buf.cc
+++ b/storage/innobase/buf/buf0buf.cc
@@ -2212,7 +2212,7 @@ buf_resize_status(
va_start(ap, fmt);
- ut_vsnprintf(
+ vsnprintf(
export_vars.innodb_buffer_pool_resize_status,
sizeof(export_vars.innodb_buffer_pool_resize_status),
fmt, ap);
diff --git a/storage/innobase/buf/buf0dump.cc b/storage/innobase/buf/buf0dump.cc
index 56fb00f1e1d..6cd8111e902 100644
--- a/storage/innobase/buf/buf0dump.cc
+++ b/storage/innobase/buf/buf0dump.cc
@@ -119,7 +119,7 @@ buf_dump_status(
va_start(ap, fmt);
- ut_vsnprintf(
+ vsnprintf(
export_vars.innodb_buffer_pool_dump_status,
sizeof(export_vars.innodb_buffer_pool_dump_status),
fmt, ap);
@@ -158,7 +158,7 @@ buf_load_status(
va_start(ap, fmt);
- ut_vsnprintf(
+ vsnprintf(
export_vars.innodb_buffer_pool_load_status,
sizeof(export_vars.innodb_buffer_pool_load_status),
fmt, ap);
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 8885fafb47b..aea7e67c9af 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -22494,7 +22494,7 @@ ib_errf(
if (vasprintf(&str, format, args) == -1) {
/* In case of failure use a fixed length string */
str = static_cast<char*>(malloc(BUFSIZ));
- my_vsnprintf(str, BUFSIZ, format, args);
+ vsnprintf(str, BUFSIZ, format, args);
}
#else
/* Use a fixed length string. */
@@ -22503,7 +22503,7 @@ ib_errf(
va_end(args);
return; /* Watch for Out-Of-Memory */
}
- my_vsnprintf(str, BUFSIZ, format, args);
+ vsnprintf(str, BUFSIZ, format, args);
#endif /* _WIN32 */
ib_senderrf(thd, level, code, str);
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index 0e7f87d2ef0..4e9c2599933 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -395,33 +395,6 @@ ut_copy_file(
FILE* dest, /*!< in: output file */
FILE* src); /*!< in: input file to be appended to output */
-#ifdef _WIN32
-/**********************************************************************//**
-A substitute for vsnprintf(3), formatted output conversion into
-a limited buffer. Note: this function DOES NOT return the number of
-characters that would have been printed if the buffer was unlimited because
-VC's _vsnprintf() returns -1 in this case and we would need to call
-_vscprintf() in addition to estimate that but we would need another copy
-of "ap" for that and VC does not provide va_copy(). */
-void
-ut_vsnprintf(
-/*=========*/
- char* str, /*!< out: string */
- size_t size, /*!< in: str size */
- const char* fmt, /*!< in: format */
- va_list ap); /*!< in: format values */
-#else
-/**********************************************************************//**
-A wrapper for vsnprintf(3), formatted output conversion into
-a limited buffer. Note: this function DOES NOT return the number of
-characters that would have been printed if the buffer was unlimited because
-VC's _vsnprintf() returns -1 in this case and we would need to call
-_vscprintf() in addition to estimate that but we would need another copy
-of "ap" for that and VC does not provide va_copy(). */
-# define ut_vsnprintf(buf, size, fmt, ap) \
- ((void) vsnprintf(buf, size, fmt, ap))
-#endif /* _WIN32 */
-
/*************************************************************//**
Convert an error number to a human readable text message. The
returned string is static and should not be freed or modified.
diff --git a/storage/innobase/ut/ut0ut.cc b/storage/innobase/ut/ut0ut.cc
index 877c4440f7a..28e327a2a77 100644
--- a/storage/innobase/ut/ut0ut.cc
+++ b/storage/innobase/ut/ut0ut.cc
@@ -522,28 +522,6 @@ ut_copy_file(
} while (len > 0);
}
-#ifdef _WIN32
-# include <stdarg.h>
-/**********************************************************************//**
-A substitute for vsnprintf(3), formatted output conversion into
-a limited buffer. Note: this function DOES NOT return the number of
-characters that would have been printed if the buffer was unlimited because
-VC's _vsnprintf() returns -1 in this case and we would need to call
-_vscprintf() in addition to estimate that but we would need another copy
-of "ap" for that and VC does not provide va_copy(). */
-void
-ut_vsnprintf(
-/*=========*/
- char* str, /*!< out: string */
- size_t size, /*!< in: str size */
- const char* fmt, /*!< in: format */
- va_list ap) /*!< in: format values */
-{
- _vsnprintf(str, size, fmt, ap);
- str[size - 1] = '\0';
-}
-#endif /* _WIN32 */
-
/** Convert an error number to a human readable text message.
The returned string is static and should not be freed or modified.
@param[in] num InnoDB internal error number