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
a43992d7
Commit
a43992d7
authored
Mar 11, 2009
by
Georgi Kodinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert the push for bug #39858
parent
50936c99
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
25 deletions
+10
-25
mysql-test/suite/rpl/r/rpl_rotate_logs.result
mysql-test/suite/rpl/r/rpl_rotate_logs.result
+3
-1
mysql-test/suite/rpl/t/rpl_rotate_logs.test
mysql-test/suite/rpl/t/rpl_rotate_logs.test
+7
-24
No files found.
mysql-test/suite/rpl/r/rpl_rotate_logs.result
View file @
a43992d7
...
...
@@ -87,7 +87,9 @@ show binary logs;
Log_name File_size
master-bin.000002 #
master-bin.000003 #
SELECT @time_for_purge:=DATE_ADD('tmpval', INTERVAL 1 SECOND);
select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND)
from information_schema.tables
where TABLE_SCHEMA="test" and TABLE_NAME="t2";
purge master logs before (@time_for_purge);
show binary logs;
Log_name File_size
...
...
mysql-test/suite/rpl/t/rpl_rotate_logs.test
View file @
a43992d7
...
...
@@ -112,31 +112,14 @@ source include/show_master_logs.inc;
purge
binary
logs
to
'master-bin.000002'
;
source
include
/
show_binary_logs
.
inc
;
# Set the purge time 1 second after the last modify time of master-bin.000002.
let
$MYSQLD_DATADIR
=
`select @@datadir`
;
--
exec
stat
$MYSQLD_DATADIR
/
master
-
bin
.
000002
>
$MYSQLTEST_VARDIR
/
tmp
/
rpl_rotate_logs
.
000002
--
exec
echo
>
$MYSQLTEST_VARDIR
/
tmp
/
rpl_rotate_logs
.
tmp
perl
;
open
F
,
$ENV
{
'MYSQLTEST_VARDIR'
}
.
'/tmp/rpl_rotate_logs.000002'
or
die
"Tmp file rpl_rotate_logs.000002 not found"
;
open
F2
,
">>"
.
$ENV
{
'MYSQLTEST_VARDIR'
}
.
'/tmp/rpl_rotate_logs.tmp'
or
die
"Tmp file rpl_rotate_logs.tmp not found"
;
while
(
<
F
>
)
{
if
(
/
Modify
:
([
^
]
*
)
([
^
]
*
)
\
./
)
{
printf
F2
(
"let
\$
tmpval = %s %s;"
,
$
1
,
$
2
);
}
}
close
F
;
close
F2
;
EOF
--
source
$MYSQLTEST_VARDIR
/
tmp
/
rpl_rotate_logs
.
tmp
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
rpl_rotate_logs
.
000002
;
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
rpl_rotate_logs
.
tmp
;
# Calculate time to use in "purge master logs before" by taking
# last modification time of t2 and adding 1 second
# This is donw in order to handle the case where file system
# time differs from mysqld's time
--
disable_result_log
--
replace_result
$tmpval
tmpval
--
eval
SELECT
@
time_for_purge
:=
DATE_ADD
(
'$tmpval'
,
INTERVAL
1
SECOND
)
select
@
time_for_purge
:=
DATE_ADD
(
UPDATE_TIME
,
INTERVAL
1
SECOND
)
from
information_schema
.
tables
where
TABLE_SCHEMA
=
"test"
and
TABLE_NAME
=
"t2"
;
--
enable_result_log
purge
master
logs
before
(
@
time_for_purge
);
...
...
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