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
dd4d81dd
Commit
dd4d81dd
authored
Jul 14, 2015
by
Nirbhay Choubey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update read_pos after reading from the cache.
parent
dced5146
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
4 deletions
+26
-4
sql/wsrep_binlog.cc
sql/wsrep_binlog.cc
+26
-4
No files found.
sql/wsrep_binlog.cc
View file @
dd4d81dd
...
...
@@ -71,7 +71,13 @@ int wsrep_write_cache_buf(IO_CACHE *cache, uchar **buf, size_t *buf_len)
memcpy
(
*
buf
+
*
buf_len
,
cache
->
read_pos
,
length
);
*
buf_len
=
total_length
;
}
while
((
cache
->
file
>=
0
)
&&
(
length
=
my_b_fill
(
cache
)));
if
(
cache
->
file
<
0
)
{
cache
->
read_pos
=
cache
->
read_end
;
break
;
}
}
while
((
length
=
my_b_fill
(
cache
)));
if
(
reinit_io_cache
(
cache
,
WRITE_CACHE
,
saved_pos
,
0
,
0
))
{
...
...
@@ -199,7 +205,12 @@ static int wsrep_write_cache_once(wsrep_t* const wsrep,
memcpy
(
buf
+
used
,
cache
->
read_pos
,
length
);
used
=
total_length
;
}
while
((
cache
->
file
>=
0
)
&&
(
length
=
my_b_fill
(
cache
)));
if
(
cache
->
file
<
0
)
{
cache
->
read_pos
=
cache
->
read_end
;
break
;
}
}
while
((
length
=
my_b_fill
(
cache
)));
if
(
used
>
0
)
err
=
wsrep_append_data
(
wsrep
,
&
thd
->
wsrep_ws_handle
,
buf
,
used
);
...
...
@@ -268,7 +279,12 @@ static int wsrep_write_cache_inc(wsrep_t* const wsrep,
cache
->
read_pos
,
length
)))
goto
cleanup
;
}
while
((
cache
->
file
>=
0
)
&&
(
length
=
my_b_fill
(
cache
)));
if
(
cache
->
file
<
0
)
{
cache
->
read_pos
=
cache
->
read_end
;
break
;
}
}
while
((
length
=
my_b_fill
(
cache
)));
if
(
WSREP_OK
==
err
)
*
len
=
total_length
;
...
...
@@ -394,7 +410,13 @@ void wsrep_dump_rbr_direct(THD* thd, IO_CACHE* cache)
WSREP_ERROR("Failed to write file '%s'", filename);
goto cleanup;
}
} while ((cache->file >= 0) && (bytes_in_cache= my_b_fill(cache)));
if (cache->file < 0)
{
cache->read_pos= cache->read_end;
break;
}
} while ((bytes_in_cache= my_b_fill(cache)));
if(cache->error == -1)
{
WSREP_ERROR("RBR inconsistent");
...
...
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