Open pnedkov opened 5 years ago
edited: The change of open_tables
described later was reverted.
I have not tried but I guess that mysql-audit doesn't work with following MariaDB versions.
errno: 2, undefined symbol: _Z11open_tablesP3THDRK14DDL_options_stPP10TABLE_LISTPjjP19Prelocking_strategy
The symbol corresponds to the following function.
bool open_tables(THD *thd, const DDL_options_st &options,
TABLE_LIST **tables, uint *counter, uint flags,
Prelocking_strategy *prelocking_strategy);
However it was changed in MariaDB 10.1.39, 10.2.24, 10.3.15 and 10.4.5 as follows and reverted in the 10.1.41, 10.2.25, 10.3.16 and 10.4.6.
bool open_tables(THD *thd, const DDL_options_st &options,
TABLE_LIST **tables, uint *counter,
Sroutine_hash_entry **sroutine_to_open, uint flags,
Prelocking_strategy *prelocking_strategy);
The open_tables
function in MariaDB 5.5.64 was changed similarly and reverted in the 5.5.65.
I am running MariaDB 10.1.40 on CentOS 7 and performed the following steps:
Downloaded and extracted
audit-plugin-mariadb-10.1-1.1.7-805-linux-x86_64.zip
Copied the so file to mysql plugins dir
cp audit-plugin-mariadb-10.1-1.1.7-805/lib/libaudit_plugin.so /usr/lib64/mysql/plugin/
Added
plugin-load=AUDIT=libaudit_plugin.so
in[mysqld]
sectionRestarted MariaDB
I get this in my log:
2019-07-03 14:17:30 140376335628544 [ERROR] Can't open shared library '/usr/lib64/mysql/plugin/libaudit_plugin.so' (errno: 2, undefined symbol: _Z11open_tablesP3THDRK14DDL_options_stPP10TABLE_LISTPjjP19Prelocking_strategy) 2019-07-03 14:17:30 140376335628544 [ERROR] Couldn't load plugin 'AUDIT' from 'libaudit_plugin.so'.
Any ideas?