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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
8a1b7c9c
Commit
8a1b7c9c
authored
Apr 02, 2015
by
Vicențiu Ciorbaru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MDEV-6877] Removed unnecesary bitmap in binlog_write_row
The bitmap is now deduced from the table's read and write set.
parent
8bd5301a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
27 deletions
+12
-27
sql/handler.cc
sql/handler.cc
+12
-27
No files found.
sql/handler.cc
View file @
8a1b7c9c
...
@@ -5675,23 +5675,11 @@ static int binlog_log_row(TABLE* table,
...
@@ -5675,23 +5675,11 @@ static int binlog_log_row(TABLE* table,
if
(
check_table_binlog_row_based
(
thd
,
table
))
if
(
check_table_binlog_row_based
(
thd
,
table
))
{
{
MY_BITMAP
cols
;
/* Potential buffer on the stack for the bitmap */
uint32
bitbuf
[
BITMAP_STACKBUF_SIZE
/
sizeof
(
uint32
)];
uint
n_fields
=
table
->
s
->
fields
;
my_bool
use_bitbuf
=
n_fields
<=
sizeof
(
bitbuf
)
*
8
;
/*
/*
If there are no table maps written to the binary log, this is
If there are no table maps written to the binary log, this is
the first row handled in this statement. In that case, we need
the first row handled in this statement. In that case, we need
to write table maps for all locked tables to the binary log.
to write table maps for all locked tables to the binary log.
*/
*/
if
(
likely
(
!
(
error
=
my_bitmap_init
(
&
cols
,
use_bitbuf
?
bitbuf
:
NULL
,
(
n_fields
+
7
)
&
~
7UL
,
FALSE
))))
{
bitmap_set_all
(
&
cols
);
if
(
likely
(
!
(
error
=
write_locked_table_maps
(
thd
))))
if
(
likely
(
!
(
error
=
write_locked_table_maps
(
thd
))))
{
{
/*
/*
...
@@ -5706,9 +5694,6 @@ static int binlog_log_row(TABLE* table,
...
@@ -5706,9 +5694,6 @@ static int binlog_log_row(TABLE* table,
table
->
file
->
has_transactions
();
table
->
file
->
has_transactions
();
error
=
(
*
log_func
)(
thd
,
table
,
has_trans
,
before_record
,
after_record
);
error
=
(
*
log_func
)(
thd
,
table
,
has_trans
,
before_record
,
after_record
);
}
}
if
(
!
use_bitbuf
)
my_bitmap_free
(
&
cols
);
}
}
}
return
error
?
HA_ERR_RBR_LOGGING_FAILED
:
0
;
return
error
?
HA_ERR_RBR_LOGGING_FAILED
:
0
;
}
}
...
...
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