summaryrefslogtreecommitdiff
path: root/sql/structs.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.1' into 10.2Monty2016-02-061-1/+8
|\ | | | | | | | | | | | | | | | | | | Conflicts: VERSION cmake/plugin.cmake config.h.cmake configure.cmake plugin/server_audit/server_audit.c sql/sql_yacc.yy
| * cleanup: LEX_USER::pwtext and LEX_USER::pwhashSergei Golubchik2016-01-251-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Was: * LEX_USER::password was storing sometimes plaintext password and sometimes password hash * LEX_USER::auth was storing sometimes password hash and sometimes plugin authentication string Now: * LEX_USER::pwtext stores the password in plain-text * LEX_USER::pwhash stores the password hash * LEX_USER::auth stores the plugin authentication string
| * cleanup: create LEX_USER::reset_auth()Sergei Golubchik2016-01-251-0/+6
| | | | | | | | as this is used quite often
* | MDEV-9170 Get rid of LEX::length and LEX::decAlexander Barkov2015-11-231-0/+70
|/ | | | | A preparatory task for: MDEV-4912 Add a plugin to field types (column types)
* A preparatory patch for MDEV-7284 INDEX: CREATE OR REPLACE.Alexander Barkov2015-03-201-1/+4
| | | | | Removing "bool Key::create_if_not_exists" and deriving Key from DDL_options instead.
* Merge branch '10.0' into 10.1Sergei Golubchik2015-03-071-0/+1
|\
| * Merge branch '5.5' into 10.0Sergei Golubchik2015-03-061-0/+1
| |\
| | * MDEV-6838: Using too big key for internal temp tablesVicențiu Ciorbaru2015-02-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug manifests due to wrong computation and evaluation of keyinfo->key_length. The issues were: * Using table->file->max_key_length() as an absolute value that must not be reached for a key, while it represents the maximum number of bytes possible for a table key. * Incorrectly computing the keyinfo->key_length size during KEY_PART_INFO creation. The metadata information regarding the key such the field length (for strings) was added twice.
* | | MDEV-7112 Split HA_CREATE_INFOAlexander Barkov2014-12-081-0/+75
| | |
* | | MDEV-6108 update userstat feature from percona serverSergei Golubchik2014-10-111-37/+1
| | | | | | | | | | | | TOTAL_SSL_CONNECTIONS columns in CLIENT_STATISTICS and USER_STATISTICS
* | | cleanup: sort struct members by sizeSergei Golubchik2014-10-111-4/+4
| | |
* | | cleanup: remove dead codeSergei Golubchik2014-10-111-27/+0
| | |
* | | MDEV 4427: query timeoutsMonty2014-10-071-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Better comments about KEY::ext_key_part_mapSergei Petrunia2014-09-251-1/+13
|/ /
* | 10.0-base merge (roles)Sergei Golubchik2013-10-291-0/+8
|\ \
| * | support DEFINER=role and DEFINER=current_roleSergei Golubchik2013-10-181-0/+8
| | |
* | | Temporary commit of 10.0-mergeMichael Widenius2013-03-261-4/+4
|/ /
* | Addressed all remaining issues from the review of the patchIgor Babaev2012-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | that introduced engine independent persistent statistics. In particular: - added an enumeration type for possible values of the system variable use_stat_tables - renamed KEY::real_rec_per_key to KEY::actual_rec_per_key - optimized the collection of statistical data for any primary key defined only on one column.
* | Performed re-factoring and re-structuring of the code for mwl#248:Igor Babaev2012-07-261-36/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Moved the definitions of the classes to store data from persistent statistical tables into statistics.h, leaving in other internal data structures only references to the corresponding objects. - Defined class Column_statistics_collected derived from the class Column_statistics. This is a helper class to collect statistics on columns. - Moved references to read statistics to TABLE SHARE, leaving the the reference to the collected statistics in TABLE. - Added a new clone method for the class Field allowing to clone fields attached to table shares. It was was used to create fields for min/max values in the memory of the table share. A lso: - Added procedures to allocate memory for statistical data in the table share memory and in table memory. Also: - Added a test case demonstrating how ANALYZE could work in parallel to collect statistics on different indexes of the same table. - Added a test two demonstrate how two connections working simultaneously could allocate memory for statistical data in the table share memory.
* | Changed the type of all double columns in the system statistical tablesIgor Babaev2012-06-251-5/+18
| | | | | | | | | | | | mysql.column_stat, mysql.table_stat for the type DECIMAL(12,4). When cached the values from these columns are multiplied by factor 10^5 and stored as ulong numbers now.
* | The pilot implementation of mwl#250: Use the statistics from persistentIgor Babaev2012-04-111-0/+14
| | | | | | | | statistical tables instead of the statistics provided by engine.
* | Merge maria-5.3-mwl248 -> 5.5 = maria-5.5-mwl248.Igor Babaev2012-03-191-0/+25
|\ \ | |/ |/|
| * The main patch for the MWL#248 back-ported from Igor Babaev2012-01-041-0/+25
| | | | | | | | lp:~igorb-seattle/mysql-server/mysql-azalea-wl4777.
* | Merge MWL #247 from mariadb 5.3 -> mariadb 5.5.Igor Babaev2012-03-021-0/+3
|\ \
| * \ Merged MWL#247 into the latest 5.3.Igor Babaev2011-12-311-0/+3
| |\ \ | | |/ | |/|
| | * Implementation of the MWL#247: Make the optimizer use extended keys.Igor Babaev2011-12-311-0/+3
| | | | | | | | | | | | | | | The main patch. .
| * | Merge with 5.2.Michael Widenius2011-12-111-2/+5
| |\ \ | | | | | | | | | | | | no_error handling for select (used by INSERT ... SELECT) still needs to be fixed, but I will do that in a separate commit
| | * \ Merge with MariaDB 5.1Michael Widenius2011-11-241-2/+5
| | |\ \
* | | \ \ 5.3->5.5 mergeSergei Golubchik2011-11-221-3/+6
|\ \ \ \ \ | |/ / / /
| * | | | BUG#882472: subselect4.test fails in current 5.3Sergey Petrunya2011-10-271-1/+1
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | - The problem was that the value of READ_RECORD::file was not updated when the underlying table was temporary and was converted from heap to myisam. Resolved by eliminating READ_RECORD::file, always use READ_RECORD::table->file
| * | | Allow one to block an account by using GRANT max_user_connections = -1Michael Widenius2011-09-261-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One can set @@global.max_user_connections to -1 to block anyone, except SUPER user, to login. If max_user_connection is 0, one can't change it without a restart (needed to get user connections counting to work correctly) mysql-test/r/system_mysql_db.result: Changed max_user_connections to handle negative numbers. mysql-test/r/user_limits-2.result: New test case that one can't change max_user_connection if it was 0 mysql-test/r/user_limits.result: Fixed wrong error messages. mysql-test/r/variables.result: Store / restore max_user_connections (needed as there is now a --master.opt file that changes it) mysql-test/t/subselect_mat_cost-master.opt: Enable slow query log (as this test found some errors in slow query logging) mysql-test/t/user_limits-2.test: New test case that one can't change max_user_connection if it was 0 mysql-test/t/user_limits-master.opt: Set max_user_connections (as one can't change it if it was 0) mysql-test/t/user_limits.test: Test max_user_connections -1 mysql-test/t/variables-master.opt: Set max_user_connections (as one can't change it if it was 0) mysql-test/t/variables.test: Set/restore max_user_connections scripts/Makefile.am: Add a text message to mysql_fix_privilege_tables.sql that it's automaticly generated scripts/mysql_system_tables.sql: Change max_user_connections to signed scripts/mysql_system_tables_fix.sql: Change max_user_connections to signed sql/item_func.cc: Change SHOW_INT to be signed. (Needed for max_user_connections and it's probably a bug that it was not originally signed) sql/log.cc: Remove some code that was not needed (All these variables are reset at start of query) sql/mysql_priv.h: Made max_user_connections signed. Added max_user_connections_checking sql/mysqld.cc: Added max_user_connections_checking so that we know if max_user_connections was 0 at startup (Which means that we will not do connection counting for accounts that don't have user resource limits) Set thd->start_utime at same time as thr_create_utime. (Before start_utime could be < thr_create_utime which lead to wrong query counting) sql/set_var.cc: Don't allow one to change 'max_user_connections' if it was 0 at startup. sql/sql_acl.cc: Change user_connection counting to be negative. sql/sql_connect.cc: If max_user_connections is < 0 then only SUPER user can login. Fixed wrong variable names for error messages. Fixed wrong initial value for questions. Set thd->start_utime and thd->thr_create_utime at startup. Needed to get time_out_user_resource_limits() to work. sql/sql_show.cc: SHOW_INT is now negative sql/sql_yacc.yy: Support negative values for MAX_USER_CONNECTIONS sql/structs.h: Make user connect counting work with signed numbers.
* | | | mysql-5.5.18 mergeSergei Golubchik2011-11-031-2/+2
|\ \ \ \
| * \ \ \ Updated/added copyright headersKent Boortz2011-06-301-2/+2
| |\ \ \ \ | | | |_|/ | | |/| |
| | * | | Updated/added copyright headersKent Boortz2011-06-301-2/+5
| | |\ \ \
| | | * | | Updated/added copyright headersKent Boortz2011-06-301-2/+3
| | | | | |
| * | | | | WL#1054: Pluggable authentication supportGeorgi Kodinov2010-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merged the implementation to a new base tree.
* | | | | | merge with 5.3Sergei Golubchik2011-10-191-2/+2
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sql/sql_insert.cc: CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. ****** CREATE ... IF NOT EXISTS may do nothing, but it is still not a failure. don't forget to my_ok it. sql/sql_table.cc: small cleanup ****** small cleanup
| * | | | | Merge with 5.2Michael Widenius2011-05-161-1/+2
| |\ \ \ \ \ | | | |_|_|/ | | |/| | |
| | * | | | small enhancement of the create table options feature:Sergei Golubchik2011-05-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | no unnecessary casting from void*, more type safety. typos fixed.
| * | | | | Backport of:Sergey Petrunya2011-01-141-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3723 oystein.grovlen@sun.com 2009-11-23 Bug#46548 (addendum) Remove KEY::extra_length. It is not in use.
* | | | | | lots of post-merge changesSergei Golubchik2011-04-251-0/+1
| | | | | |
* | | | | | merge.Sergei Golubchik2010-11-251-2/+115
|\ \ \ \ \ \ | |/ / / / / | | | / / / | |_|/ / / |/| | | | | | | | | checkpoint. does not compile.
| * | | | MariaDB 5.2 -> MariaDB 5.3 merge Sergey Petrunya2010-06-261-1/+5
| |\ \ \ \ | | |/ / /
| | * | | MWL#43 CREATE TABLE options (by Sanja)Sergei Golubchik2010-04-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docs/sp-imp-spec.txt: New sql_mode added. include/my_base.h: Flag in frm of create options. libmysqld/CMakeLists.txt: New files added. libmysqld/Makefile.am: New files added. mysql-test/r/events_bugs.result: New sql_mode added. mysql-test/r/information_schema.result: New sql_mode added. mysql-test/r/sp.result: New sql_mode added. mysql-test/r/system_mysql_db.result: New sql_mode added. mysql-test/suite/funcs_1/r/is_columns_mysql.result: New sql_mode added. mysql-test/suite/funcs_1/r/is_columns_mysql_embedded.result: New sql_mode added. mysql-test/t/events_bugs.test: New sql_mode added. mysql-test/t/sp.test: New sql_mode added. scripts/mysql_system_tables.sql: New sql_mode added. scripts/mysql_system_tables_fix.sql: New sql_mode added. sql/CMakeLists.txt: New files added. sql/Makefile.am: New files added. sql/event_db_repository.cc: New sql_mode added. sql/field.cc: Create options support added. sql/field.h: Create options support added. sql/ha_partition.cc: Create options support added. sql/handler.cc: Create options support added. sql/handler.h: Create options support added. sql/log_event.h: New sql_mode added. sql/mysql_priv.h: New sql_mode added. sql/mysqld.cc: New sql_mode added. sql/share/errmsg.txt: New error messages added. sql/sp.cc: New sql_mode added. sql/sp_head.cc: Create options support added. sql/sql_class.cc: Create options support added. Debug added. sql/sql_class.h: Create options support added. sql/sql_insert.cc: my_safe_a* moved to mysqld_priv.h sql/sql_lex.h: Create options support added. sql/sql_parse.cc: Create options support added. sql/sql_show.cc: Create options support added. sql/sql_table.cc: Create options support added. sql/sql_view.cc: New sql_mode added. sql/sql_yacc.yy: Create options support added. sql/structs.h: Create options support added. sql/table.cc: Create options support added. sql/table.h: Create options support added. sql/unireg.cc: Create options support added. storage/example/ha_example.cc: Create options example. storage/example/ha_example.h: Create options example. storage/pbxt/src/discover_xt.cc: Create options support added.
| | * | | pluggable auth with plugin examplesSergei Golubchik2010-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile.am: add new API files to the check_abi rule, remove duplicates client/CMakeLists.txt: now a client can use dlopen too client/Makefile.am: be csh-friendly include/my_global.h: add dummy plugs for dlopen and co. for the code that needs them to work in static builds mysys/Makefile.am: be csh-friendly plugin/auth/dialog.c: typo fixed
| * | | | Merge MariaDB-5.2 -> MariaDB 5.3Sergey Petrunya2010-03-201-4/+10
| |\ \ \ \ | | |/ / /
| | * | | merge 5.1-> 5.2unknown2009-12-081-4/+10
| | |\ \ \ | | | |/ /
| | | * | A fix and a test case for Konstantin Osipov2009-11-031-4/+10
| | | |\ \ | | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#41756 "Strange error messages about locks from InnoDB". In JT_EQ_REF (join_read_key()) access method, don't try to unlock rows in the handler, unless certain that a) they were locked b) they are not used. Unlocking of rows is done by the logic of the nested join loop, and is unaware of the possible caching that the access method may have. This could lead to double unlocking, when a row was unlocked first after reading into the cache, and then when taken from cache, as well as to unlocking of rows which were actually used (but taken from cache). Delegate part of the unlocking logic to the access method, and in JT_EQ_REF count how many times a record was actually used in the join. Unlock it only if it's usage count is 0. Implemented review comments. mysql-test/r/innodb_lock_wait_timeout_1.result: Update results (Bug41756). mysql-test/t/innodb_lock_wait_timeout_1.test: Add a test case (Bug#41756). sql/item_subselect.cc: Complete struct READ_RECORD initialization with a new member to unlock records. sql/records.cc: Extend READ_RECORD API with a method to unlock read records. sql/sql_select.cc: In JT_EQ_REF (join_read_key()) access method, don't try to unlock rows in the handler, unless certain that a) they were locked b) they are not used. sql/sql_select.h: Add members to TABLE_REF to count TABLE_REF buffer usage count. sql/structs.h: Update declarations.
| | | | * A fix and a test case forKonstantin Osipov2009-11-031-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#41756 "Strange error messages about locks from InnoDB". In JT_EQ_REF (join_read_key()) access method, don't try to unlock rows in the handler, unless certain that a) they were locked b) they are not used. Unlocking of rows is done by the logic of the nested join loop, and is unaware of the possible caching that the access method may have. This could lead to double unlocking, when a row was unlocked first after reading into the cache, and then when taken from cache, as well as to unlocking of rows which were actually used (but taken from cache). Delegate part of the unlocking logic to the access method, and in JT_EQ_REF count how many times a record was actually used in the join. Unlock it only if it's usage count is 0. Implemented review comments. mysql-test/r/bug41756.result: Add result file (Bug#41756) mysql-test/t/bug41756-master.opt: Use --innodb-locks-unsafe-for-binlog, as in 5.0 just using read_committed isolation is not sufficient to reproduce the bug. mysql-test/t/bug41756.test: Add a test file (Bug#41756) sql/item_subselect.cc: Complete struct READ_RECORD initialization with a new member to unlock records. sql/records.cc: Extend READ_RECORD API with a method to unlock read records. sql/sql_select.cc: In JT_EQ_REF (join_read_key()) access method, don't try to unlock rows in the handler, unless certain that a) they were locked b) they are not used. sql/sql_select.h: Add members to TABLE_REF to count TABLE_REF buffer usage count. sql/structs.h: Update declarations.
| | | | * Merge from Tim's 5.0.76-release tree to make 5.0.77 .Chad MILLER2009-01-211-1/+1
| | | | |\