Merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1335590 into lp:percona-server/5.5

Proposed by Sergei Glushchenko on 2014-06-30
Status: Merged
Approved by: Laurynas Biveinis on 2014-10-08
Approved revision: 699
Merged at revision: 704
Proposed branch: lp:~sergei.glushchenko/percona-server/5.5-ps-bug1335590
Merge into: lp:percona-server/5.5
Prerequisite: lp:~sergei.glushchenko/percona-server/5.5-ps-blueprint-audit-log-streaming
Diff against target: 69 lines (+54/-0)
3 files modified
mysql-test/r/audit_log_threadpool.result (+9/-0)
mysql-test/t/audit_log_threadpool-master.opt (+5/-0)
mysql-test/t/audit_log_threadpool.test (+40/-0)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1335590
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve on 2014-10-08
Registry Administrators 2014-06-30 Pending
Review via email: mp+224953@code.launchpad.net

Description of the change

Test case for Audit Plugin + Threadpool

To post a comment you must log in.
review: Approve

Could you please discard rev 671 and recommit rev 672 on a recent GCA?

$ bzr merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1335590
Warning: criss-cross merge encountered. See bzr help criss-cross.
+N mysql-test/r/audit_log.result.OTHER
+N mysql-test/r/audit_log_threadpool.result
+N mysql-test/t/audit_log.test.OTHER
+N mysql-test/t/audit_log_threadpool-master.opt
+N mysql-test/t/audit_log_threadpool.test
+N plugin/audit_log/audit_file.c
+N plugin/audit_log/audit_handler.h
+N plugin/audit_log/audit_syslog.c
R plugin/audit_log/audit_file.c => plugin/audit_log/audit_file.c.moved
R plugin/audit_log/audit_handler.h => plugin/audit_log/audit_handler.h.moved
 M plugin/audit_log/audit_log.c
R plugin/audit_log/audit_syslog.c => plugin/audit_log/audit_syslog.c.moved
 M plugin/audit_log/buffer.h
 M plugin/audit_log/logger.h
Contents conflict in mysql-test/r/audit_log.result
Contents conflict in mysql-test/t/audit_log.test
Conflict adding file plugin/audit_log/audit_file.c. Moved existing file to plugin/audit_log/audit_file.c.moved.
Conflict adding file plugin/audit_log/audit_handler.h. Moved existing file to plugin/audit_log/audit_handler.h.moved.
Text conflict in plugin/audit_log/audit_log.c
Conflict adding file plugin/audit_log/audit_syslog.c. Moved existing file to plugin/audit_log/audit_syslog.c.moved.
Text conflict in plugin/audit_log/buffer.h
Text conflict in plugin/audit_log/logger.h
8 conflicts encountered.

review: Needs Fixing
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'mysql-test/r/audit_log_threadpool.result'
2--- mysql-test/r/audit_log_threadpool.result 1970-01-01 00:00:00 +0000
3+++ mysql-test/r/audit_log_threadpool.result 2014-10-07 09:25:43 +0000
4@@ -0,0 +1,9 @@
5+set global audit_log_flush= ON;
6+select 1;
7+1
8+1
9+select '1more';
10+1more
11+1more
12+set global audit_log_flush= ON;
13+1 connects, 1 disconnects
14
15=== added file 'mysql-test/t/audit_log_threadpool-master.opt'
16--- mysql-test/t/audit_log_threadpool-master.opt 1970-01-01 00:00:00 +0000
17+++ mysql-test/t/audit_log_threadpool-master.opt 2014-10-07 09:25:43 +0000
18@@ -0,0 +1,5 @@
19+$AUDIT_LOG_OPT
20+$AUDIT_LOG_LOAD
21+--audit_log_strategy=SYNCHRONOUS
22+--audit_log_file=test_audit_threadpool.log
23+--thread_handling=pool-of-threads
24\ No newline at end of file
25
26=== added file 'mysql-test/t/audit_log_threadpool.test'
27--- mysql-test/t/audit_log_threadpool.test 1970-01-01 00:00:00 +0000
28+++ mysql-test/t/audit_log_threadpool.test 2014-10-07 09:25:43 +0000
29@@ -0,0 +1,40 @@
30+--source include/not_embedded.inc
31+
32+let $MYSQLD_DATADIR= `select @@datadir`;
33+let MYSQLD_DATADIR= $MYSQLD_DATADIR;
34+
35+--move_file $MYSQLD_DATADIR/test_audit_threadpool.log $MYSQLD_DATADIR/test_audit_threadpool_garbage.log
36+set global audit_log_flush= ON;
37+
38+--source include/count_sessions.inc
39+connect (con1,localhost,root,,mysql);
40+select 1;
41+connection default;
42+disconnect con1;
43+--source include/wait_until_count_sessions.inc
44+
45+connection default;
46+select '1more';
47+
48+--move_file $MYSQLD_DATADIR/test_audit_threadpool.log $MYSQLD_DATADIR/test_audit_threadpool_done.log
49+set global audit_log_flush= ON;
50+
51+perl;
52+ use strict;
53+ use warnings;
54+
55+ my $logfile = $ENV{'MYSQLD_DATADIR'} . '/test_audit_threadpool_done.log';
56+
57+ open(FILE, $logfile) or die "cannot open $logfile!";
58+ my @buf = <FILE>;
59+ close(FILE);
60+
61+ my $connect_count = grep(/Connect/, @buf);
62+ my $disconnect_count = grep(/Quit/, @buf);
63+
64+ print "$connect_count connects, $disconnect_count disconnects\n";
65+EOF
66+
67+--remove_file $MYSQLD_DATADIR/test_audit_threadpool.log
68+--remove_file $MYSQLD_DATADIR/test_audit_threadpool_garbage.log
69+--remove_file $MYSQLD_DATADIR/test_audit_threadpool_done.log

Subscribers

People subscribed via source and target branches