summaryrefslogtreecommitdiff
path: root/sql/sql_audit.h
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-5436 mysqld crash signal 11 in mysql_audit_general.Alexey Botchkov2014-02-281-2/+10
| | | | | | | That error 'Can't open the pid file' leads to mysqld crash signal 11 in mysql_audit_general() called with the 'thd' parameter set to NULL. That wasn't checked when the thd->db and thd->db_length were accessed. Fixed by checking for the NULL thd.
* MySQL-5.5.36 mergeSergei Golubchik2014-02-171-1/+1
|\ | | | | | | (without few incorrect bugfixes and with 1250 files where only a copyright year was changed)
| * Updated/added copyright headersMurthy Narkedimilli2014-01-061-1/+1
| |
| * WL#7076: Backporting wl6715 to support both formats Ashish Agarwal2013-08-231-23/+59
| |\ | | | | | | | | | in 5.5, 5.6, 5.7.
| | * WL#7076: Backporting wl6715 to support both formats in 5.5, 5.6, 5.7Ashish Agarwal2013-07-021-22/+58
| |/ | | | | | | Backporting wl6715 to mysql-5.5
* | MDEV-4472 Audit-plugin. Server-related part of the task.Alexey Botchkov2013-09-091-3/+9
| | | | | | | | | | | | | | | | | | file_logger became the service. Data like query_id now are sent to the audit plugin. Fix for MDEV-4770 ported from 10.0. Fix added for the read_maria_plugin_info(). Log rotation can be disabled with 'set rotations=0'.
* | MDEV-260 auditing table accessesSergei Golubchik2013-04-191-1/+90
| |
* | Test case and a different fix for MySQL bug#14485479Sergei Golubchik2013-01-151-1/+1
| |
* | MDEV-259 audit plugin does not see sub-statementsSergei Golubchik2012-11-081-6/+9
| |
* | MDEV-258 audit plugin only see queries if general log is enabledSergei Golubchik2012-11-081-6/+7
|/
* Updated/added copyright headersKent Boortz2011-06-301-2/+2
|
* Bug #58699 cannot build with gcc dbg on solarisTor Didriksen2010-12-211-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmake/os/SunOS.cmake: Remove TARGET_OS_SOLARIS config.h.cmake: Remove TARGET_OS_SOLARIS Add PTHREAD_ONCE_INITIALIZER configure.cmake: Add function for testing whether we need { PTHREAD_ONCE_INIT } rather than PTHREAD_ONCE_INIT include/my_pthread.h: Use PTHREAD_ONCE_INITIALIZER if set by cmake. include/mysql/psi/mysql_file.h: Include my_global.h first, to get correct platform definitions. mysys/ptr_cmp.c: Hide the unused static functions in #ifdef's on solaris. Use __sun (defined by both gcc and SunPro cc) rather than TARGET_OS_SOLARIS sql/my_decimal.cc: Include my_global.h first, to get correct platform definitions. sql/mysqld.cc: Fix signed/unsigned comparison warning. sql/sql_audit.h: Include my_global.h first, to get correct platform definitions. sql/sql_plugin.h: Include my_global.h first, to get correct platform definitions. sql/sql_show.cc: Fix: warning: cast from pointer to integer of different size sql/sys_vars.h: Use reinterpret_cast rather than c-style cast. storage/perfschema/pfs_instr.cc: Include my_global.h first, to get correct platform definitions.
* WL#5571 - Audit interface: MYSQL_AUDIT_GENERAL_STATUS eventSergey Vojtovich2010-12-141-0/+41
| | | | | | | | | | | | | | | | | include/mysql/plugin_audit.h: Connection auditing class. include/mysql/plugin_audit.h.pp: Connection auditing class. sql/mysqld.cc: Notify disconnect to auditing. sql/sql_audit.cc: Connection class event dispatcher. sql/sql_audit.h: mysql_audit_notify() is not available in embedded. sql/sql_connect.cc: Notify connect to auditing. sql/sql_parse.cc: Notify user change to auditing.
* Bug#57306 SHOW PROCESSLIST does not display string literals well.Alexander Barkov2010-11-181-10/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Extended characters outside of ASCII range where not displayed properly in SHOW PROCESSLIST, because thd_info->query was always sent as system_character_set (utf8). This was wrong, because query buffer is never converted to utf8 - it is always have client character set. Fix: sending query buffer using query character set @ sql/sql_class.cc @ sql/sql_class.h Introducing a new class CSET_STRING, a LEX_STRING with character set. Adding set_query(&CSET_STRING) Adding reset_query(), to use instead of set_query(0, NULL). @ sql/event_data_objects.cc Using reset_query() @ sql/log_event.cc Using reset_query() Adding charset argument to set_query_and_id(). @ sql/slave.cc Using reset_query(). @ sql/sp_head.cc Changing backing up and restore code to use CSET_STRING. @ sql/sql_audit.h Using CSET_STRING. In the "else" branch it's OK not to use global_system_variables.character_set_client. &my_charset_latin1, which is set in constructor, is fine (verified with Sergey Vojtovich). @ sql/sql_insert.cc Using set_query() with proper character set: table_name is utf8. @ sql/sql_parse.cc Adding character set argument to set_query_and_id(). (This is the main point where thd->charset() is stored into thd->query_string.cs, for use in "SHOW PROCESSLIST".) Using reset_query(). @ sql/sql_prepare.cc Storing client character set into thd->query_string.cs. @ sql/sql_show.cc Using CSET_STRING to fetch and send charset-aware query information from threads. @ storage/myisam/ha_myisam.cc Using set_query() with proper character set: table_name is utf8. @ mysql-test/r/show_check.result @ mysql-test/t/show_check.test Adding tests
* merge of mysql-5.5 into mysql-5.5-wl1054Georgi Kodinov2010-09-201-0/+1
|\
| * BUG#54989 - With null_audit installed, server hangs on anSergey Vojtovich2010-08-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | attempt to install a plugin twice Server crashes when [UN]INSTALL PLUGIN fails (returns an error) and general log is disabled and there are audit plugins interested in MYSQL_AUDIT_GENERAL_CLASS. When audit event is triggered, audit subsystem acquires interested plugins by walking through plugin list. Evidently plugin list iterator protects plugin list by acquiring LOCK_plugin, see plugin_foreach_with_mask(). On the other hand [UN]INSTALL PLUGIN is acquiring LOCK_plugin rather for a long time. When audit event is triggered during [UN]INSTALL PLUGIN, plugin list iterator acquires the same lock (within the same thread) second time. Repeatable only with general_log disabled, because general_log triggers MYSQL_AUDIT_GENERAL_LOG event, which acquires audit plugins before [UN]INSTALL PLUGIN acquired LOCK_plugin. With this fix we pre-acquire audit plugins for events that may potentially occur during [UN]INSTALL PLUGIN. This hack should be removed when LOCK_plugin is fixed so it protects only what it supposed to protect. No test case for this fix - we do not have facility to test audit plugins yet. sql/sql_audit.cc: Move "acquire audit plugin" logics to a separate function. sql/sql_audit.h: Move "acquire audit plugin" logics to a separate function. sql/sql_plugin.cc: Pre-acquire audit plugins for events that may potentially occur during [UN]INSTALL PLUGIN.
* | WL#1054: Pluggable authentication supportGeorgi Kodinov2010-08-091-1/+1
|/ | | | | Merged the implementation to a new base tree.
* WL#5030: Split and remove mysql_priv.hMats Kindahl2010-03-311-0/+1
| | | | | | | | | | | | | | This patch: - Moves all definitions from the mysql_priv.h file into header files for the component where the variable is defined - Creates header files if the component lacks one - Eliminates all include directives from mysql_priv.h - Eliminates all circular include cycles - Rename time.cc to sql_time.cc - Rename mysql_priv.h to sql_priv.h
* Backport from 6.0-codebase.Sergey Vojtovich2009-12-161-17/+70
| | | | | | | | | | | | | | | | | | | | | Bug #36098 Audit plugin (wl 3771) feature disabled in 6.0 avoid recusrive locking of LOCK_plugin include/mysql/plugin_audit.h: fix incorrect version sql/log.cc: move the common code to a shared header sql/mysqld.cc: restore the deleted functionality sql/set_var.cc: remove unused parameter sql/sql_audit.h: two inline convenience functions sql/sql_parse.cc: use a simplified convenience call sql/sql_plugin.cc: unlock LOCK_plugin for plugin->init() call, add missing OOM check, issue "unknown variable" error in find_sys_var, not down the stack
* Backport from 6.0-codebase.Sergey Vojtovich2009-12-151-0/+78
WL#3771 "Audit Plugin Interface" Implement new plug-in type - AUDIT New plug-in: audit_null simply increments counter for how many times it was called. include/Makefile.am: wl3771 add new headers to distribution include/mysql/plugin.h: wl3771 define new AUDIT plugin type Split out fulltext plugin type into its own header include/mysql/plugin.h.pp: wl3771 no real API change, just re-arranged some code include/mysql/plugin_audit.h: wl3771 pluggable audit interface include/mysql/plugin_ftparser.h: wl3771 Split out fulltext plugin type into its own header libmysqld/CMakeLists.txt: wl3771 add sql_audit.cc to build libmysqld/Makefile.am: wl3771 add sql_audit.cc to build plugin/audit_null: wl3771 an example plugin for testing pluggable audit interface plugin/audit_null/Makefile.am: wl3771 an example plugin for testing pluggable audit interface plugin/audit_null/audit_null.c: wl3771 an example plugin for testing pluggable audit interface plugin/audit_null/plug.in: wl3771 an example plugin for testing pluggable audit interface sql/CMakeLists.txt: wl3771 add sql_audit.cc to build sql/Makefile.am: wl3771 add sql_audit.cc to build sql/event_queue.cc: wl3771 release audit resources before waiting sql/log.cc: wl3771 add general audit call for log sql/mysqld.cc: wl3771 add audit initialize/finalize add general audit call for error sql/sql_audit.cc: wl3771 pluggable audit interface implementation sql/sql_audit.h: wl3771 pluggable audit interface implementation sql/sql_class.cc: wl3771 add thd audit init/deinit calls sql/sql_class.h: wl3771 add required data structures for audit to THD sql/sql_connect.cc: wl3771 release audit resources before waiting sql/sql_insert.cc: wl3771 release audit plugins before waiting sql/sql_parse.cc: wl3771 add general audit call for results sql/sql_plugin.cc: wl3771 add declarations for audit plugin type