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
37e7a074
Commit
37e7a074
authored
Mar 23, 2007
by
serg@sergbook.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
into sergbook.mysql.com:/usr/home/serg/Abk/mysql-5.0
parents
30c8ec9f
25b49e99
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
4 deletions
+55
-4
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+11
-4
mysql-test/r/mysqlbinlog2.result
mysql-test/r/mysqlbinlog2.result
+36
-0
mysql-test/t/mysqlbinlog2.test
mysql-test/t/mysqlbinlog2.test
+8
-0
No files found.
client/mysqlbinlog.cc
View file @
37e7a074
...
...
@@ -1044,7 +1044,7 @@ static int dump_remote_log_entries(PRINT_EVENT_INFO *print_event_info,
uint
logname_len
;
NET
*
net
;
int
error
=
0
;
my_off_t
old_off
=
start_position_mot
;
my_off_t
old_off
=
min
(
start_position_mot
,
BIN_LOG_HEADER_SIZE
)
;
char
fname
[
FN_REFLEN
+
1
];
DBUG_ENTER
(
"dump_remote_log_entries"
);
...
...
@@ -1196,10 +1196,17 @@ could be out of memory");
}
}
/*
Let's adjust offset for remote log as for local log to produce
similar text.
Let's adjust offset for remote log as for local log to produce
similar text and to have --stop-position to work identically.
Exception - the server sends Format_description_log_event
in the beginning of the dump, and only after it the event from
start_position. Let the old_off reflect it.
*/
old_off
+=
len
-
1
;
if
(
old_off
<
start_position_mot
)
old_off
=
start_position_mot
;
else
old_off
+=
len
-
1
;
}
err:
...
...
mysql-test/r/mysqlbinlog2.result
View file @
37e7a074
...
...
@@ -122,6 +122,24 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- start and stop positions ---
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
SET INSERT_ID=4/*!*/;
use test/*!*/;
SET TIMESTAMP=1579609946/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
insert into t1 values(null, "d")/*!*/;
SET INSERT_ID=5/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
...
...
@@ -481,6 +499,24 @@ DELIMITER ;
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- start and stop positions ---
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
SET INSERT_ID=4/*!*/;
use test/*!*/;
SET TIMESTAMP=1579609946/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1/*!*/;
SET @@session.sql_mode=0/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
insert into t1 values(null, "d")/*!*/;
SET INSERT_ID=5/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
--- start-datetime --
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
...
...
mysql-test/t/mysqlbinlog2.test
View file @
37e7a074
...
...
@@ -55,6 +55,10 @@ select "--- stop-position --" as "";
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
stop
-
position
=
600
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
--
disable_query_log
select
"--- start and stop positions ---"
as
""
;
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
600
--
stop
-
position
725
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
--
disable_query_log
select
"--- start-datetime --"
as
""
;
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
"--start-datetime=2020-01-21 15:32:24"
$MYSQLTEST_VARDIR
/
log
/
master
-
bin
.
000001
...
...
@@ -111,6 +115,10 @@ select "--- stop-position --" as "";
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
stop
-
position
=
600
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000001
--
disable_query_log
select
"--- start and stop positions ---"
as
""
;
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
--
start
-
position
=
600
--
stop
-
position
725
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000001
--
disable_query_log
select
"--- start-datetime --"
as
""
;
--
enable_query_log
--
exec
$MYSQL_BINLOG
--
short
-
form
"--start-datetime=2020-01-21 15:32:24"
--
read
-
from
-
remote
-
server
--
user
=
root
--
host
=
127.0
.
0.1
--
port
=
$MASTER_MYPORT
master
-
bin
.
000001
...
...
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