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
1a5b69ec
Commit
1a5b69ec
authored
Dec 19, 2007
by
serg@janus.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SHOW_VAR arrays are null-terminated :-[]
parent
3bd3bd1e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
sql/mysqld.cc
sql/mysqld.cc
+5
-3
No files found.
sql/mysqld.cc
View file @
1a5b69ec
...
...
@@ -2909,6 +2909,7 @@ SHOW_VAR com_status_vars[]= {
{
"xa_recover"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_XA_RECOVER
]),
SHOW_LONG_STATUS
},
{
"xa_rollback"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_XA_ROLLBACK
]),
SHOW_LONG_STATUS
},
{
"xa_start"
,
(
char
*
)
offsetof
(
STATUS_VAR
,
com_stat
[(
uint
)
SQLCOM_XA_START
]),
SHOW_LONG_STATUS
},
{
NullS
,
NullS
,
SHOW_LONG
}
};
static
int
init_common_variables
(
const
char
*
conf_file_name
,
int
argc
,
...
...
@@ -2995,10 +2996,11 @@ static int init_common_variables(const char *conf_file_name, int argc,
Com_stmt_reset => com_stmt_reset
Com_stmt_send_long_data => com_stmt_send_long_data
With this correction the number of Com_ variables must match the
number of SQLCOM_ constants.
With this correction the number of Com_ variables (number of elements in
the array, excluding the last element - terminator) must match the number
of SQLCOM_ constants.
*/
compile_time_assert
(
sizeof
(
com_status_vars
)
/
sizeof
(
com_status_vars
[
0
])
==
compile_time_assert
(
sizeof
(
com_status_vars
)
/
sizeof
(
com_status_vars
[
0
])
-
1
==
SQLCOM_END
+
7
);
#endif
...
...
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