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
49dd89fc
Commit
49dd89fc
authored
Jan 27, 2011
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge fix for lp:697174
parents
bd894207
cf2a7c5b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
10 deletions
+22
-10
mysql-test/suite/binlog/r/binlog_consistent.result
mysql-test/suite/binlog/r/binlog_consistent.result
+4
-4
sql/log.cc
sql/log.cc
+18
-6
No files found.
mysql-test/suite/binlog/r/binlog_consistent.result
View file @
49dd89fc
...
...
@@ -6,7 +6,7 @@ File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 375
SHOW STATUS LIKE 'binlog_snapshot_%';
Variable_name Value
binlog_snapshot_file
./
master-bin.000001
binlog_snapshot_file master-bin.000001
binlog_snapshot_position 375
BEGIN;
INSERT INTO t1 VALUES (0, "");
...
...
@@ -37,7 +37,7 @@ a b
0
SHOW STATUS LIKE 'binlog_snapshot_%';
Variable_name Value
binlog_snapshot_file
./
master-bin.000001
binlog_snapshot_file master-bin.000001
binlog_snapshot_position 674
SHOW MASTER STATUS;
File Position Binlog_Do_DB Binlog_Ignore_DB
...
...
@@ -59,7 +59,7 @@ a b
0
SHOW STATUS LIKE 'binlog_snapshot_%';
Variable_name Value
binlog_snapshot_file
./
master-bin.000001
binlog_snapshot_file master-bin.000001
binlog_snapshot_position 674
SHOW MASTER STATUS;
File Position Binlog_Do_DB Binlog_Ignore_DB
...
...
@@ -67,7 +67,7 @@ master-bin.000002 240
COMMIT;
SHOW STATUS LIKE 'binlog_snapshot_%';
Variable_name Value
binlog_snapshot_file
./
master-bin.000002
binlog_snapshot_file master-bin.000002
binlog_snapshot_position 240
SHOW MASTER STATUS;
File Position Binlog_Do_DB Binlog_Ignore_DB
...
...
sql/log.cc
View file @
49dd89fc
...
...
@@ -6718,6 +6718,18 @@ static struct st_mysql_sys_var *binlog_sys_vars[]=
#endif
/*
Copy out the non-directory part of binlog position filename for the
`binlog_snapshot_file' status variable, same way as it is done for
SHOW MASTER STATUS.
*/
static
void
set_binlog_snapshot_file
(
const
char
*
src
)
{
int
dir_len
=
dirname_length
(
src
);
strmake
(
binlog_snapshot_file
,
src
+
dir_len
,
sizeof
(
binlog_snapshot_file
)
-
1
);
}
/*
Copy out current values of status variables, for SHOW STATUS or
information_schema.global_status.
...
...
@@ -6734,21 +6746,21 @@ TC_LOG_BINLOG::set_status_variables(THD *thd)
else
trx_data
=
NULL
;
bool
have_snapshot
=
(
trx_data
&&
0
!=
strcmp
(
trx_data
->
last_commit_pos_file
,
""
));
pthread_mutex_lock
(
&
LOCK_commit_ordered
);
binlog_status_var_num_commits
=
this
->
num_commits
;
binlog_status_var_num_group_commits
=
this
->
num_group_commits
;
if
(
!
trx_data
||
0
==
strcmp
(
trx_data
->
last_commit_pos_file
,
""
)
)
if
(
!
have_snapshot
)
{
strmake
(
binlog_snapshot_file
,
last_commit_pos_file
,
sizeof
(
binlog_snapshot_file
)
-
1
);
set_binlog_snapshot_file
(
last_commit_pos_file
);
binlog_snapshot_position
=
last_commit_pos_offset
;
}
pthread_mutex_unlock
(
&
LOCK_commit_ordered
);
if
(
trx_data
&&
0
!=
strcmp
(
trx_data
->
last_commit_pos_file
,
""
)
)
if
(
have_snapshot
)
{
strmake
(
binlog_snapshot_file
,
trx_data
->
last_commit_pos_file
,
sizeof
(
binlog_snapshot_file
)
-
1
);
set_binlog_snapshot_file
(
trx_data
->
last_commit_pos_file
);
binlog_snapshot_position
=
trx_data
->
last_commit_pos_offset
;
}
}
...
...
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