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
a4effbf9
Commit
a4effbf9
authored
Aug 08, 2024
by
Oleksandr Byelkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix of MDEV-33856, becaouse we have more then 64 fields
and unsigned long long can not be used as bitfield.
parent
337307a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
18 deletions
+7
-18
sql/sql_show.cc
sql/sql_show.cc
+7
-18
No files found.
sql/sql_show.cc
View file @
a4effbf9
...
...
@@ -9112,27 +9112,16 @@ static int make_slave_status_old_format(THD *thd, ST_SCHEMA_TABLE *schema_table)
Name_resolution_context
*
context
=
&
thd
->
lex
->
first_select_lex
()
->
context
;
DBUG_ASSERT
(
thd
->
lex
->
sql_command
==
SQLCOM_SHOW_SLAVE_STAT
);
bool
all_slaves
=
thd
->
lex
->
mi
.
show_all_slaves
;
ulonglong
used_fields
=
~
0ULL
;
if
(
!
all_slaves
)
{
/*
Remove 2 first fields (Connection_name and Slave_SQL_State) and all
fields above and including field 56 (Retried_transactions)
*/
used_fields
&=
~
((
1ULL
<<
SLAVE_STATUS_COL_CONNECTION_NAME
)
|
(
1ULL
<<
SLAVE_STATUS_COL_SLAVE_SQL_STATE
));
used_fields
&=
((
1ULL
<<
SLAVE_STATUS_COL_RETRIED_TRANSACTIONS
)
-
1
);
}
for
(
uint
i
=
0
;
!
field_info
->
end_marker
();
field_info
++
,
i
++
)
{
/*
We have all_slaves here to take into account that we some day may have
more than 64 fields in the list. If all_slaves is set we should show
all fields.
*/
if
(
all_slaves
||
(
used_fields
&
((
1ULL
<<
i
))))
if
(
all_slaves
||
// not SLAVE_STATUS_COL_CONNECTION_NAME,
// SLAVE_STATUS_COL_SLAVE_SQL_STATE
// and less
// SLAVE_STATUS_COL_RETRIED_TRANSACTIONS
!
(
i
<=
SLAVE_STATUS_COL_SLAVE_SQL_STATE
||
i
>=
SLAVE_STATUS_COL_RETRIED_TRANSACTIONS
))
{
LEX_CSTRING
field_name
=
field_info
->
name
();
Item_field
*
field
=
new
(
thd
->
mem_root
)
...
...
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