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

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 641
Proposed branch: lp:~sergei.glushchenko/percona-server/5.5-ps-bug1282008
Merge into: lp:percona-server/5.5
Diff against target: 32 lines (+7/-1)
1 file modified
sql/threadpool_common.cc (+7/-1)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-server/5.5-ps-bug1282008
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+210139@code.launchpad.net

Description of the change

Notify audit plugin using MYSQL_AUDIT_NOTIFY_CONNECTION_CONNECT.

http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/961/

To post a comment you must log in.
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Looks OK, but there is one more difference from the one thread per connection code path: MYSQL_CONNECTION_START callback for DTrace. Is that one missing too?

review: Needs Information
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Looks good. Consider adding a testcase for this to the audit plugin MP, if you have to revisit it.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'sql/threadpool_common.cc'
2--- sql/threadpool_common.cc 2013-12-02 12:17:20 +0000
3+++ sql/threadpool_common.cc 2014-03-15 08:25:22 +0000
4@@ -23,6 +23,7 @@
5 #include <sql_audit.h>
6 #include <debug_sync.h>
7 #include <threadpool.h>
8+#include <probes_mysql.h>
9
10
11 /* Threadpool parameters */
12@@ -147,7 +148,9 @@
13
14 if (!setup_connection_thread_globals(thd))
15 {
16- if (!login_connection(thd))
17+ bool rc= login_connection(thd);
18+ MYSQL_AUDIT_NOTIFY_CONNECTION_CONNECT(thd);
19+ if (!rc)
20 {
21 prepare_new_connection_state(thd);
22
23@@ -161,6 +164,9 @@
24 thd->net.reading_or_writing= 1;
25 thd->skip_wait_timeout= true;
26 }
27+
28+ MYSQL_CONNECTION_START(thd->thread_id, &thd->security_ctx->priv_user[0],
29+ (char *) thd->security_ctx->host_or_ip);
30 }
31 }
32 worker_context.restore();

Subscribers

People subscribed via source and target branches