Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
142 commits
Select commit Hold shift + click to select a range
60f1b8e
reindented source files
creechy Jul 26, 2012
ed048a3
added the ability to limit auditing output to specific commands and o…
creechy Jul 26, 2012
68a2523
Fixed issue where values were not being configured from my.cnf.
creechy Jul 28, 2012
3595c3b
Added an audit_checksum parameter used with audit_offsets as an addit…
creechy Jul 28, 2012
23dd5f8
Changed audit_record_objs syntax to period separator, database.table …
creechy Jul 30, 2012
eddd9e6
check in hot patch remove to return immediatly if not needed
Aug 1, 2012
59f5b82
formating cleanup
Aug 1, 2012
2325998
More offsets for latest mysql versions upto 5.1.63 and 5.5.25.
Aug 1, 2012
6dae356
readme improvements
Aug 1, 2012
e38bc05
Adding flush support for json log file. Closes #9.
Aug 13, 2012
dac2dfc
Fix for bug found with vio. Where mysql 5.1 ndb cluster uses a differ…
Oct 4, 2012
56aac9c
issue #12 . Support for '{}' as a means to specify logging of empty o…
Oct 9, 2012
6542b9c
issue #1, issue #11: Support for mysqld compiled with a newer version…
Oct 22, 2012
3ad7e5e
Fixed some compile errors
Oct 27, 2012
9c01f96
Merge pull request #15 from mitans02/master
glicht Oct 28, 2012
887f096
fix printout of record objs
Oct 28, 2012
3ad6a17
new vars: offsets_by_version and validate_offsets_extended. By defaul…
Nov 4, 2012
b9e947f
Fixed compile error with MySQL 5.1
Nov 10, 2012
5864313
fixed changing configuration cause crash with MySQL-5.1
Nov 10, 2012
7dea2f9
runtime support for AUDIT_NEED_FREE_STRING_MEMALLOC_PLUGIN_VAR fix
Nov 11, 2012
5cdc6dd
Option added to skip queries of whitelisted users
Dec 20, 2012
4cfb7a5
Merge pull request #23 from akashsinha/userFilter
glicht Dec 23, 2012
a3df5d6
Small modifications to user white list feature.
Dec 24, 2012
c53dab3
SELinux support. Added check to fail plugin installation if page mpro…
Jan 9, 2013
e4871f5
fix typo in freeing whitelist users string. issue #27
Jan 9, 2013
af0a366
safe guards regarding checking for record objs. issue #29.
Jan 12, 2013
8d85b09
Treat Quit command as an empty object set. Issue #26.
Jan 12, 2013
f717564
Fix for issue #32. Check also object from query cache when checking a…
Feb 6, 2013
bc92825
new object iteration logic including fix for crash reported in issue #31
Feb 22, 2013
b24e191
offsets for 5.1.66-67, 5.5.29-30
Mar 1, 2013
2d9337d
issue #35. Wimplicit only with C and not C++ to support newer version…
Mar 6, 2013
cf395c3
issue #30. Change uninstall plugin logic. First time uninstall will
Mar 6, 2013
a7d789d
Suport 5.6.x
Jun 6, 2013
cb0b06e
offsets for: Percona-Server-server-55-5.5.22-rel25.2.237.rhel5.x86_64
Jun 16, 2013
59a4dae
Add MySQL5.6.12 rpm offsets
Jun 17, 2013
2e137ee
Add execute bootstrap.sh step in MySQL5.5 section
Jun 18, 2013
892aa00
Merge pull request #54 from conmame/fix_compiling_step
glicht Jun 18, 2013
66bf627
Merge pull request #53 from conmame/mysql5.6.12_offsets
glicht Jun 18, 2013
72058ca
offsets for 5.1.70 5.1.32 and 5.6.12
Jul 1, 2013
78abdea
issue #55. Change case to avoid having audit plugin status vars regis…
Jul 5, 2013
0b6223e
Add MySQL5.6.13 offsets
Jul 31, 2013
e0e9529
Add MySQL5.6 build comment
Jul 31, 2013
f822890
Merge pull request #56 from conmame/add_mysql5.6_offset
glicht Aug 4, 2013
f9da208
Merge pull request #57 from conmame/add_mysql5.6_build
glicht Aug 4, 2013
5f6bff8
remove unneeded comma at end of offset list
Aug 4, 2013
4b680c3
Support for 5.1.72, 5.5.34 and 5.6.14. Added new offsets for Security…
Oct 11, 2013
0ec8a08
issue #28: support for empty user whitelisting using "{}".
Nov 9, 2013
a1baf12
offsets for 5.1.73, 5.5.35, 5.6.15
Dec 14, 2013
9847e64
fixing compilation issue with newer mysql code base. issue 66.
Dec 14, 2013
9e2dab5
support for 5.6.14 and up where audit interface version changed
Dec 25, 2013
73876cf
compilation fix for 5.5.34 and 5.6.14 (and above). issue #66.
Jan 9, 2014
694d901
comment about interface change
Jan 29, 2014
95a8bec
fix for issue #72 . treat failure to hot patch log_slow_statement as …
Jan 29, 2014
5a63e7c
Support to compile with MariaDB src code. issue #73.
Feb 12, 2014
f2153db
Support to compile with MariaDB src code (improved comment).
Feb 26, 2014
a6d41da
better support for mariadb (including offsets for 5.5.32-36). Added o…
Apr 17, 2014
a935dc1
offsets upto: 5.5.38 and 5.6.19 including mariadb suppoort
Jun 10, 2014
d3eddd6
New feature: write header message at start of logging (both file and …
Jun 11, 2014
5e9f373
New feature: password masking. New configuration variables added: au…
Jul 6, 2014
2ffe26a
add skip_cmds option for ... skipping commands.
imreFitos Jul 27, 2014
01d938a
change skip_cmds to whitelist_cmds for consistent naming as we use wi…
Jul 27, 2014
f1adc23
offsets for 5.5.39 and 5.6.20. issue #87 .
Aug 14, 2014
23fb7f6
New retry params used when failure happens with writing to file or co…
Sep 16, 2014
caf75d3
offset support for 5.5.40 and 5.6.21. Better auto offset detection fo…
Oct 6, 2014
dd3d261
mariadb 10 offsets (upto 10.0.14). Update to third party license file…
Oct 12, 2014
c81adbd
mariadb 5.5.40 offsets
Oct 27, 2014
60074c0
Protection for case where tcp port or unix socket is not set and plug…
glicht Nov 9, 2014
4c1af96
MariaDB 10.0.15 offsets
glicht Nov 30, 2014
272a1ae
added special variable named audit_plugin_version_<version>_<revision…
glicht Dec 20, 2014
08899ff
offsets for 5.6.22 and 5.5.41
glicht Dec 28, 2014
a1c8250
New offsets added. Fixing issue #98 and a crash seen on percona when …
glicht Jan 26, 2015
9d66bfb
new option audit_record_logins to enable logging of Connect/Quit rega…
RickPizzi Feb 7, 2015
de39080
added Failed Login auditing
Feb 7, 2015
00194ab
Merge pull request #103 from RickPizzi/master
Feb 9, 2015
56462bd
fix for empty "Connect" entries at startup. issue #40 and pr #103 :
glicht Feb 9, 2015
1ac2324
offsets for 5.5.42, 5.6.23, mariadb 10.0.16
glicht Feb 9, 2015
b47ec14
Modifications to pull request #103 . Changed the name of the record_l…
glicht Feb 10, 2015
8d28867
Offsets for MariaDB 5.5.42 and 10.0.17
glicht Mar 9, 2015
24f157b
new configuration: audit_json_file_bufsize . Controls the buffer size…
glicht Mar 9, 2015
83b8508
offsets for 5.5.43 and 5.6.24
glicht Apr 15, 2015
7fcd565
mariadb offsets for 5.5.43
glicht May 6, 2015
3ac3682
mariadb offsets for: 10.0.19
glicht May 17, 2015
734882d
offsets for 5.6.25 and 5.5.44
glicht Jun 7, 2015
a5bf303
offsets for MariaDB 5.5.44
glicht Jun 16, 2015
b29ebea
Offsets for MariaDB 10.0.20
glicht Jul 12, 2015
c6d57e7
documentation fixes. see issue #115
glicht Jul 12, 2015
ef67fba
issue #118. Possible fix for the issue.
glicht Jul 29, 2015
a46b02b
offsets 5.5.45 and 5.6.26
glicht Jul 29, 2015
ee11575
Remove inlines for better investigation of issue #118
glicht Aug 2, 2015
15c7783
mariadb offsets 10.0.21 and 5.5.45. Offset validation following exper…
glicht Aug 11, 2015
051daf0
offsets for MySQL 5.5.46/5.6.27 and MariadDB 5.5.46
glicht Oct 12, 2015
94b7274
Offsets for MySQL 5.5.47, 5.6.28, MariaDB 5.5.47.
arnoldrobbins Dec 13, 2015
685b20e
Offsets for MariaDB 10.0.22 and 10.0.23.
arnoldrobbins Dec 28, 2015
d9129cc
Add support for MySQL 5.7.{9,10,11}.
arnoldrobbins Feb 7, 2016
4e4387c
Add offsets for MariaDB 10.0.24 and MariaDB 5.5.48.
arnoldrobbins Feb 25, 2016
051b1fd
Add MariaDB 10.1.12 offsets.
arnoldrobbins Mar 10, 2016
8064662
Add MariaDB 10.1.13 offsets. Format the code.
arnoldrobbins Mar 31, 2016
3589301
Offsets for MySQL 5.5.49, 5.6.30, 5.7.12. Whitespace cleanups.
arnoldrobbins Apr 19, 2016
7622e53
Add offsets for MariaDB 5.5.49 and 10.0.25.
arnoldrobbins May 1, 2016
24f86eb
Add offsets for MariaDB 10.1.14.
arnoldrobbins May 8, 2016
4c8f969
Add offsets for MySQL 5.5.50, 5.6.31, and 5.7.13.
arnoldrobbins Jun 6, 2016
1cc4406
Reduce the minimum required hot patching size from 14 to 5 on x86_64
kubo Jun 13, 2016
cd46ddb
Make gdb commands readable.
kubo Jun 13, 2016
a06030b
README update
glicht Jun 14, 2016
29bd009
Merge pull request #143 from kubo/offset-extract
Jun 19, 2016
d23cb11
Revise comments
kubo Jun 20, 2016
8b92968
Add offsets for 5.5.50-MariaDB, small white space improvement.
arnoldrobbins Jun 23, 2016
54c897d
Merge pull request #142 from kubo/reduce-hot-patching-size2
Jun 23, 2016
485bd28
Add offsets for MariaDB 10.0.26. Get hot patch code to build on older…
arnoldrobbins Jun 28, 2016
893286b
Add offsets for MariaDB 10.1.15.
arnoldrobbins Jul 4, 2016
9da5203
Typo fix in hot_patch.cc.
arnoldrobbins Jul 19, 2016
50b5207
Add offsets for MariaDB 10.1.16.
arnoldrobbins Jul 19, 2016
7c16d68
Add offsets for MySQL 5.6.32. Some whitespace cleanups.
arnoldrobbins Jul 27, 2016
6c04f8f
Fix loading on Debian 8 32-bit.
arnoldrobbins Jul 31, 2016
1c4412d
Add offsets for MySQL 5.7.14 and 5.5.51.
arnoldrobbins Jul 31, 2016
0839e92
Upgrade PCRE to 8.39 and YAJL to 2.1.0.
arnoldrobbins Jul 31, 2016
ecd9308
Add offsets for Maria DB 5.5.51.
arnoldrobbins Aug 21, 2016
faae182
Enhance computation of Unix socket name to use default settings if ne…
arnoldrobbins Aug 21, 2016
bb5a76f
Fix issue #145 - 3.8M query crashes MySQL. Fix was to use correct
arnoldrobbins Aug 25, 2016
ec36ffe
Add offsets for MariaDB 10.0.27.
arnoldrobbins Aug 28, 2016
2f59ec3
Add offsets for MariaDB 10.1.17 and MySQL 5.7.15.
arnoldrobbins Sep 5, 2016
97b6031
Add offsets for MySQL 5.5.52 and 5.6.33.
arnoldrobbins Sep 7, 2016
6e8e1b1
Offsets MariaDB 5.5.52 and 10.1.8. Speed improvements in logging.
arnoldrobbins Oct 9, 2016
cd1b7d2
Offsets for MySQL 5.5.53, 5.6.34, 5.7.16, MariaDB 5.5.53.
arnoldrobbins Oct 25, 2016
74c2c18
Add offsets for MariaDB 10.0.28.
arnoldrobbins Oct 30, 2016
9a48bde
Add offsets for MariaDB 10.1.19.
arnoldrobbins Nov 9, 2016
96f387b
Whitespace cleanups.
arnoldrobbins Nov 9, 2016
278dd0e
Small whitespace fix.
arnoldrobbins Nov 9, 2016
53b1db7
Add new offsets for client capabilities and session connect attributes.
arnoldrobbins Dec 7, 2016
f29f9bb
Add offsets for MySQL 5.6.35.
arnoldrobbins Dec 11, 2016
c33a99b
Add offsets for MySQL 5.5.54 and 5.5.17.
arnoldrobbins Dec 13, 2016
5e80552
Add offsets for MariaDB 10.1.20.
arnoldrobbins Dec 20, 2016
d83c366
Update offsets to add MariaDB 5.5.54.
arnoldrobbins Dec 26, 2016
4fbcae3
Add info about process on other end of UNIX Domain Socket and
arnoldrobbins Jan 2, 2017
ba21262
* Add 'UPDATE' to list of commands checked for password masking.
arnoldrobbins Feb 13, 2017
570bfb0
Fix core dump if no connection attributes available.
arnoldrobbins Feb 23, 2017
0ff56dd
Fix Issue #155 - slave shutdown crashes master.
Mar 15, 2017
cd9400d
Add offsets for: MySQL 5.5.55, 5.6.36, 5.7.18 and MariaDB 5.5.55.
Apr 26, 2017
f4a3411
Add offsets for MySQL 5.5.56.
May 9, 2017
4b78009
Fix build for MySQL 5.5 and 5.1.
May 21, 2017
8370847
Add offsets for MariaDB 10.0.31.
May 24, 2017
e03dcc1
Add offsets for MariaDB 10.1.24.
Jun 6, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## top-level Makefile.am

clean-local:
cd pcre && $(MAKE) $(AM_MAKEFLAGS) clean

#Build in these directories:
SUBDIRS = yajl udis86 src

Expand Down
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
MySQL AUDIT Plugin
AUDIT Plugin for MySQL<sup>*</sup>
===================

MySQL AUDIT Plugin is a MySQL plugin from McAfee providing audit capabilities for MySQL,
A MySQL plugin from McAfee providing audit capabilities for MySQL,
designed with an emphasis on security and audit requirements. The plugin may be used
as a stand alone audit solution or configured to feed data to external monitoring tools.
as a standalone audit solution or configured to feed data to external monitoring tools.


Installation and Configuration
Expand All @@ -14,12 +14,14 @@ Please check out our wiki on github for detailed installation and configuration
https://github.com/mcafee/mysql-audit/wiki


Reporting Bugs
Issues
------------------------------

Please report bugs to: https://github.com/mcafee/mysql-audit/issues
Found a bug? Got a feature request or question?

Please describe the problem verbosely. Try to see if it reproduces and
Please feel free to report to: https://github.com/mcafee/mysql-audit/issues

If reporting a bug, please describe the problem verbosely. Try to see if it reproduces and
include a detailed description on how to reproduce.

Make sure to include your MySQL Server version and Audit Plugin version.
Expand All @@ -35,12 +37,12 @@ Log file location can be queried by running the following command:

Source Code
-------------------------------
Source code of AUDIT plugin is available at: https://github.com/mcafee/mysql-audit
Source code is available at: https://github.com/mcafee/mysql-audit


License
-------------------------------
Copyright (C) 2012 McAfee, Inc.
Copyright (C) 2016 McAfee, Inc.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU
General Public License as published by the Free Software Foundation; version 2 of the License.
Expand All @@ -50,3 +52,5 @@ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
See the GNU General Public License for more details.

See COPYING file for a copy of the GPL Version 2 license.

<sup>*</sup> Other trademarks and brands may be claimed as the property of others.
97 changes: 97 additions & 0 deletions THIRDPARTY.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,100 @@ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

%% The following software may be included in this product: PCRE (http://www.pcre.org/)

Use of any of this software is governed by the terms of the license below:

PCRE LICENCE
------------

PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.

Release 8 of PCRE is distributed under the terms of the "BSD" licence, as
specified below. The documentation for PCRE, supplied in the "doc"
directory, is distributed under the same terms as the software itself.

The basic library functions are written in C and are freestanding. Also
included in the distribution is a set of C++ wrapper functions, and a
just-in-time compiler that can be used to optimize pattern matching. These
are both optional features that can be omitted when the library is built.


THE BASIC LIBRARY FUNCTIONS
---------------------------

Written by: Philip Hazel
Email local part: ph10
Email domain: cam.ac.uk

University of Cambridge Computing Service,
Cambridge, England.

Copyright (c) 1997-2014 University of Cambridge
All rights reserved.


PCRE JUST-IN-TIME COMPILATION SUPPORT
-------------------------------------

Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu

Copyright(c) 2010-2014 Zoltan Herczeg
All rights reserved.


STACK-LESS JUST-IN-TIME COMPILER
--------------------------------

Written by: Zoltan Herczeg
Email local part: hzmester
Emain domain: freemail.hu

Copyright(c) 2009-2014 Zoltan Herczeg
All rights reserved.


THE C++ WRAPPER FUNCTIONS
-------------------------

Contributed by: Google Inc.

Copyright (c) 2007-2012, Google Inc.
All rights reserved.


THE "BSD" LICENCE
-----------------

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

* Neither the name of the University of Cambridge nor the name of Google
Inc. nor the names of their contributors may be used to endorse or
promote products derived from this software without specific prior
written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.

End
145 changes: 79 additions & 66 deletions compiling.txt
Original file line number Diff line number Diff line change
@@ -1,66 +1,79 @@
Compiling instructions
=======================

Make sure you have installed the following packages:

autoconf
automake
gcc-c++

To compile you will need to obtain the MySQL source code. MySQL source code is available at:

http://dev.mysql.com/downloads/mysql/

==== MySQL 5.1 ======

Extract the MySQL source code in the root directory. For example:

unzip zip-sources/mysql-5.1.40.zip


Then run the following command:

cd mysql-5.1.40
CXX=gcc ./configure
cd include
make

Then goto top dir and run:

chmod +x bootstrap.sh
./bootstrap.sh

This will create configure script. Then run:

CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.1.40


==== MySQL 5.5 ======

Extract MySQL 5.5 source code

go to mysql-src dir and run:

cd mysql-5.5.8
cmake .
make

back to working dir and run:

CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.5.8 --with-mysql-libservices=mysql-5.5.8/libservices/libmysqlservices.a
make

==== Compiling with make =====

Go to top source dir and run:

make

Plugin will be compiled at:

src/.libs/libaudit_plugin.so

Some documentation about configure command for mysql:

http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html

Compiling instructions
=======================

Make sure you have installed the following packages:

autoconf
automake
gcc-c++

To compile you will need to obtain the MySQL source code. MySQL source code is available at:

http://dev.mysql.com/downloads/mysql/

==== MySQL 5.1 ======

Extract the MySQL source code in the root directory. For example:

unzip zip-sources/mysql-5.1.40.zip


Then run the following command:

cd mysql-5.1.40
CXX=gcc ./configure
cd include
make

Then goto top dir and run:

chmod +x bootstrap.sh
./bootstrap.sh

This will create configure script. Then run:

CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.1.40


==== MySQL 5.5 / 5.6 / 5.7 ======

Extract MySQL 5.5, 5.6, or 5.7 source code

go to mysql-src dir and run:

cd mysql-5.5.x or mysql-5.6.x or mysql-5.7.x
cmake .
make

Note: MySQL 5.7 requires Boost 1.59. You may have to install that
first (see www.boost.org). In such a case, use:

cmake -DWITH_BOOST=/path/to/boost_1_59_0 .

Note: For MariaDB use: cmake . -DBUILD_CONFIG=mysql_release

Note: to speed things up it is possible to build just the following directories:
libservices
extra

back to working dir and run:

chmod +x bootstrap.sh
./bootstrap.sh
CXX='gcc -static-libgcc' CC='gcc -static-libgcc' ./configure --with-mysql=mysql-5.x.x --with-mysql-libservices=mysql-5.x.x/libservices/libmysqlservices.a
make

==== Compiling with make =====

Go to top source dir and run:

make

Plugin will be compiled at:

src/.libs/libaudit_plugin.so

Some documentation about configure command for mysql:

http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html

7 changes: 6 additions & 1 deletion config/ac_mysql.m4
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ AC_DEFUN([MYSQL_SRC_TEST], [
AC_MSG_ERROR([Failed to find required header file $file in $withval, check the path and make sure you've run './configure ..<options>.. && cd include && make' in MySQL 5.1 sources dir or 'cmake . && make' in MySQL 5.5 sources dir.])
fi
done
dnl binary_log_types.h included by mysql_com.h included by mysql_inc.h -
dnl is found in libbinlogevents/export.
dnl
dnl table_id.h included from table.h included by mysql_inc.h is
dnl in libbinlogevents/include.
AC_DEFINE([MYSQL_SRC], [1], [Source directory for MySQL])
MYSQL_INC="-I$withval/sql -I$withval/include -I$withval/regex -I$withval"
MYSQL_INC="-I$withval/sql -I$withval/libbinlogevents/export -I$withval/libbinlogevents/include -I$withval/include -I$withval/regex -I$withval"
AC_MSG_RESULT(["$withval"])
],
[
Expand Down
18 changes: 15 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ AC_SUBST(YAJL_INC)
UDIS_INC=-I`cd udis86 && pwd`
AC_SUBST(UDIS_INC)

#pcre
(cd pcre && CFLAGS=-fPIC ./configure --enable-utf --disable-cpp --disable-shared --enable-static )
if test $? -ne 0 ; then
AC_MSG_ERROR([Failed pcre configure])
fi


dnl AC_PROG_CC set CFLAGS=-g if CFLAGS was empty before. Reset to empty value
dnl when not building a debug version.
Expand Down Expand Up @@ -88,9 +94,10 @@ AC_PATH_PROG(DIFF, diff, diff)
#CPPFLAGS="$CPPFLAGS -DMYSQL_DYNAMIC_PLUGIN -DMYSQL_SERVER"

#we can add the following flags for better error catching: -Werror -Wimplicit
CPPFLAGS="$CPPFLAGS -Werror -Wimplicit"
CPPFLAGS="$CPPFLAGS -Werror -Wall"
CFLAGS="$CFLAGS -Wimplicit"
# From MySQL: Disable exceptions as they seams to create problems with gcc and threads.
CXXFLAGS="-fno-implicit-templates -fno-exceptions -fno-rtti "
CXXFLAGS="-fno-implicit-templates -fno-exceptions -fno-rtti -Wno-reorder -Wno-strict-aliasing"

#add pthread libs
LIBS="$LIBS -lpthread"
Expand All @@ -109,12 +116,17 @@ fi
if test -z "$MYSQL_AUDIT_PLUGIN_REVISION" ;then
MYSQL_AUDIT_PLUGIN_REVISION=99999
fi
if test -z "$MYSQL_AUDIT_PLUGIN_SYMBOL_VERSION" ;then
MYSQL_AUDIT_PLUGIN_SYMBOL_VERSION=${MYSQL_AUDIT_PLUGIN_VERSION//./_}_$MYSQL_AUDIT_PLUGIN_REVISION
fi


AC_SUBST(MYSQL_AUDIT_PLUGIN_VERSION)
AC_SUBST(MYSQL_AUDIT_PLUGIN_REVISION)
echo "Version: $MYSQL_AUDIT_PLUGIN_VERSION-$MYSQL_AUDIT_PLUGIN_REVISION"
echo "Version: $MYSQL_AUDIT_PLUGIN_VERSION-$MYSQL_AUDIT_PLUGIN_REVISION Symbol version: $MYSQL_AUDIT_PLUGIN_SYMBOL_VERSION"
CPPFLAGS="$CPPFLAGS -DMYSQL_AUDIT_PLUGIN_VERSION='\"$MYSQL_AUDIT_PLUGIN_VERSION\"'"
CPPFLAGS="$CPPFLAGS -DMYSQL_AUDIT_PLUGIN_REVISION='\"$MYSQL_AUDIT_PLUGIN_REVISION\"'"
CPPFLAGS="$CPPFLAGS '-DMYSQL_AUDIT_PLUGIN_SYMBOL_VERSION()=extern const char audit_plugin_version_$MYSQL_AUDIT_PLUGIN_SYMBOL_VERSION'"


#subst the relevant variables
Expand Down
Loading