Skip to content

Commit

Permalink
Added support for:
Browse files Browse the repository at this point in the history
Percona 64-bit  5.7.34-37
MySQL 64-bit   8.0.25, 8.0.24, 5.7.34
MariaDB 64-bit  10.2.39, 10.2.38, 10.5.11, 10.5.10, 10.4.20, 10.4.19, 10.4.18, 10.4.17, 10.4.16, 10.4.15, 10.4.14, 10.4.13, 10.4.12, 10.4.11, 10.4.10, 10.4.8, 10.4.7, 10.4.6

MySQL 32-bit   5.7.34
MariaDB 32-bit  10.2.39, 10.2.38
  • Loading branch information
pwrpw committed Sep 14, 2021
1 parent e2b3d52 commit 10c4255
Show file tree
Hide file tree
Showing 6 changed files with 145 additions and 36 deletions.
2 changes: 1 addition & 1 deletion compiling.txt
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,5 @@ http://dev.mysql.com/doc/refman/5.1/en/source-configuration-options.html
10. cd ../..
11. chmod +x bootstrap.sh
12. ./bootstrap.sh
13. CXX='gcc -static-libgcc' CC='gcc -static-libgcc' MYSQL_AUDIT_PLUGIN_VERSION=1.1.7 MYSQL_AUDIT_PLUGIN_REVISION=`svn info|grep ^Revision|awk -F ": " '{print $2}'` ./configure --enable-debug=no --with-mysql=mariadb-10.2.10 --with-mysql-libservices=mariadb-10.2.10/libservices/libmysqlservices.a
13. CXX='gcc -static-libgcc' CC='gcc -static-libgcc' MYSQL_AUDIT_PLUGIN_VERSION=1.1.9 MYSQL_AUDIT_PLUGIN_REVISION=`svn info|grep ^Revision|awk -F ": " '{print $2}'` ./configure --enable-debug=no --with-mysql=mariadb-10.2.10 --with-mysql-libservices=mariadb-10.2.10/libservices/libmysqlservices.a
14. gmake <======== This will create the plugin "libaudit_plugin.so"
6 changes: 3 additions & 3 deletions include/audit_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class Audit_formatter {
#if !defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID < 50709
return thd->db;
#elif defined(MARIADB_BASE_VERSION)
#if MYSQL_VERSION_ID >= 100504
#if MYSQL_VERSION_ID >= 100307
return thd->db.str;
#else
return thd->db;
Expand Down Expand Up @@ -578,7 +578,7 @@ static inline const CHARSET_INFO * pfs_connect_attrs_cs(const void * pfs)
// and it may return an invalid value for view_db
static inline const char *table_get_db_name(TABLE_LIST *table)
{
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100504
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100307
return table->db.str;
#else
return table->db;
Expand All @@ -587,7 +587,7 @@ static inline const CHARSET_INFO * pfs_connect_attrs_cs(const void * pfs)

static inline const char *table_get_name(TABLE_LIST *table)
{
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100504
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100307
return table->table_name.str;
#else
return table->table_name;
Expand Down
4 changes: 2 additions & 2 deletions include/mysql_inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#include <mysql/plugin_audit.h>
#endif

#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100504
// From MariaDB 10.5 we include macro definitions for items like MY_GNUC_PREREQ
#if defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 100307
// From MariaDB 10.3 we include macro definitions for items like MY_GNUC_PREREQ
#include <my_compiler.h>
#include <my_global.h>
#endif
Expand Down
8 changes: 4 additions & 4 deletions offset-extract/offset-extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ fi

# In 5.6.15 and up, 5.7 and mariabdb 10.0.11 and up, mariadb 10.1
# m_session_connect_attrs_cs changed to m_session_connect_attrs_cs_number
if echo $MYVER | grep -P '^(5\.7|8\.|10\.[1-2]|5\.6\.(1[5-9]|[2-9][0-9])|10.0.(1[1-9]|[2-9][0-9]))' > /dev/null
if echo $MYVER | grep -P '^(5\.7|8\.|10\.[1-5]|5\.6\.(1[5-9]|[2-9][0-9])|10.0.(1[1-9]|[2-9][0-9]))' > /dev/null
then
CONNECT_ATTRS_CS=m_session_connect_attrs_cs_number
fi
Expand Down Expand Up @@ -111,9 +111,9 @@ else
fi

# Exit status info 5.5, 5.6, 5.7
DA_STATUS="print_offset Diagnostics_area m_status" # 5.5, 5.6, 5.7, mariadb 10.0, 10.1, 10.2
DA_SQL_ERRNO="print_offset Diagnostics_area m_sql_errno" # 5.5, 5.6, mariadb 10.0, 10.1, 10.2
STMT_DA="print_offset THD m_stmt_da" # 5.6, 5.7, mariadb 10.0, 10.1, 10.2
DA_STATUS="print_offset Diagnostics_area m_status" # 5.5, 5.6, 5.7, mariadb 10.0 to 10.5
DA_SQL_ERRNO="print_offset Diagnostics_area m_sql_errno" # 5.5, 5.6, mariadb 10.0 to 10.5
STMT_DA="print_offset THD m_stmt_da" # 5.6, 5.7, mariadb 10.0 to 10.5

if echo $MYVER | grep -P '^(5\.7|8\.0)' > /dev/null
then
Expand Down
Loading

0 comments on commit 10c4255

Please sign in to comment.