Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
b2dd5232
Commit
b2dd5232
authored
Nov 13, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InnoDB: Remove ut_vsnprintf() and the use of my_vsnprintf(); use vsnprintf()
parent
c19ef508
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
54 deletions
+5
-54
storage/innobase/buf/buf0buf.cc
storage/innobase/buf/buf0buf.cc
+1
-1
storage/innobase/buf/buf0dump.cc
storage/innobase/buf/buf0dump.cc
+2
-2
storage/innobase/handler/ha_innodb.cc
storage/innobase/handler/ha_innodb.cc
+2
-2
storage/innobase/include/ut0ut.h
storage/innobase/include/ut0ut.h
+0
-27
storage/innobase/ut/ut0ut.cc
storage/innobase/ut/ut0ut.cc
+0
-22
No files found.
storage/innobase/buf/buf0buf.cc
View file @
b2dd5232
...
...
@@ -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
);
...
...
storage/innobase/buf/buf0dump.cc
View file @
b2dd5232
...
...
@@ -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
);
...
...
storage/innobase/handler/ha_innodb.cc
View file @
b2dd5232
...
...
@@ -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
);
...
...
storage/innobase/include/ut0ut.h
View file @
b2dd5232
...
...
@@ -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.
...
...
storage/innobase/ut/ut0ut.cc
View file @
b2dd5232
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment