mariadb/mysys
Monty 21518ab2e4 New option for slow logging (log_slow_disable_statements)
This fixes MDEV-7742 and MDEV-8305 (Allow user to specify if stored
procedures should be logged in the slow and general log)

New functionality:
- Added new variables log_slow_disable_statements and log_disable_statements
  that can be used to disable logging of certain queries to slow and
  general log. Currently supported options are 'admin', 'call', 'slave'
  and 'sp'.
  Defaults are as before. Only 'sp' (stored procedure statements) is
  disabled for  slow and general_log.
- Slow log to files now includes the following new information:
  - When logging stored procedure statements the name of stored
    procedure is logged.
  - Number of created tmp_tables, tmp_disk_tables and the space used
    by temporary tables.
- When logging 'call', the logged status now contains the sum of all
  included statements.  Before only 'time' was correct.
- Added filsort_priority_queue as an option for log_slow_filter (this
  variable existed before, but was not exposed)
- Added support for BIT types in my_getopt()

Mapped some old variables to bitmaps (old variables can still be used)
- Variable 'log_queries_not_using_indexes' is mapped to
  log_slow_filter='not_using_index'
- Variable 'log_slow_slave_statements' is mapped to
  log_slow_disabled_statements='slave'
- Variable 'log_slow_admin_statements' is mapped to
  log_slow_disabled_statements='admin'
- All the above variables are changed to session variables from global
  variables

Other things:
- Simplified LOGGER::log_command. We don't need to check for super if
  OPTION_LOG_OFF is set as this flag can only be set if one is a super
  user.
- Removed some setting of enable_slow_log as it's guaranteed to be set by
  mysql_parse()
- mysql_admin_table() now sets thd->enable_slow_log
- Added prepare_logs_for_admin_command() to reset thd->enable_slow_log if
  needed.
- Added new functions to store, restore and add slow query status
- Added new functions to store and restore query start time
- Reorganized Sub_statement_state according to types
- Added code in dispatch_command() to ensure that
  thd->reset_for_next_command() is always called for a query.
- Added thd->last_sql_command to simplify checking of what was the type
  of the last command. Needed when logging to slow log as lex->sql_command
  may have changed before slow logging is called.
- Moved QPLAN_TMP_... to where status for tmp tables are updated
- Added new THD variable, affected_rows, to be able to correctly log
  number of affected rows to slow log.
