summaryrefslogtreecommitdiff
path: root/sql
Commit message (Collapse)AuthorAgeFilesLines
* Simple cleanups (no logic changes)Monty2018-12-0910-73/+48
|
* MDEV-17255: New optimizer defaults and ANALYZE TABLEVarun Gupta2018-12-094-6/+33
| | | | | | | | | | | 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
* MDEV-17928 Conversion from TIMESTAMP to VARCHAR SP variables does not work ↵Alexander Barkov2018-12-085-12/+21
| | | | well on fractional digits
* Fix Win64 buildVladislav Vaintroub2018-12-081-7/+7
|
* MDEV-17932 : assertion in multi RENAME USER command.Vladislav Vaintroub2018-12-081-1/+1
| | | | | | | | Sort acl_users inside the mysql_rename_user()'s loop, after every successful iteration. This is needed because on the next loop's iteration find_user_exact() is used, which requires correct sorting by name.
* Merge 10.3 into 10.4Marko Mäkelä2018-12-081-9/+9
|\
| * Fix the 64-bit Windows buildMarko Mäkelä2018-12-081-2/+2
| |
* | Merge 10.3 into 10.4Marko Mäkelä2018-12-073-75/+86
|\ \ | |/
| * Merge 10.2 into 10.3Marko Mäkelä2018-12-073-65/+76
| |\
| | * Merge 10.1 into 10.2Marko Mäkelä2018-12-073-64/+75
| | |\
| | | * Merge branch '10.0' into 10.1Sergei Golubchik2018-12-063-64/+80
| | | |\
| | | | * MDEV-17898 FLUSH PRIVILEGES crashes server with segfaultSergei Golubchik2018-12-061-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | merge_role_db_privileges() was remembering pointers into Dynamic_array acl_dbs, and later was using them, while pushing more elements into the array. But pushing can cause realloc, and it can invalidate all pointers. Fix: remember and use indexes of elements, not pointers.
| | | | * correct order of arguments for Dynamic_array<>::CMP_FUNC2Sergei Golubchik2018-12-061-1/+1
| | | | |
| | | | * cleanup: DYNAMIC_ARRAY -> Dynamic_array<ACL_DB> acl_dbsSergei Golubchik2018-12-062-42/+48
| | | | |
| | | | * MDEV-17734: AddressSanitizer: use-after-poison in ↵Varun Gupta2018-11-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | create_key_parts_for_pseudo_indexes In this case we were trying to access memory for key_parts which we did not assign for a fields because it did not any EITS statistics. The check if EITS statistics for a column is avaialable or not was missing.
| | | * | MDEV-17804: Galera tests cause mysql_socket.h:738: inline_mysql_socket_send: ↵Jan Lindström2018-11-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assertion `mysql_socket.fd != -1' failed. Do not do end of statement logic if thd is already killed as socket is already closed.
| | | * | MDEV-17801: Galera test failure on galera_var_reject_queriesJan Lindström2018-11-263-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that controlling connection i.e. connection that executed the query SET GLOBAL wsrep_reject_queries = ALL_KILL; was also killed but server would try to send result from that query to controlling connection resulting a assertion mysqld: /home/jan/mysql/10.2-sst/include/mysql/psi/mysql_socket.h:738: inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed. as socket was closed when controlling connection was closed. wsrep_close_client_connections() Do not close controlling connection and instead of wsrep_close_thread() we do now soft kill by THD::awake wsrep_reject_queries_update() Call wsrep_close_client_connections using current thd.
* | | | | Cleanup: removing unused zeroing Datetime() constructorAlexander Barkov2018-12-071-4/+0
| | | | |
* | | | | Move deletion of old GTID rows to slave background threadKristian Nielsen2018-12-0710-245/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Windows : create a minimalistic MTR test for mysql_install_db.exeVladislav Vaintroub2018-12-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | only --datadir option is tested in this test. Other options (notably --password and --service) would need another, more comprehensive test.
* | | | | MDEV-15649 Speedup search in acl_users and acl_dbs array,Vladislav Vaintroub2018-12-061-96/+223
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sorting them by usernames first, and then by get_sort() value. Search functions now use binary search to find the the first entry with given name. Then, linear search is done, until the first match.
* | | | | MDEV-17906 Class Binary_stringbb-10.4-mdev7063Alexander Barkov2018-12-053-273/+388
| | | | |
* | | | | MDEV-17907 Class Static_binary_stringAlexander Barkov2018-12-052-217/+240
| | | | |
* | | | | MDEV-17905 Add class CharsetAlexander Barkov2018-12-052-53/+81
| | | | |
* | | | | MDEV-5377 Row-based replication of MariaDB temporal data types with FSP>0 ↵Alexander Barkov2018-12-044-56/+109
| | | | | | | | | | | | | | | | | | | | into a different column type
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-12-042-7/+11
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-12-042-7/+11
| |\ \ \ \ | | |/ / /
| | * | | MDEV-17871 Crash when running explain with CTEIgor Babaev2018-12-012-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the with clause of a query contains a recursive CTE that is not used then processing of EXPLAIN for this query does not require optimization of the unit specifying this CTE. In this case if 'derived' is the TABLE_LIST object created for this CTE then derived->derived_result is NULL and any assignment to derived->derived_result->table causes a crash. After fixing this problem in the code of st_select_lex_unit::prepare() EXPLAIN for such a query worked without crashes. Yet an execution plan for the recursive CTE appeared there. The cause of this problem was an incorrect condition used in JOIN::save_explain_data_intern() that determined whether CTE was to be optimized or not. A similar condition was used in select_describe() and this patch has corrected it as well.
* | | | | MDEV-16707 Add an accessor in Item_func_like class for the negated attributeAlexander Barkov2018-12-031-0/+3
| | | | |
* | | | | MDEV-17319 Assertion `ts_type != MYSQL_TIMESTAMP_TIME' failed upon inserting ↵Alexander Barkov2018-12-025-49/+35
| | | | | | | | | | | | | | | | | | | | into TIME field
* | | | | MDEV-17854 Assertion `decimals <= 6' failed in my_time_fraction_remainder on ↵Alexander Barkov2018-11-281-1/+3
| | | | | | | | | | | | | | | | | | | | SELECT with NULLIF and FROM_UNIXTIME on incorrect time
* | | | | MDEV-15073: Generic UDAF parser code in server for windows functionsOleksandr Byelkin2018-11-278-0/+215
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for usual agreggate UDF (UDAF) Added remove() call support for more efficient window function processing Added example of aggregate UDF with efficient windows function support
* | | | | MDEV-16715 Add accessors for Item_sum and Item_func_group_concat classesAlexander Barkov2018-11-271-1/+11
| | | | |
* | | | | MDEV-16705 Add two accessors for multi_delete classAlexander Barkov2018-11-271-0/+4
| | | | |
* | | | | MDEV-16725 Add accessor methods for classes in item_timefunc.hAlexander Barkov2018-11-271-0/+9
| | | | |
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-11-265-7/+26
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-261-0/+1
| |\ \ \ \ | | |/ / /
| | * | | MDEV-17831 TRUNCATE TABLE removes ROW_FORMAT=COMPRESSEDMarko Mäkelä2018-11-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a table had a KEY_BLOCK_SIZE attribute, but no ROW_FORMAT, it would be created as ROW_FORMAT=COMPRESSED in InnoDB. However, TRUNCATE TABLE would lose the KEY_BLOCK_SIZE attribute and create the table with the innodb_default_row_format (DYNAMIC). This is a regression that was introduced by MDEV-13564. update_create_info_from_table(): Copy also KEY_BLOCK_SIZE.
| * | | | Merge 10.2 into 10.3Marko Mäkelä2018-11-264-7/+25
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | The test galera_sst_mariabackup_table_options was disabled, because the server refuses to start up due to wrong parameters.
| | * | | MDEV-17804: Galera tests cause mysql_socket.h:738: inline_mysql_socket_send: ↵Jan Lindström2018-11-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assertion `mysql_socket.fd != -1' failed. Do not do end of statement logic if thd is already killed as socket is already closed.
| | * | | MDEV-17801: Galera test failure on galera_var_reject_queriesJan Lindström2018-11-223-6/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem was that controlling connection i.e. connection that executed the query SET GLOBAL wsrep_reject_queries = ALL_KILL; was also killed but server would try to send result from that query to controlling connection resulting a assertion mysqld: /home/jan/mysql/10.2-sst/include/mysql/psi/mysql_socket.h:738: inline_mysql_socket_send: Assertion `mysql_socket.fd != -1' failed. as socket was closed when controlling connection was closed. wsrep_close_client_connections() Do not close controlling connection and instead of wsrep_close_thread() we do now soft kill by THD::awake wsrep_reject_queries_update() Call wsrep_close_client_connections using current thd.
* | | | | MDEV-16991 Rounding vs truncation for TIME, DATETIME, TIMESTAMPbb-10.4-mdev16991Alexander Barkov2018-11-2627-358/+1368
| | | | |
* | | | | MDEV-17792 New class Timestamp and cleanups in Date, Datetime, Field for ↵Alexander Barkov2018-11-229-76/+184
| | | | | | | | | | | | | | | | | | | | rounding
* | | | | Merge 10.3 into 10.4Marko Mäkelä2018-11-211-1/+5
|\ \ \ \ \ | |/ / / /
| * | | | Merge bb-10.3-release into 10.3Marko Mäkelä2018-11-201-1/+5
| |\ \ \ \
| | * \ \ \ Merge branch '10.2' into 10.3Oleksandr Byelkin2018-11-158-9/+94
| | |\ \ \ \
* | | | | | | Fixing compilation failure on Windows introduced by MDEV-17776Alexander Barkov2018-11-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 21a58840819530ed6a257550529e50e333237479
* | | | | | | MDEV-14500 filesort to support engines with slow rnd_posSergei Golubchik2018-11-204-23/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the engine wants to avoid rnd_pos() - force a temporary table before a filesort. But don't do it if addon_fields are used.
* | | | | | | misc cleanupSergei Golubchik2018-11-204-25/+19
| | | | | | |