mariadb/scripts
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
..
CMakeLists.txt MDEV-6247: Merge 10.0-galera to 10.1. 2014-08-26 15:43:46 +03:00
comp_sql.c 5.5 merge 2014-05-09 12:35:11 +02:00
convert-debug-for-diff.sh rename debug variable to debug_dbug, to make test pass in release builds 2011-12-15 22:07:58 +01:00
dheadgen.pl Updated/added copyright headers 2011-06-30 17:46:53 +02:00
fill_help_tables.sql Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
make_binary_distribution.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
make_win_bin_dist remove PBXT 2013-08-30 11:25:49 +02:00
msql2mysql.sh Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mysql_config.pl.in mysql-5.5.37 selective merge 2014-03-27 22:26:58 +01:00
mysql_config.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
mysql_convert_table_format.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
mysql_find_rows.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
mysql_fix_extensions.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
mysql_install_db.pl.in 5.5.38 merge 2014-06-06 00:07:27 +02:00
mysql_install_db.sh 5.5.38 merge 2014-06-06 00:07:27 +02:00
mysql_performance_tables.sql MDEV-4262 - P_S discovery 2014-08-19 15:18:18 +04:00
mysql_secure_installation.pl.in Fix for MDEV-5547: Bad error message when moving very old .frm files to MariaDB 5.5. 2014-01-22 15:16:57 +02:00
mysql_secure_installation.sh Merge MariaDB 5.1.66 -> 5.2.12 2012-11-08 15:24:35 +02:00
mysql_setpermission.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
mysql_system_tables.sql MDEV 4427: query timeouts 2014-10-07 11:37:36 +03:00
mysql_system_tables_data.sql MDEV 4427: query timeouts 2014-10-07 11:37:36 +03:00
mysql_system_tables_fix.sql MDEV 4427: query timeouts 2014-10-07 11:37:36 +03:00
mysql_test_data_timezone.sql Updated/added copyright header. Added line "use is subject to license terms" 2014-02-17 18:19:04 +05:30
mysql_zap.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
mysqlaccess.conf
mysqlaccess.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
mysqlbug.sh mysql-5.5.37 selective merge 2014-03-27 22:26:58 +01:00
mysqld_multi.sh MDEV-6247: Merge 10.0-galera to 10.1. 2014-08-27 13:15:37 +03:00
mysqld_safe.sh MDEV-6247: Merge 10.0-galera to 10.1. 2014-08-26 15:43:46 +03:00
mysqldumpslow.sh MDEV-4068 rpm scriptlet chown command dangerous 2013-03-06 09:32:13 +01:00
mysqlhotcopy.sh mysql-5.5.28 2012-10-16 13:04:42 +02:00
mytop.sh Change MySQL -> MariaDB inc scripts 2014-08-09 13:22:01 +03:00
wsrep_sst_common.sh correct handling on defaults[-extra]-file is SST scripts 2014-10-01 23:38:27 +02:00
wsrep_sst_mysqldump.sh correct handling on defaults[-extra]-file is SST scripts 2014-10-01 23:38:27 +02:00
wsrep_sst_rsync.sh Minor modifications 2014-10-04 13:53:33 -04:00
wsrep_sst_xtrabackup-v2.sh correct handling on defaults[-extra]-file is SST scripts 2014-10-01 23:38:27 +02:00
wsrep_sst_xtrabackup.sh correct handling on defaults[-extra]-file is SST scripts 2014-10-01 23:38:27 +02:00