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
a0869f7c
Commit
a0869f7c
authored
Dec 11, 2008
by
Luis Soares
Browse files
Options
Browse Files
Download
Plain Diff
BUG#38826
Merge from 5.0-bugteam. Additional fix for unused ret variable warning.
parents
dfcefa20
e0f4556d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
78 deletions
+7
-78
mysql-test/suite/rpl/r/rpl_crash_before_purge_logs.result
mysql-test/suite/rpl/r/rpl_crash_before_purge_logs.result
+0
-14
mysql-test/suite/rpl/t/rpl_crash_before_purge_logs.test
mysql-test/suite/rpl/t/rpl_crash_before_purge_logs.test
+0
-57
sql/log.cc
sql/log.cc
+7
-7
No files found.
mysql-test/suite/rpl/r/rpl_crash_before_purge_logs.result
deleted
100644 → 0
View file @
dfcefa20
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
stop slave;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (id INT);
start slave;
SET GLOBAL debug= "+d,crash_before_purge_logs";
FLUSH LOGS;
ERROR HY000: Lost connection to MySQL server during query
start slave;
mysql-test/suite/rpl/t/rpl_crash_before_purge_logs.test
deleted
100644 → 0
View file @
dfcefa20
--
source
include
/
master
-
slave
.
inc
--
source
include
/
have_debug
.
inc
--
disable_reconnect
# We have to sync with master, to ensure slave had time to start properly
# # before we stop it. If not, we get errors about UNIX_TIMESTAMP() in the
# log.
sync_slave_with_master
;
stop
slave
;
--
source
include
/
wait_for_slave_to_stop
.
inc
# ON MASTER
connection
master
;
--
disable_warnings
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
CREATE
TABLE
t1
(
id
INT
);
let
$
1
=
100
;
disable_query_log
;
begin
;
while
(
$
1
)
{
eval
INSERT
INTO
t1
VALUES
(
$
1
);
dec
$
1
;
}
DROP
TABLE
t1
;
save_master_pos
;
enable_query_log
;
## ON SLAVE
connection
slave
;
start
slave
;
--
source
include
/
wait_for_slave_to_start
.
inc
sync_with_master
0
;
connection
master
;
save_master_pos
;
connection
slave
;
--
exec
echo
"restart"
>
$MYSQLTEST_VARDIR
/
tmp
/
slave0
.
expect
SET
GLOBAL
debug
=
"+d,crash_before_purge_logs"
;
--
error
2013
# try to rotate logs
FLUSH
LOGS
;
--
enable_reconnect
--
source
include
/
wait_until_connected_again
.
inc
start
slave
;
--
source
include
/
wait_for_slave_to_start
.
inc
sync_with_master
0
;
sql/log.cc
View file @
a0869f7c
...
...
@@ -2978,7 +2978,7 @@ int MYSQL_BIN_LOG::purge_first_log(Relay_log_info* rli, bool included)
* Need to update the log pos because purge logs has been called
* after fetching initially the log pos at the begining of the method.
*/
if
(
error
=
find_log_pos
(
&
rli
->
linfo
,
rli
->
event_relay_log_name
,
0
))
if
(
(
error
=
find_log_pos
(
&
rli
->
linfo
,
rli
->
event_relay_log_name
,
0
)
))
{
char
buff
[
22
];
sql_print_error
(
"next log error: %d offset: %s log: %s included: %d"
,
...
...
@@ -3044,7 +3044,6 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
ulonglong
*
decrease_log_space
)
{
int
error
;
int
ret
=
0
;
bool
exit_loop
=
0
;
LOG_INFO
log_info
;
THD
*
thd
=
current_thd
;
...
...
@@ -3067,8 +3066,8 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
*/
if
(
!
my_b_inited
(
&
purge_temp
))
{
if
(
error
=
open_cached_file
(
&
purge_temp
,
mysql_tmpdir
,
TEMP_PREFIX
,
DISK_BUFFER_SIZE
,
MYF
(
MY_WME
)))
if
(
(
error
=
open_cached_file
(
&
purge_temp
,
mysql_tmpdir
,
TEMP_PREFIX
,
DISK_BUFFER_SIZE
,
MYF
(
MY_WME
)
)))
{
sql_print_error
(
"MYSQL_LOG::purge_logs failed to open purge_temp"
);
goto
err
;
...
...
@@ -3076,7 +3075,7 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
}
else
{
if
(
error
=
reinit_io_cache
(
&
purge_temp
,
WRITE_CACHE
,
0
,
0
,
1
))
if
(
(
error
=
reinit_io_cache
(
&
purge_temp
,
WRITE_CACHE
,
0
,
0
,
1
)
))
{
sql_print_error
(
"MYSQL_LOG::purge_logs failed to reinit purge_temp "
"for write"
);
...
...
@@ -3107,7 +3106,7 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
}
/* We know how many files to delete. Update index file. */
if
(
error
=
update_log_index
(
&
log_info
,
need_update_threads
))
if
(
(
error
=
update_log_index
(
&
log_info
,
need_update_threads
)
))
{
sql_print_error
(
"MSYQL_LOG::purge_logs failed to update the index file"
);
goto
err
;
...
...
@@ -3116,7 +3115,7 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
DBUG_EXECUTE_IF
(
"crash_after_update_index"
,
abort
(););
/* Switch purge_temp for read. */
if
(
error
=
reinit_io_cache
(
&
purge_temp
,
READ_CACHE
,
0
,
0
,
0
))
if
(
(
error
=
reinit_io_cache
(
&
purge_temp
,
READ_CACHE
,
0
,
0
,
0
)
))
{
sql_print_error
(
"MSYQL_LOG::purge_logs failed to reinit purge_temp "
"for read"
);
...
...
@@ -3251,6 +3250,7 @@ int MYSQL_BIN_LOG::purge_logs(const char *to_log,
}
err:
close_cached_file
(
&
purge_temp
);
if
(
need_mutex
)
pthread_mutex_unlock
(
&
LOCK_index
);
DBUG_RETURN
(
error
);
...
...
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