mariadb/mysql-test/suite
Monty cc8aed3eb7 MDEV 4427: query timeouts
Added MAX_STATEMENT_TIME user variable to automaticly kill queries after a given time limit has expired.

- Added timer functions based on pthread_cond_timedwait
- Added kill_handlerton() to signal storage engines about kill/timeout
- Added support for GRANT ... MAX_STATEMENT_TIME=#
- Copy max_statement_time to current user, if stored in mysql.user
- Added status variable max_statement_time_exceeded
- Added KILL_TIMEOUT
- Removed digest hash from performance schema tests as they change all the time.
- Updated test results that changed because of the new user variables or new fields in mysql.user

This functionallity is inspired by work done by Davi Arnaut at twitter.
Test case is copied from Davi's work.

Documentation can be found at
https://kb.askmonty.org/en/how-to-limittimeout-queries/

mysql-test/r/mysqld--help.result:
  Updated for new help message
mysql-test/suite/perfschema/r/all_instances.result:
  Added new mutex
mysql-test/suite/sys_vars/r/max_statement_time_basic.result:
  Added testing of max_statement_time
mysql-test/suite/sys_vars/t/max_statement_time_basic.test:
  Added testing of max_statement_time
mysql-test/t/max_statement_time.test:
  Added testing of max_statement_time
mysys/CMakeLists.txt:
  Added thr_timer
mysys/my_init.c:
mysys/mysys_priv.h:
  Added new mutex and condition variables
  Added new mutex and condition variables
mysys/thr_timer.c:
  Added timer functions based on pthread_cond_timedwait()
  This can be compiled with HAVE_TIMER_CREATE to benchmark agains timer_create()/timer_settime()
sql/lex.h:
  Added MAX_STATEMENT_TIME
sql/log_event.cc:
  Safety fix (timeout should be threated as an interrupted query)
sql/mysqld.cc:
  Added support for timers
  Added status variable max_statement_time_exceeded
sql/share/errmsg-utf8.txt:
  Added ER_QUERY_TIMEOUT
sql/signal_handler.cc:
  Added support for KILL_TIMEOUT
sql/sql_acl.cc:
  Added support for GRANT ... MAX_STATEMENT_TIME=#
  Copy max_statement_time to current user
sql/sql_class.cc:
  Added timer functionality to THD.
  Added thd_kill_timeout()
sql/sql_class.h:
  Added timer functionality to THD.
  Added KILL_TIMEOUT
  Added max_statement_time variable in similar manner as long_query_time was done.
sql/sql_connect.cc:
  Added handling of max_statement_time_exceeded
sql/sql_parse.cc:
  Added starting and stopping timers for queries.
sql/sql_show.cc:
  Added max_statement_time_exceeded for user/connects status in MariaDB 10.0
sql/sql_yacc.yy:
  Added support for GRANT ... MAX_STATEMENT_TIME=# syntax, to be enabled in 10.0
sql/structs.h:
  Added max_statement_time user resource
sql/sys_vars.cc:
  Added max_statement_time variables
mysql-test/suite/roles/create_and_drop_role_invalid_user_table.test
  Removed test as we require all fields in mysql.user table.
scripts/mysql_system_tables.sql
scripts/mysql_system_tables_data.sql
scripts/mysql_system_tables_fix.sql
  Updated mysql.user with new max_statement_time field
2014-10-07 11:37:36 +03:00
..
archive MDEV-5818: MySQL WL#6145: Separate the dependence of DATA DIRECTORY from symbolic links 2014-03-23 17:00:29 +02:00
binlog MDEV-6247: Merge 10.0-galera to 10.1. 2014-08-26 15:43:46 +03:00
csv MDEV-5612 - my_rename() deletes files when it shouldn't 2014-02-26 12:55:28 +04:00
engines MDEV-4929 Myanmar collation 2013-12-20 12:42:33 +04:00
federated 10.0-base merge 2014-02-26 15:28:07 +01:00
funcs_1 MDEV 4427: query timeouts 2014-10-07 11:37:36 +03:00
funcs_2
handler 10.0-base merge 2014-02-03 15:22:39 +01:00
heap 5.5 merge 2014-05-09 12:35:11 +02:00
innodb Fix test failures seen on 2014-09-26 12:16:05 +03:00
innodb_fts MDEV-6047: Make exists_to_in optimization ON by default 2014-06-09 13:42:21 +03:00
innodb_zip 10.0-base merge 2014-02-26 15:28:07 +01:00
jp find_files(): don't sort files in my_dir(), sort table names 2013-04-07 17:17:25 +02:00
large_tests
manual
maria MDEV-6287 Bad warning level when inserting a DATETIME value into a TIME column 2014-06-02 12:33:17 +04:00
mtr/t
mtr2 Fix for overlayed include files on Windows and a test case 2013-11-10 14:37:32 +04:00
multi_source MDEV-5804: If same GTID is received on multiple master connections in multi-source replication, the event is double-executed causing corruption or replication failure 2014-03-12 00:14:49 +01:00
optimizer_unfixed_bugs MDEV-4447 MariaDB sources should have unix-style line endings everywhere 2014-02-27 12:00:16 +01:00
parts MDEV-6247: Merge 10.0-galera to 10.1. 2014-08-26 15:43:46 +03:00
percona Adjusted defrag test that fails randomly (timing problem) and fix 2014-09-10 09:44:57 +03:00
perfschema MDEV 4427: query timeouts 2014-10-07 11:37:36 +03:00
perfschema_stress perfschema 5.6.10 initial commit. 2014-05-06 23:20:50 +02:00
plugins fixing embedded: WaaS. Wsrep as a Service. 2014-10-01 23:48:34 +02:00
roles MDEV 4427: query timeouts 2014-10-07 11:37:36 +03:00
rpl MDEV-6137 better help for SET/ENUM sysvars 2014-06-19 12:02:23 +02:00
storage_engine Intentional change in logging 2014-02-05 16:39:21 +04:00
stress
sys_vars MDEV 4427: query timeouts 2014-10-07 11:37:36 +03:00
unit MDEV-4425 REGEXP enhancements 2013-09-26 18:02:17 +04:00
vcol MDEV-6103 - Adding/removing non-materialized virtual column triggers 2014-06-03 16:57:29 +04:00
wsrep Minor modifications 2014-10-04 13:53:33 -04:00