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
9b4c3d0d
Commit
9b4c3d0d
authored
Jul 10, 2007
by
tnurnberg@sin.intern.azundris.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/home/tnurnberg/22540/50-22540
parents
ccea97fa
3dfc83f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
165 deletions
+9
-165
mysql-test/r/binlog.result
mysql-test/r/binlog.result
+0
-97
mysql-test/t/binlog.test
mysql-test/t/binlog.test
+0
-61
sql/log.cc
sql/log.cc
+9
-7
No files found.
mysql-test/r/binlog.result
View file @
9b4c3d0d
...
...
@@ -153,105 +153,8 @@ master-bin.000001 353 Query 1 441 use `test`; insert into t1 values (2)
master-bin.000001 441 Query 1 529 use `test`; insert into t1 values (3)
master-bin.000001 529 Xid 1 556 COMMIT /* XID */
master-bin.000001 556 Query 1 632 use `test`; drop table t1
set autocommit= 1;
reset master;
create table t1(n int) engine=innodb;
insert into t1 values (1);
insert into t1 values (2);
insert into t1 values (3);
commit;
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4
master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=innodb
master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (1)
master-bin.000001 285 Xid 1 312 COMMIT /* XID */
master-bin.000001 312 Query 1 400 use `test`; insert into t1 values (2)
master-bin.000001 400 Xid 1 427 COMMIT /* XID */
master-bin.000001 427 Query 1 515 use `test`; insert into t1 values (3)
master-bin.000001 515 Xid 1 542 COMMIT /* XID */
master-bin.000001 542 Query 1 618 use `test`; drop table t1
reset master;
create table t1(n int) engine=myisam;
begin;
insert into t1 values (4);
insert into t1 values (5);
insert into t1 values (6);
commit;
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4
master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=myisam
master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (4)
master-bin.000001 285 Query 1 373 use `test`; insert into t1 values (5)
master-bin.000001 373 Query 1 461 use `test`; insert into t1 values (6)
master-bin.000001 461 Query 1 537 use `test`; drop table t1
set autocommit= 1;
reset master;
create table t1(n int) engine=innodb;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 197
insert into t1 values (1);
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 312
insert into t1 values (2);
insert into t1 values (3);
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 542
commit;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 542
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4
master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=innodb
master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (1)
master-bin.000001 285 Xid 1 312 COMMIT /* XID */
master-bin.000001 312 Query 1 400 use `test`; insert into t1 values (2)
master-bin.000001 400 Xid 1 427 COMMIT /* XID */
master-bin.000001 427 Query 1 515 use `test`; insert into t1 values (3)
master-bin.000001 515 Xid 1 542 COMMIT /* XID */
master-bin.000001 542 Query 1 618 use `test`; drop table t1
set autocommit= 0;
reset master;
create table t1(n int) engine=myisam;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 197
insert into t1 values (4);
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 285
insert into t1 values (5);
insert into t1 values (6);
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 461
commit;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 461
drop table t1;
show binlog events from 0;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 98 Server version, Binlog ver: 4
master-bin.000001 98 Query 1 197 use `test`; create table t1(n int) engine=myisam
master-bin.000001 197 Query 1 285 use `test`; insert into t1 values (4)
master-bin.000001 285 Query 1 373 use `test`; insert into t1 values (5)
master-bin.000001 373 Query 1 461 use `test`; insert into t1 values (6)
master-bin.000001 461 Query 1 537 use `test`; drop table t1
set session autocommit = @ac;
set @bcs = @@binlog_cache_size;
set @ac = @@autocommit;
set global binlog_cache_size=4096;
set autocommit= 0;
reset master;
create table t1 (a int) engine=innodb;
show binlog events from 0;
...
...
mysql-test/t/binlog.test
View file @
9b4c3d0d
...
...
@@ -78,72 +78,11 @@ drop table t1;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
set
autocommit
=
1
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
innodb
;
insert
into
t1
values
(
1
);
insert
into
t1
values
(
2
);
insert
into
t1
values
(
3
);
commit
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
myisam
;
begin
;
insert
into
t1
values
(
4
);
insert
into
t1
values
(
5
);
insert
into
t1
values
(
6
);
commit
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
# now show this also works for SHOW MASTER STATUS
# as this is what "mysqldump --master-data=1" uses.
set
autocommit
=
1
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
innodb
;
show
master
status
;
insert
into
t1
values
(
1
);
show
master
status
;
insert
into
t1
values
(
2
);
insert
into
t1
values
(
3
);
show
master
status
;
commit
;
show
master
status
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
set
autocommit
=
0
;
reset
master
;
create
table
t1
(
n
int
)
engine
=
myisam
;
show
master
status
;
insert
into
t1
values
(
4
);
show
master
status
;
insert
into
t1
values
(
5
);
insert
into
t1
values
(
6
);
show
master
status
;
commit
;
show
master
status
;
drop
table
t1
;
--
replace_regex
/
\
/
\
*
xid
=.*
\
*
\
//\/* XID *\// /table_id: [0-9]+/table_id: #/ /Server ver: [^,]*,/Server version,/
show
binlog
events
from
0
;
set
session
autocommit
=
@
ac
;
# now show that nothing breaks if we need to read from the cache more
# than once, resulting in split event-headers
set
@
bcs
=
@@
binlog_cache_size
;
set
@
ac
=
@@
autocommit
;
set
global
binlog_cache_size
=
4096
;
set
autocommit
=
0
;
reset
master
;
create
table
t1
(
a
int
)
engine
=
innodb
;
...
...
sql/log.cc
View file @
9b4c3d0d
...
...
@@ -1965,14 +1965,14 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event)
}
/*
Adjust hdr_offs. Note that this doesn't mean it will necessarily
be valid in the next iteration; if the current event is very long,
it may take a couple of read-iterations (and subsequent fixings
of hdr_offs) for it to become valid again.
if we had a split header, hdr_offs was already fixed above.
Adjust hdr_offs. Note that it may still point beyond the segment
read in the next iteration; if the current event is very long,
it may take a couple of read-iterations (and subsequent adjustments
of hdr_offs) for it to point into the then-current segment.
If we have a split header (!carry), hdr_offs will be set at the
beginning of the next iteration, overwriting the value we set here:
*/
if
(
carry
==
0
)
hdr_offs
-=
length
;
hdr_offs
-=
length
;
}
/* Write data to the binary log file */
...
...
@@ -1982,6 +1982,8 @@ bool MYSQL_LOG::write(THD *thd, IO_CACHE *cache, Log_event *commit_event)
DBUG_EXECUTE_IF
(
"half_binlogged_transaction"
,
goto
DBUG_skip_commit
;);
}
while
((
length
=
my_b_fill
(
cache
)));
DBUG_ASSERT
(
carry
==
0
);
if
(
commit_event
->
write
(
&
log_file
))
goto
err
;
#ifndef DBUG_OFF
...
...
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