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
56d485e2
Commit
56d485e2
authored
Apr 29, 2013
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge 10.0-base -> 10.0
parents
2d335474
59830e1a
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
71 additions
and
41 deletions
+71
-41
mysql-test/include/restart_mysqld.inc
mysql-test/include/restart_mysqld.inc
+2
-2
mysql-test/suite/binlog/t/binlog_mdev342.test
mysql-test/suite/binlog/t/binlog_mdev342.test
+1
-2
mysql-test/suite/binlog/t/binlog_xa_recover.test
mysql-test/suite/binlog/t/binlog_xa_recover.test
+3
-6
mysql-test/suite/innodb/t/innodb_bug12902967.test
mysql-test/suite/innodb/t/innodb_bug12902967.test
+1
-1
mysql-test/suite/rpl/t/rpl_gtid_crash.test
mysql-test/suite/rpl/t/rpl_gtid_crash.test
+7
-14
mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
+2
-4
mysql-test/suite/rpl/t/rpl_mdev382.test
mysql-test/suite/rpl/t/rpl_mdev382.test
+1
-2
mysql-test/suite/storage_engine/alter_tablespace.test
mysql-test/suite/storage_engine/alter_tablespace.test
+1
-2
sql/log_event.cc
sql/log_event.cc
+26
-2
sql/log_event.h
sql/log_event.h
+2
-1
sql/mysqld.cc
sql/mysqld.cc
+15
-2
sql/sql_repl.cc
sql/sql_repl.cc
+10
-3
No files found.
mysql-test/include/restart_mysqld.inc
View file @
56d485e2
...
...
@@ -14,8 +14,8 @@ if ($rpl_inited)
--exec echo "wait" > $_expect_file_name
# Send shutdown to the connected server and give
# it
1
0 seconds to die before zapping it
shutdown_server
1
0
;
# it
6
0 seconds to die before zapping it
shutdown_server
6
0
;
# Write file to make mysql-test-run.pl start up the server again
--
exec
echo
"restart"
>
$_expect_file_name
...
...
mysql-test/suite/binlog/t/binlog_mdev342.test
View file @
56d485e2
...
...
@@ -44,8 +44,7 @@ connection con1;
--
error
2006
,
2013
reap
;
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
-
binlog_mdev342
.
test
EOF
...
...
mysql-test/suite/binlog/t/binlog_xa_recover.test
View file @
56d485e2
...
...
@@ -117,8 +117,7 @@ connection con4;
--
error
2006
,
2013
reap
;
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
-
group_commit_binlog_pos
.
test
EOF
...
...
@@ -212,8 +211,7 @@ SET SESSION debug_dbug="+d,crash_commit_after_log";
--
error
2006
,
2013
INSERT
INTO
t1
VALUES
(
14
,
NULL
);
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
-
group_commit_binlog_pos
.
test
EOF
...
...
@@ -257,8 +255,7 @@ SET SESSION debug_dbug="+d,crash_before_write_checkpoint_event";
--
error
2006
,
2013
INSERT
INTO
t1
VALUES
(
24
,
REPEAT
(
"x"
,
4100
));
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
-
group_commit_binlog_pos
.
test
EOF
...
...
mysql-test/suite/innodb/t/innodb_bug12902967.test
View file @
56d485e2
...
...
@@ -24,7 +24,7 @@ alter table t1 add constraint c1 foreign key (f1) references t1(f1);
perl
;
$file
=
$ENV
{
error_log
};
open
(
FILE
,
'<'
,
$file
)
or
die
"can't open(<
$file
): $!
\n
"
;
print
((
grep
{
/^
InnoDB
:/
and
not
/
aio
/
i
}
<
FILE
>
)[
-
2.
.-
1
]);
print
((
grep
{
/^
InnoDB
:/
and
not
/
aio
/
i
and
not
/
io_setup
\
(
\
)
attempt
[
0
-
9
]
+
failed
/
}
<
FILE
>
)[
-
2.
.-
1
]);
EOF
drop
table
t1
;
mysql-test/suite/rpl/t/rpl_gtid_crash.test
View file @
56d485e2
...
...
@@ -53,8 +53,7 @@ SET SESSION debug_dbug="+d,crash_dispatch_command_before";
SELECT
1
;
--
source
include
/
wait_until_disconnected
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
-
rpl_gtid_crash
.
test
EOF
...
...
@@ -113,8 +112,7 @@ SET SESSION debug_dbug="+d,crash_dispatch_command_before";
SELECT
1
;
--
source
include
/
wait_until_disconnected
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
EOF
...
...
@@ -148,8 +146,7 @@ INSERT INTO t1 VALUES (4);
--
connection
server_2
--
source
include
/
wait_until_disconnected
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
restart
:
--
skip
-
slave
-
start
=
0
EOF
...
...
@@ -173,8 +170,7 @@ INSERT INTO t1 VALUES (5);
--
connection
server_2
--
source
include
/
wait_until_disconnected
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
restart
:
--
skip
-
slave
-
start
=
0
EOF
...
...
@@ -198,8 +194,7 @@ INSERT INTO t1 VALUES (6);
--
connection
server_2
--
source
include
/
wait_until_disconnected
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
restart
:
--
skip
-
slave
-
start
=
0
EOF
...
...
@@ -223,8 +218,7 @@ INSERT INTO t1 VALUES (7);
--
connection
server_2
--
source
include
/
wait_until_disconnected
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
restart
:
--
skip
-
slave
-
start
=
0
EOF
...
...
@@ -248,8 +242,7 @@ INSERT INTO t1 VALUES (8);
--
connection
server_2
--
source
include
/
wait_until_disconnected
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
restart
:
--
skip
-
slave
-
start
=
0
EOF
...
...
mysql-test/suite/rpl/t/rpl_gtid_stop_start.test
View file @
56d485e2
...
...
@@ -41,8 +41,7 @@ INSERT INTO t1 VALUES (3);
--
source
include
/
show_binary_logs
.
inc
# Let the slave mysqld server start again.
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
2.
expect
restart
:
--
skip
-
slave
-
start
=
0
EOF
...
...
@@ -72,8 +71,7 @@ EOF
--
shutdown_server
30
--
source
include
/
wait_until_disconnected
.
inc
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
EOF
...
...
mysql-test/suite/rpl/t/rpl_mdev382.test
View file @
56d485e2
...
...
@@ -210,8 +210,7 @@ EOF
--
shutdown_server
30
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
-
rpl_mdev382
.
test
EOF
...
...
mysql-test/suite/storage_engine/alter_tablespace.test
View file @
56d485e2
...
...
@@ -53,8 +53,7 @@ EOF
--
replace_result
$datadir
<
DATADIR
>
--
copy_file
$datadir
/
test
/
t1
.
ibd
$datadir
/
test
/
t1
.
ibd
.
save
--
remove_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
write_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
--
append_file
$MYSQLTEST_VARDIR
/
tmp
/
mysqld
.
1.
expect
restart
EOF
...
...
sql/log_event.cc
View file @
56d485e2
...
...
@@ -4236,8 +4236,19 @@ Query_log_event::do_shall_skip(Relay_log_info *rli)
bool
Query_log_event
::
peek_is_commit_rollback
(
const
char
*
event_start
,
size_t
event_len
)
size_t
event_len
,
uint8
checksum_alg
)
{
if
(
checksum_alg
==
BINLOG_CHECKSUM_ALG_CRC32
)
{
if
(
event_len
>
BINLOG_CHECKSUM_LEN
)
event_len
-=
BINLOG_CHECKSUM_LEN
;
else
event_len
=
0
;
}
else
DBUG_ASSERT
(
checksum_alg
==
BINLOG_CHECKSUM_ALG_UNDEF
||
checksum_alg
==
BINLOG_CHECKSUM_ALG_OFF
);
if
(
event_len
<
LOG_EVENT_HEADER_LEN
+
QUERY_HEADER_LEN
||
event_len
<
9
)
return
false
;
return
!
memcmp
(
event_start
+
(
event_len
-
7
),
"
\0
COMMIT"
,
7
)
||
...
...
@@ -6050,10 +6061,23 @@ Gtid_log_event::Gtid_log_event(THD *thd_arg, uint64 seq_no_arg,
*/
bool
Gtid_log_event
::
peek
(
const
char
*
event_start
,
size_t
event_len
,
uint8
checksum_alg
,
uint32
*
domain_id
,
uint32
*
server_id
,
uint64
*
seq_no
,
uchar
*
flags2
)
{
const
char
*
p
;
if
(
checksum_alg
==
BINLOG_CHECKSUM_ALG_CRC32
)
{
if
(
event_len
>
BINLOG_CHECKSUM_LEN
)
event_len
-=
BINLOG_CHECKSUM_LEN
;
else
event_len
=
0
;
}
else
DBUG_ASSERT
(
checksum_alg
==
BINLOG_CHECKSUM_ALG_UNDEF
||
checksum_alg
==
BINLOG_CHECKSUM_ALG_OFF
);
if
(
event_len
<
LOG_EVENT_HEADER_LEN
+
GTID_HEADER_LEN
)
return
true
;
*
server_id
=
uint4korr
(
event_start
+
SERVER_ID_OFFSET
);
...
...
@@ -6100,7 +6124,7 @@ Gtid_log_event::make_compatible_event(String *packet, bool *need_dummy_event,
flags2
=
(
*
packet
)[
ev_offset
+
LOG_EVENT_HEADER_LEN
+
12
];
if
(
flags2
&
FL_STANDALONE
)
{
if
(
need_dummy_event
)
if
(
*
need_dummy_event
)
return
Query_log_event
::
dummy_event
(
packet
,
ev_offset
,
checksum_alg
);
else
return
0
;
...
...
sql/log_event.h
View file @
56d485e2
...
...
@@ -1946,7 +1946,7 @@ public: /* !!! Public in this patch to allow old usage */
const
char
*
query_arg
,
uint32
q_len_arg
);
static
bool
peek_is_commit_rollback
(
const
char
*
event_start
,
size_t
event_len
);
size_t
event_len
,
uint8
checksum_alg
);
#endif
/* HAVE_REPLICATION */
/*
If true, the event always be applied by slave SQL thread or be printed by
...
...
@@ -3084,6 +3084,7 @@ public:
static
int
make_compatible_event
(
String
*
packet
,
bool
*
need_dummy_event
,
ulong
ev_offset
,
uint8
checksum_alg
);
static
bool
peek
(
const
char
*
event_start
,
size_t
event_len
,
uint8
checksum_alg
,
uint32
*
domain_id
,
uint32
*
server_id
,
uint64
*
seq_no
,
uchar
*
flags2
);
#endif
...
...
sql/mysqld.cc
View file @
56d485e2
...
...
@@ -1595,8 +1595,21 @@ static void close_connections(void)
Events
::
deinit
();
end_slave
();
/* Give threads time to die. */
for
(
int
i
=
0
;
*
(
volatile
int32
*
)
&
thread_count
&&
i
<
100
;
i
++
)
/*
Give threads time to die.
In 5.5, this was waiting 100 rounds @ 20 milliseconds/round, so as little
as 2 seconds, depending on thread scheduling.
From 10.0, we increase this to 1000 rounds / 20 seconds. The rationale is
that on a server with heavy I/O load, it is quite possible for eg. an
fsync() of the binlog or whatever to cause something like LOCK_log to be
held for more than 2 seconds. We do not want to force kill threads in
such cases, if it can be avoided. Note that normally, the wait will be
much smaller than even 2 seconds, this is only a safety fallback against
stuck threads so server shutdown is not held up forever.
*/
for
(
int
i
=
0
;
*
(
volatile
int32
*
)
&
thread_count
&&
i
<
1000
;
i
++
)
my_sleep
(
20000
);
/*
...
...
sql/sql_repl.cc
View file @
56d485e2
...
...
@@ -1160,7 +1160,8 @@ gtid_state_from_pos(const char *name, uint32 offset,
{
rpl_gtid
gtid
;
uchar
flags2
;
if
(
Gtid_log_event
::
peek
(
packet
.
ptr
(),
packet
.
length
(),
&
gtid
.
domain_id
,
if
(
Gtid_log_event
::
peek
(
packet
.
ptr
(),
packet
.
length
(),
current_checksum_alg
,
&
gtid
.
domain_id
,
&
gtid
.
server_id
,
&
gtid
.
seq_no
,
&
flags2
))
{
errormsg
=
"Corrupt gtid_log_event found while scanning binlog to find "
...
...
@@ -1253,6 +1254,7 @@ send_event_to_slave(THD *thd, NET *net, String* const packet, ushort flags,
if
(
ev_offset
>
len
||
Gtid_log_event
::
peek
(
packet
->
ptr
()
+
ev_offset
,
len
-
ev_offset
,
current_checksum_alg
,
&
domain_id
,
&
server_id
,
&
seq_no
,
&
flags2
))
return
"Failed to read Gtid_log_event: corrupt binlog"
;
gtid
=
gtid_state
->
find
(
domain_id
);
...
...
@@ -1287,7 +1289,8 @@ send_event_to_slave(THD *thd, NET *net, String* const packet, ushort flags,
if
(
event_type
==
XID_EVENT
||
(
event_type
==
QUERY_EVENT
&&
Query_log_event
::
peek_is_commit_rollback
(
packet
->
ptr
()
+
ev_offset
,
len
-
ev_offset
)))
len
-
ev_offset
,
current_checksum_alg
)))
*
gtid_skip_group
=
GTID_SKIP_NOT
;
return
NULL
;
case
GTID_SKIP_NOT
:
...
...
@@ -1727,13 +1730,15 @@ impossible position";
while
(
!
net
->
error
&&
net
->
vio
!=
0
&&
!
thd
->
killed
)
{
Log_event_type
event_type
=
UNKNOWN_EVENT
;
killed_state
killed
;
/* reset the transmit packet for the event read from binary log
file */
if
(
reset_transmit_packet
(
thd
,
flags
,
&
ev_offset
,
&
errmsg
))
goto
err
;
while
(
!
(
error
=
Log_event
::
read_log_event
(
&
log
,
packet
,
log_lock
,
while
(
!
(
killed
=
thd
->
killed
)
&&
!
(
error
=
Log_event
::
read_log_event
(
&
log
,
packet
,
log_lock
,
current_checksum_alg
)))
{
#ifndef DBUG_OFF
...
...
@@ -1818,6 +1823,8 @@ impossible position";
if
(
reset_transmit_packet
(
thd
,
flags
,
&
ev_offset
,
&
errmsg
))
goto
err
;
}
if
(
killed
)
goto
end
;
/*
TODO: now that we are logging the offset, check to make sure
...
...
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