summaryrefslogtreecommitdiff
path: root/sql/sys_vars.cc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-18564: Change wsrep_load_data_splitting off by defaultJan Lindström2019-02-131-1/+1
| | | | | Variable wsrep_load_data_splitting is deprecated and should be off by default.
* MDEV-6111 Optimizer TraceVarun Gupta2019-02-131-0/+18
| | | | | | | | | | | | | | | | | | | | | | | This task involves the implementation for the optimizer trace. This feature produces a trace for any SELECT/UPDATE/DELETE/, which contains information about decisions taken by the optimizer during the optimization phase (choice of table access method, various costs, transformations, etc). This feature would help to tell why some decisions were taken by the optimizer and why some were rejected. Trace is session-local, controlled by the @@optimizer_trace variable. To enable optimizer trace we need to write: set @@optimizer_trace variable= 'enabled=on'; To display the trace one can run: SELECT trace FROM INFORMATION_SCHEMA.OPTIMIZER_TRACE; This task also involves: MDEV-18489: Limit the memory used by the optimizer trace introduces a switch optimizer_trace_max_mem_size which limits the memory used by the optimizer trace. This was implemented by Sergei Petrunia.
* cleanup: sys_vars.ccSergei Golubchik2019-02-041-31/+25
| | | | | add DEPRECATED() warning for variables with "deprecated" in the help text. Remove redundant initializers.
* MDEV-17484: New defaults for eq_range_index_dive_limit in 10.4Varun Gupta2019-02-011-1/+1
| | | | The default value for eq_range_index_dive_limit is set to 10
* Merge 10.3 into 10.4Marko Mäkelä2019-01-241-2/+1
|\
| * Merge pull request #1120 from tempesta-tech/sysprg/MDEV-17835v2Jan Lindström2019-01-231-2/+1
| |\ | | | | | | MDEV-17835: Remove wsrep-sst-method=xtrabackup
| | * MDEV-17835: Remove wsrep-sst-method=xtrabackupJulius Goryavsky2019-01-221-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The second line of changes related to replacing xtrabackup with mariabackup: 1) All unnecessary references to xtrabackup are removed from the documentation, from some comments, from the control files that are used to prepare the packages. 2) Made corrections of the tests from the galera_3nodes suite that mentioned xtrabackup or the old (associated with xtrabackup) version of innobackupex. 3) Fixed flaws in the galera_3nodes mtr suite control scripts, because of which they could not work with mariabackup. 4) Fixed numerous bugs in the SST scripts and in the mtr test files (galera_3nodes mtr suite) that prevented the use of Galera with IPv6 addresses. 5) Fixed flaws in tests for rsync and mysqldump (for galera_3nodes mtr tests suite). These tests were not performed successfully without these fixes. https://jira.mariadb.org/browse/MDEV-17835
* | | Galera4Brave Galera Crew2019-01-231-1/+37
| | |
* | | Merge 10.3 into 10.4Marko Mäkelä2019-01-171-2/+6
|\ \ \ | |/ /
| * | Merge 10.2 into 10.3Marko Mäkelä2019-01-171-2/+6
| |\ \ | | |/ | |/|
| | * Merge 10.1 into 10.2Marko Mäkelä2019-01-171-2/+6
| | |\
| | | * Merge 10.0 into 10.1Marko Mäkelä2019-01-171-2/+6
| | | |\
| | | | * MDEV-17475: Increase maximum possible value for table_definition_cache to ↵Oleksandr Byelkin2019-01-161-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | match table_open_cache Allow table definition cache be bigger than open table cache (due to problem with VIEWs and prepared statements).
| | | | * Increase number of max table_open_cache instancesMonty2018-04-261-1/+1
| | | | | | | | | | | | | | | | | | | | This is a backport of MDEV-11429 from 10.1
* | | | | MDEV-7598 Lock user after too many password errorsVladislav Vaintroub2019-01-081-0/+8
| | | | |
* | | | | Added syntax and implementation for BACKUP STAGE'sMonty2018-12-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Part of MDEV-5336 Implement LOCK FOR BACKUP - Changed check of Global_only_lock to also include BACKUP lock. - We store latest MDL_BACKUP_DDL lock in thd->mdl_backup_ticket to be able to downgrade lock during copy_data_between_tables()
* | | | | MDEV-17255: New optimizer defaults and ANALYZE TABLEVarun Gupta2018-12-091-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added to new values to the server variable use_stat_tables. The values are COMPLEMENTARY_FOR_QUERIES and PREFERABLY_FOR_QUERIES. Both these values don't allow to collect EITS for queries like analyze table t1; To collect EITS we would need to use the syntax with persistent like analyze table t1 persistent for columns (col1,col2...) index (idx1, idx2...) / ALL Changing the default value from NEVER to PREFERABLY_FOR_QUERIES.
* | | | | MDEV-15253: Default optimizer setting changes for MariaDB 10.4Varun Gupta2018-12-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | use_stat_tables= PREFERABLY optimizer_use_condition_selectivity= 4
* | | | | Move deletion of old GTID rows to slave background threadKristian Nielsen2018-12-071-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch changes how old rows in mysql.gtid_slave_pos* tables are deleted. Instead of doing it as part of every replicated transaction in record_gtid(), it is done periodically (every @@gtid_cleanup_batch_size transaction) in the slave background thread. This removes the deletion step from the replication process in SQL or worker threads, which could speed up replication with many small transactions. It also decreases contention on the global mutex LOCK_slave_state. And it simplifies the logic, eg. when a replicated transaction fails after having deleted old rows. With this patch, the deletion of old GTID rows happens asynchroneously and slightly non-deterministic. Thus the number of old rows in mysql.gtid_slave_pos can temporarily exceed @@gtid_cleanup_batch_size. But all old rows will be deleted eventually after sufficiently many new GTIDs have been replicated.
* | | | | MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMPbb-10.4-mdev16991Alexander Barkov2018-11-261-0/+1
| | | | |
* | | | | Merge 10.3 into 10.4mariadb-10.4.0Marko Mäkelä2018-11-081-1/+1
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-14429 sql_safe_updates in my.cnf not workVladislav Vaintroub2018-11-061-1/+1
| | | | |
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-09-111-0/+10
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-09-061-92/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-08-311-92/+1
| | |\ \ \ | | | |/ /
| | | * | Revert MDEV-9519 due to regressionsMarko Mäkelä2018-08-311-92/+1
| | | | | | | | | | | | | | | | | | | | This reverts commit 75dfd4acb995789ca5f86ccbd361fff9d2797e79.
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-08-281-1/+102
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-08-211-1/+92
| | |\ \ \ | | | |/ /
| | | * | This is patch for the https://jira.mariadb.org/browse/MDEV-9519 issue:Julius Goryavsky2018-08-151-1/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have a 2+ node cluster which is replicating from an async master and the binlog_format is set to STATEMENT and multi-row inserts are executed on a table with an auto_increment column such that values are automatically generated by MySQL, then the server node generates wrong auto_increment values, which are different from what was generated on the async master. The causes and fixes: 1. We need to improve processing of changing the auto-increment values after changing the cluster size. 2. If wsrep auto_increment_control switched on during operation of the node, then we should immediately update the auto_increment_increment and auto_increment_offset global variables, without waiting of the next invocation of the wsrep_view_handler_cb() callback. In the current version these variables retain its initial values if wsrep_auto_increment_control is switched on during operation of the node, which leads to inconsistent results on the different nodes in some scenarios. 3. If wsrep auto_increment_control switched off during operation of the node, then we must return the original values of the auto_increment_increment and auto_increment_offset global variables, as the user has set. To make this possible, we need to add a "shadow copies" of these variables (which stores the latest values set by the user).
| | * | | MDEV-16934 Query with very large IN clause lists runs slowlyIgor Babaev2018-08-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces support for the system variable eq_range_index_dive_limit that existed in MySQL starting from 5.6. The variable sets a limit for index dives into equality ranges. Index dives are performed by optimizer to estimate the number of rows in range scans. Index dives usually provide good estimate but they are pretty expensive. To estimate the number of rows in equality ranges statistical data on indexes can be employed. Its usage gives not so good estimates but it's cheap. So if the number of equality dives required by an index scan exceeds the set limit no dives for equality ranges are performed by the optimizer for this index. As the new system variable is introduced in a stable version the default value for it is set to a special value meaning there is no limit for the number of index dives performed by the optimizer. The patch partially uses the MySQL code for WL 5957 'Statistics-based Range optimization for many ranges'.
* | | | | MDEV-16536 Remove shared memory transportVladislav Vaintroub2018-08-201-11/+0
| | | | |
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-08-161-0/+4
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-08-031-0/+4
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-0/+6
| | |\ \ \ | | | |/ /
| | | * | MDEV-16689: core-file should become a real server variablebb-10.1-MDEV-16689Oleksandr Byelkin2018-07-201-0/+6
| | | | | | | | | | | | | | | | | | | | Mysql Bug#56124 bug analog fix using Sys_var_bit.
* | | | | MDEV-16277 tcp_nodelay session variable to enable / disable Nagle algorithmVladislav Vaintroub2018-08-111-8/+36
| | | | |
* | | | | Merge remote-tracking branch 'origin/10.3' into 10.4Alexander Barkov2018-07-031-3/+12
|\ \ \ \ \ | |/ / / /
| * | | | Merge branch '10.2' into 10.3Sergei Golubchik2018-06-301-3/+12
| |\ \ \ \ | | |/ / /
| | * | | Optimize charset tracking a bit.bb-10.2-MDEV-15477Oleksandr Byelkin2018-06-251-0/+6
| | | | |
| | * | | MDEV-15477: SESSION_SYSVARS_TRACKER does not track last_gtidOleksandr Byelkin2018-06-251-2/+5
| | | | | | | | | | | | | | | | | | | | register changes of last_gtid
| | * | | Merge branch '10.1' into 10.2Sergei Golubchik2018-06-211-1/+1
| | |\ \ \ | | | |/ /
| | | * | Fix wsrep.variables test caseVicențiu Ciorbaru2018-06-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correctly port 09b25f85966f44aae933e86b84b4ebe59ded47c3 from 10.0. Expose check_is_super via include file to allow wsrep_on_check to use it.
* | | | | Merge branch '10.3' into 10.4Igor Babaev2018-06-031-31/+61
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-15995 Drop extra semicolon in VARIABLE_COMMENT for ↵Eugene Kosov2018-05-121-1/+1
| | | | | | | | | | | | | | | | | | | | SYSTEM_VERSIONING_ALTER_HISTORY
| * | | | MDEV-15923 option to control who can set session @@timestampSergei Golubchik2018-05-121-1/+24
| | | | | | | | | | | | | | | | | | | | --secure-timestamp=NO|SUPER|REPLICATION|YES
| * | | | cleanup: sys_vars.ccSergei Golubchik2018-05-121-8/+3
| | | | | | | | | | | | | | | | | | | | remove the redundant declaration tail
| * | | | MDEV-13134 Introduce ALTER TABLE attributes ALGORITHM=NOCOPY and ↵Thirunarayanan Balathandayuthapani2018-05-071-3/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ALGORITHM=INSTANT Introduced new alter algorithm type called NOCOPY & INSTANT for inplace alter operation. NOCOPY - Algorithm refuses any alter operation that would rebuild the clustered index. It is a subset of INPLACE algorithm. INSTANT - Algorithm allow any alter operation that would modify only meta data. It is a subset of NOCOPY algorithm. Introduce new variable called alter_algorithm. The values are DEFAULT(0), COPY(1), INPLACE(2), NOCOPY(3), INSTANT(4) Message to deprecate old_alter_table variable and make it alias for alter_algorithm variable. alter_algorithm variable for slave is always set to default.
| * | | | Add likely/unlikely to speed up executionMonty2018-05-071-18/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added to: - if (error) - Lex - sql_yacc.yy and sql_yacc_ora.yy - In header files to alloc() calls - Added thd argument to thd_net_is_killed()
* | | | | MDEV-12387 Push conditions into materialized subqueriesGalina Shalygina2018-05-151-0/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The logic and the implementation scheme are similar with the MDEV-9197 Pushdown conditions into non-mergeable views/derived tables How the push down is made on the example: select * from t1 where a>3 and b>10 and (a,b) in (select x,max(y) from t2 group by x); --> select * from t1 where a>3 and b>10 and (a,b) in (select x,max(y) from t2 where x>3 group by x having max(y)>10); The implementation scheme: 1. Search for the condition cond that depends only on the fields from the left part of the IN subquery (left_part) 2. Find fields F_group in the select of the right part of the IN subquery (right_part) that are used in the GROUP BY 3. Extract from the cond condition cond_where that depends only on the fields from the left_part that stay at the same places in the left_part (have the same indexes) as the F_group fields in the projection of the right_part 4. Transform cond_where so it can be pushed into the WHERE clause of the right_part and delete cond_where from the cond 5. Transform cond so it can be pushed into the HAVING clause of the right_part The optimization is made in the Item_in_subselect::pushdown_cond_for_in_subquery() and is controlled by the variable condition_pushdown_for_subquery. New test file in_subq_cond_pushdown.test is created. There are also some changes made for setup_jtbm_semi_joins(). Now it is decomposed into the 2 procedures: setup_degenerate_jtbm_semi_joins() that is called before optimize_cond() for cond and setup_jtbm_semi_joins() that is called after optimize_cond(). New setup_jtbm_semi_joins() is made in the way so that the result of its work is the same as if it was called before optimize_cond(). The code that is common for pushdown into materialized derived and into materialized IN subqueries is factored out into pushdown_cond_for_derived(), Item_in_subselect::pushdown_cond_for_in_subquery() and st_select_lex::pushdown_cond_into_where_clause().
* | | | Merge remote-tracking branch '10.2' into 10.3Vicențiu Ciorbaru2018-04-121-4/+4
|\ \ \ \ | |/ / /