2017-08-24 01:05:51 +02:00
..
array.c spelling fixes 2017-03-07 13:38:06 +04:00
base64.c Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
ChangeLog
charset-def.c MDEV-10877 xxx_unicode_nopad_ci collations 2016-09-23 14:19:07 +04:00
charset.c MDEV-11255 LDML: allow defining 2-level UCA collations 2016-11-08 20:57:19 +04:00
checksum.c MDEV-9872: New Power8 crc32(ieee) optimized functions 2016-08-05 11:50:46 +04:00
CMakeLists.txt Merge remote-tracking branch 'origin/bb-10.2-ext' into 10.3 2017-04-03 17:35:55 +04:00
errors.c Merge branch '10.1' into 10.2 2016-06-30 16:38:05 +02:00
file_logger.c Correct FSF address 2017-03-10 18:21:29 +01:00
get_password.c MDEV-9293 - Use MariaDB's Connector/C in server 2016-08-25 16:27:57 +02:00
hash.c remove my_hash_const_element(), use Hash_set in C++ code 2017-03-31 19:22:19 +02:00
lf_alloc-pin.c Merge 10.1 into 10.2 2017-05-22 09:46:51 +03:00
lf_dynarray.c MDEV-7437 remove suport for "atomics" with rwlocks 2015-01-13 10:15:21 +01:00
lf_hash.c Merge 10.1 into 10.2 2017-05-23 11:09:47 +03:00
list.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
ma_dyncol.c Merge 10.1 into 10.2 2017-05-23 11:09:47 +03:00
mf_arr_appstr.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mf_cache.c misc IO_CACHE cleanups 2015-06-02 18:53:37 +02:00
mf_dirname.c Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
mf_fn_ext.c spelling fixes 2017-03-07 13:38:06 +04:00
mf_format.c Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
mf_getdate.c
mf_iocache.c Simplify IO_CACHE by removing current_pos and end_pos as self-references 2017-06-28 15:23:36 +03:00
mf_iocache2.c Merge branch '10.0' into 10.1 2016-03-21 13:02:53 +01:00
mf_keycache.c Added DBUG_ASSERT_AS_PRINTF compile flag 2017-08-24 01:05:50 +02:00
mf_keycaches.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
mf_loadpath.c Bug# 20376760: STACK-BUFFER-OVERFLOW WITH LONG PATHS TO CERTAIN VARIABLES 2015-06-24 17:48:46 +05:30
mf_pack.c MDEV-4503 : Installation fails if TEMP directory contains "~" subdirectory. 2013-06-17 19:18:14 +02:00
mf_path.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
mf_qsort.c MySQL-5.5.36 merge 2014-02-17 11:00:51 +01:00
mf_qsort2.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mf_radix.c 5.5 merge 2014-02-25 16:04:35 +01:00
mf_same.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
mf_sort.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
mf_soundex.c MySQL-5.5.36 merge 2014-02-17 11:00:51 +01:00
mf_tempdir.c 5.5 merge 2014-02-25 16:04:35 +01:00
mf_tempfile.c Bug#16316074 RFE: MAKE TMPDIR A BUILD-TIME CONFIGURABLE OPTION 2013-12-18 11:05:18 +01:00
mf_unixpath.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
mf_wcomp.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
mulalloc.c Fixed compiler warnings and test failures found by buildbot 2016-06-24 02:25:14 +03:00
my_access.c spelling fixes 2017-03-07 13:38:06 +04:00
my_addr_resolve.c fix stack traces when linking with libbfd 2016-12-12 20:27:20 +01:00
my_alarm.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
my_alloc.c spelling fixes 2017-03-07 13:38:06 +04:00
my_atomic_writes.c Make atomic writes general 2017-01-11 09:18:35 +02:00
my_basename.c Enusure that my_global.h is included first 2017-08-24 01:05:44 +02:00
my_bit.c MDEV-11901 : MariaRocks on Windows 2017-02-01 21:27:13 +00:00
my_bitmap.c MDEV-5800 MyISAM support for indexed vcols 2016-12-12 20:27:36 +01:00
my_chmod.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_chsize.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_compare.c Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
my_compress.c spelling fixes 2017-03-07 13:38:06 +04:00
my_conio.c 10.0-base merge 2014-02-26 15:28:07 +01:00
my_context.c Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
my_copy.c Merge branch '5.5' into 10.0 2016-04-26 23:05:26 +02:00
my_create.c Merge 10.0 into 10.1 2017-03-09 08:53:08 +02:00
my_default.c Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
my_delete.c Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
my_div.c cleanup: my_register_filename() 2017-02-27 12:35:10 +01:00
my_dlerror.c make sql_udf.cc to shorten dlerror() messages 2017-03-10 18:21:26 +01:00
my_error.c cleanup: my_printf_error(ER_xxx, ER(ER_xxx), ... ) 2016-12-12 20:27:28 +01:00
my_file.c Temporary commit of 10.0-merge 2013-03-26 00:03:13 +02:00
my_fopen.c Merge 10.0 into 10.1 2017-03-09 08:53:08 +02:00
my_fstream.c
my_gethwaddr.c Merge branch '5.5' into 10.0 2016-02-15 22:50:59 +01:00
my_getncpus.c
my_getopt.c New option for slow logging (log_slow_disable_statements) 2017-08-24 01:05:51 +02:00
my_getpagesize.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_getsystime.c fix a comment 2013-08-14 11:12:57 +02:00
my_getwd.c spelling fixes 2017-03-07 13:38:06 +04:00
my_init.c Added DBUG_ASSERT_AS_PRINTF compile flag 2017-08-24 01:05:50 +02:00
my_largepage.c
my_lib.c spelling fixes 2017-03-07 13:38:06 +04:00
my_libwrap.c Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
my_lock.c Fix spelling: occurred, execute, which etc 2016-03-04 02:09:37 +02:00
my_lockmem.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_malloc.c cleanup: make malloc_size_cb_func always defined 2017-01-15 07:41:13 +01:00
my_memmem.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_mess.c
my_mkdir.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_mmap.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_new.cc
my_once.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
my_open.c Merge 10.0 into 10.1 2017-03-09 08:53:08 +02:00
my_port.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_pread.c spelling fixes 2017-03-07 13:38:06 +04:00
my_pthread.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_quick.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_rdtsc.c MDEV-9172 - Analyze patches for IBM System z 2015-12-09 16:52:12 +04:00
my_read.c 5.5 merge 2013-07-17 21:24:29 +02:00
my_redel.c spelling fixes 2017-03-07 13:38:06 +04:00
my_rename.c MDEV-5612 - my_rename() deletes files when it shouldn't 2014-02-26 12:55:28 +04:00
my_rnd.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_safehash.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_safehash.h Correct FSF address 2017-03-10 18:21:29 +01:00
my_seek.c
my_setuser.c MDEV-11676 Starting service with mysqld_safe_helper fails in SELINUX "enforcing" mode 2017-01-04 13:38:03 +01:00
my_sleep.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_static.c Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
my_static.h Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
my_symlink.c Merge remote-tracking branch '5.5' into 10.0 2017-06-20 12:31:17 +03:00
my_symlink2.c MDEV-12230 include/my_sys.h:600:43: error: unknown type name ‘PSI_file_key’" when -DWITHOUT_SERVER=1 2017-04-20 16:36:23 +02:00
my_sync.c Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
my_thr_init.c Merge branch '10.1' into 10.2 2017-03-30 12:48:42 +02:00
my_timer_cycles.il
my_uuid.c Correct FSF address 2017-03-10 18:21:29 +01:00
my_wincond.c MDEV-9154 : Remove workarounds (mainly dynamic function loading) 2016-06-01 20:29:10 +02:00
my_windac.c spelling fixes 2017-03-07 13:38:06 +04:00
my_winerr.c spelling fixes 2017-03-07 13:38:06 +04:00
my_winfile.c
my_winthread.c MDEV-9154 : Remove workarounds (mainly dynamic function loading) 2016-06-01 20:29:10 +02:00
my_write.c Merge branch '5.5' into bb-10.0 2016-06-21 14:11:02 +02:00
mysys_priv.h Merge remote-tracking branch '10.0' into 10.1 2017-06-21 16:19:43 +03:00
psi_noop.c compiler warnings 2015-06-11 20:20:45 +02:00
ptr_cmp.c Merge branch '10.0' into 10.1 2015-09-03 12:58:41 +02:00
queues.c spelling fixes 2017-03-07 13:38:06 +04:00
safemalloc.c MDEV-10139 Support for SEQUENCE objects 2017-04-07 18:09:56 +04:00
stacktrace.c Added DBUG_ASSERT_AS_PRINTF compile flag 2017-08-24 01:05:50 +02:00
string.c Merge branch '5.5' into 10.0 2016-02-15 22:50:59 +01:00
test_charset.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
test_dir.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
test_thr_mutex.c Correct FSF address 2017-03-10 18:21:29 +01:00
test_xml.c Updated/added copyright headers 2014-01-06 10:52:35 +05:30
testhash.c Merge branch '5.5' into bb-10.0 2016-06-21 14:11:02 +02:00
thr_alarm.c Added DBUG_ASSERT_AS_PRINTF compile flag 2017-08-24 01:05:50 +02:00
thr_lock.c Added DBUG_ASSERT_AS_PRINTF compile flag 2017-08-24 01:05:50 +02:00
thr_mutex.c Lots of small cleanups 2017-08-24 01:05:49 +02:00
thr_rwlock.c Bug 16395495 - OLD FSF ADDRESS IN GPL HEADER 2013-03-19 13:29:12 +01:00
thr_timer.c MDEV-7177 - Server hangs on shutdown after InnoDB error (main.plugin_loaderr 2015-02-05 13:58:30 +04:00
tree.c Fix that end_bulk_insert() doesn't write to to-be-deleted files 2017-05-17 00:34:48 +03:00
typelib.c spelling fixes 2017-03-07 13:38:06 +04:00
waiting_threads.c Enusure that my_global.h is included first 2017-08-24 01:05:44 +02:00
wqueue.c Enusure that my_global.h is included first 2017-08-24 01:05:44 +02:00