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
484a7941
Commit
484a7941
authored
May 29, 2012
by
Rohit Kalhans
Browse files
Options
Browse Files
Download
Plain Diff
upmerge from mysql-5.1 branch -> mysql-5.5 branch
parents
b2c3acc9
d8b2d4a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+20
-1
mysys/my_write.c
mysys/my_write.c
+5
-0
sql/log_event.cc
sql/log_event.cc
+6
-0
No files found.
client/mysqlbinlog.cc
View file @
484a7941
...
...
@@ -698,6 +698,7 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
DBUG_ENTER
(
"process_event"
);
print_event_info
->
short_form
=
short_form
;
Exit_status
retval
=
OK_CONTINUE
;
IO_CACHE
*
const
head
=
&
print_event_info
->
head_cache
;
/*
Format events are not concerned by --offset and such, we always need to
...
...
@@ -761,6 +762,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
}
else
ev
->
print
(
result_file
,
print_event_info
);
if
(
head
->
error
==
-
1
)
goto
err
;
break
;
case
CREATE_FILE_EVENT
:
...
...
@@ -812,6 +815,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
output of Append_block_log_event::print is only a comment.
*/
ev
->
print
(
result_file
,
print_event_info
);
if
(
head
->
error
==
-
1
)
goto
err
;
if
((
retval
=
load_processor
.
process
((
Append_block_log_event
*
)
ev
))
!=
OK_CONTINUE
)
goto
end
;
...
...
@@ -820,6 +825,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
case
EXEC_LOAD_EVENT
:
{
ev
->
print
(
result_file
,
print_event_info
);
if
(
head
->
error
==
-
1
)
goto
err
;
Execute_load_log_event
*
exv
=
(
Execute_load_log_event
*
)
ev
;
Create_file_log_event
*
ce
=
load_processor
.
grab_event
(
exv
->
file_id
);
/*
...
...
@@ -849,6 +856,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
print_event_info
->
common_header_len
=
glob_description_event
->
common_header_len
;
ev
->
print
(
result_file
,
print_event_info
);
if
(
head
->
error
==
-
1
)
goto
err
;
if
(
!
remote_opt
)
{
ev
->
free_temp_buf
();
// free memory allocated in dump_local_log_entries
...
...
@@ -878,6 +887,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
break
;
case
BEGIN_LOAD_QUERY_EVENT
:
ev
->
print
(
result_file
,
print_event_info
);
if
(
head
->
error
==
-
1
)
goto
err
;
if
((
retval
=
load_processor
.
process
((
Begin_load_query_log_event
*
)
ev
))
!=
OK_CONTINUE
)
goto
end
;
...
...
@@ -988,6 +999,8 @@ Exit_status process_event(PRINT_EVENT_INFO *print_event_info, Log_event *ev,
}
default:
ev
->
print
(
result_file
,
print_event_info
);
if
(
head
->
error
==
-
1
)
goto
err
;
}
}
...
...
@@ -2020,7 +2033,13 @@ static Exit_status dump_local_log_entries(PRINT_EVENT_INFO *print_event_info,
end:
if
(
fd
>=
0
)
my_close
(
fd
,
MYF
(
MY_WME
));
end_io_cache
(
file
);
/*
Since the end_io_cache() writes to the
file errors may happen.
*/
if
(
end_io_cache
(
file
))
retval
=
ERROR_STOP
;
return
retval
;
}
...
...
mysys/my_write.c
View file @
484a7941
...
...
@@ -40,6 +40,11 @@ size_t my_write(File Filedes, const uchar *Buffer, size_t Count, myf MyFlags)
#else
writtenbytes
=
write
(
Filedes
,
Buffer
,
Count
);
#endif
DBUG_EXECUTE_IF
(
"simulate_file_write_error"
,
{
errno
=
ENOSPC
;
writtenbytes
=
(
size_t
)
-
1
;
});
if
(
writtenbytes
==
Count
)
break
;
if
(
writtenbytes
!=
(
size_t
)
-
1
)
...
...
sql/log_event.cc
View file @
484a7941
...
...
@@ -3164,6 +3164,12 @@ void Query_log_event::print(FILE* file, PRINT_EVENT_INFO* print_event_info)
{
Write_on_release_cache
cache
(
&
print_event_info
->
head_cache
,
file
);
/**
reduce the size of io cache so that the write function is called
for every call to my_b_write().
*/
DBUG_EXECUTE_IF
(
"simulate_file_write_error"
,
{(
&
cache
)
->
write_pos
=
(
&
cache
)
->
write_end
-
500
;});
print_query_header
(
&
cache
,
print_event_info
);
my_b_write
(
&
cache
,
(
uchar
*
)
query
,
q_len
);
my_b_printf
(
&
cache
,
"
\n
%s
\n
"
,
print_event_info
->
delimiter
);
...
...
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