summaryrefslogtreecommitdiff
path: root/sql
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.5' into 10.0Sergei Golubchik2018-12-201-0/+1
|\
| * MDEV-16987 - ALTER DATABASE possible in read-only modeSergey Vojtovich2018-12-131-0/+1
| | | | | | | | Forbid ALTER DATABASE under read_only.
* | MDEV-17720 slave_ddl_exec_mode=IDEMPOTENT does not handle DROP DATABASESachin2018-12-191-0/+6
| | | | | | | | Relevant if exists flag are added for create database and drop database.
* | MDEV-17589: Stack-buffer-overflow with indexed varchar (utf8) fieldbb-10.0-varunVarun Gupta2018-12-194-7/+23
| | | | | | | | | | | | Create a new constant MAX_DATA_LENGTH_FOR_KEY. Replace the value of MAX_KEY_LENGTH to also include the LENGTH and NULL BYTES of a field.
* | Backported MDEV-11196(e4d10e09cf31) and MDEV-10360(8a8ba1949bf4) to 10.0Varun Gupta2018-12-191-5/+43
| |
* | MDEV-6453: Assertion `inited==NONE || (inited==RND && scan)' failed in ↵Varun Gupta2018-12-161-0/+4
| | | | | | | | | | | | | | | | handler::ha_rnd_init(bool) with InnoDB, joins, AND/OR conditions The inited parameter handler is not initialised when we do a quick_select after a table scan.
* | remove unsed variableSergei Golubchik2018-12-131-4/+0
| |
* | Fix cmake -DWITH_PARTITION_STORAGE_ENGINE:BOOL=OFFMarko Mäkelä2018-12-131-17/+16
| | | | | | | | | | | | This is a backport of a part of commit 18455ec3f1a9c22977f0ed87233852813b53eb49 from 10.1.
* | Remove space before #ifdefMarko Mäkelä2018-12-131-13/+9
| |
* | Fix compile error when building without the partition engineVarun Gupta2018-12-131-4/+6
| |
* | MDEV-17032: Estimates are higher for partitions of a table with ↵Varun Gupta2018-12-075-9/+74
| | | | | | | | | | | | | | | | | | @@use_stat_tables= PREFERABLY The problem here is EITS statistics does not calculate statistics for the partitions of the table. So a temporary solution would be to not read EITS statistics for partitioned tables. Also disabling reading of EITS for columns that participate in the partition list of a table.
* | 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.
* | Merge branch '5.5' into 10.0Oleksandr Byelkin2018-11-154-87/+140
|\ \ | |/
| * Backport for "MDEV-17698 MEMORY engine performance regression"Alexander Barkov2018-11-154-87/+140
| | | | | | | | | | | | Also, backporting a part of: MDEV-11485 Split Item_func_between::val_int() into virtual methods in Type_handler for easier merge to 10.3.
* | MDEV-11167: InnoDB: Warning: using a partial-field key prefix in search, ↵Oleksandr Byelkin2018-11-071-1/+1
| | | | | | | | | | | | results in assertion failure or "Can't find record" error Fix ha_rnd_init() argument (we do not doing scan but use rnd_pos)
* | Merge 5.5 into 10.0Marko Mäkelä2018-11-071-0/+1
|\ \ | |/
| * MDEV-17377 invalid gap in auto-increment values after LOAD DATASergei Golubchik2018-11-011-0/+1
| | | | | | | | | | reset lex->many_values for LOAD DATA, as it's used for auto-inc range size estimation.
* | MDEV-16695: Estimate for rows of derived tables is very high when we are ↵Varun Gupta2018-11-011-0/+6
| | | | | | | | | | | | | | | | | | | | using index_merge union For index merge union[or sort union], the estimates are not taken into account while calculating the selectivity of a condition. So instead of showing the estimates of the index merge union[or sort union], it shows estimates equal to all the records of the table. The fix for the issue is to include the selectivity of index merge union[or sort union] while calculating the selectivity of a condition.
* | Merge branch '5.5' into 10.0Sergei Golubchik2018-10-273-14/+41
|\ \ | |/
| * Merge branch 'mysql/5.5' into 5.5Sergei Golubchik2018-10-232-2/+2
| |\
| | * Bug #26791931: INCORRECT BEHAVIOR IN ALTER TABLE REORGANIZESreeharsha Ramanavarapu2018-08-191-34/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PARTITION Issue: ------ ALTER TABLE REORGANIZE PARTITION .... can result in incorrect behavior if any partition other than the last one misses the "VALUES LESS THAN..." part of the syntax. Root cause: ----------- Currently ALTER TABLE with changes to partitions is handled incorrectly by the parser. Fix: ---- The if condition which handles partition management differently for ALTER TABLE in the parser should be removed. Change the code to handle the case in the parser.
| | * BUG#27788685: NO WARNING WHEN TRUNCATING A STRING WITH DATAKarthik Kamath2018-07-231-3/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LOSS ANALYSIS: ========= When converting from a BLOB/TEXT type to a smaller BLOB/TEXT type, no warning/error is reported to the user informing about the truncation/data loss. FIX: ==== We are now reporting a warning in non-strict mode and an appropriate error in strict mode.
| | * Bug #26275510 BUNDLED ZLIB DOESN'T INCLUDE FIXES FOR SOME VULNERABILITIESAditya A2018-07-091-2/+1
| | | | | | | | | | | | Upgrading the zlib lib to 1.2.11
| * | Revert "MDEV-14429 sql_safe_updates in my.cnf not work"Sergei Golubchik2018-10-202-1/+2
| | | | | | | | | | | | | | | | | | | | | This reverts commit dc3a20b191362227a6f85fadfc3a8b6c76f69ec6. It requires GET_BIT in include/my_getopt.h, which is available only in 10.3+
| * | MDEV-15919 lower_case_table_names does not behave as expected(nor...Sachin2018-10-171-10/+36
| | | | | | | | | | | | | | | | | | | | | consistently) on Replication Slave lower_case_table_names 0 -> 1 replication works, it's safe as long as mixed case names mapping to the lower case ones is one-to-one
| * | Merge branch 'bb-5.5-wlad' into 5.5Vladislav Vaintroub2018-10-152-2/+1
| |\ \
| | * | MDEV-14429 sql_safe_updates in my.cnf not workVladislav Vaintroub2018-10-152-2/+1
| | | |
| * | | MDEV-17382 Hash join algorithm should not be used to join materializedIgor Babaev2018-10-071-0/+8
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | derived table / view by equality Now rows of a materialized derived table are always put into a temporary table before join operation. If BNLH is used to join this table with the result of a partial join then both operands of the join are actually put into main memory. In most cases this is not efficient. We could avoid this by sending the rows of the derived table directly to the join operation. However this kind of data flow is not supported yet. Fixed by not allowing usage of hash join algorithm to join a materialized derived table if it's joined by an equality predicate of the form f=e where f is a field of the derived table.
| * | cmake: fix usage of GET_TARGET_PROPERTYSergei Golubchik2018-09-221-1/+1
| | | | | | | | | | | | and followup fixes
* | | Remove unused code.Sergey Vojtovich2018-10-195-90/+1
| | |
* | | MDEV-14815 - Server crash or AddressSanitizer errors or valgrind warningsSergey Vojtovich2018-10-191-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in thr_lock / has_old_lock upon FLUSH TABLES Explicit partition access of partitioned MEMORY table under LOCK TABLES may cause subsequent statements to crash the server, deadlock, trigger valgrind warnings or ASAN errors. Freed memory was being used due to incorrect cleanup. At least MyISAM and InnoDB don't seem to be affected, since their THR_LOCK structures don't survive FLUSH TABLES. MEMORY keeps table shared data (including THR_LOCK) even if there're no open instances. There's partition_info::lock_partitions bitmap, which holds bits of partitions allowed to be accessed after pruning. This bitmap is updated for each individual statement. This bitmap was abused in ha_partition::store_lock() such that when we need to unlock a table, locked by LOCK TABLES, only locks for partitions that were accessed by previous statement were released. Eventually FLUSH TABLES frees THR_LOCK_DATA objects, which are still linked into THR_LOCK lists. When such THR_LOCK gets reused we end up with freed memory access. Fixed by using ha_partition::m_locked_partitions bitmap similarly to ha_partition::external_lock().
* | | MDEV-17257 Server crashes in Item::field_type_for_temporal_comparison or in ↵Alexander Barkov2018-10-171-3/+12
| | | | | | | | | | | | get_datetime_value on SELECT with YEAR field and IN
* | | MDEV-11071 - Assertion `thd->transaction.stmt.is_empty()' failed inSergey Vojtovich2018-10-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Locked_tables_list::unlock_locked_tables Similarly to regular DROP TABLE, don't leave locked tables mode if CREATE OR REPLACE dropped temporary table but failed to cerate new one. The problem is that there's no track of which temporary table was "locked" by LOCK TABLES.
* | | Fix typo in 5936d43afb6ad5a75d9eed17eb39e8c00a08a684Marko Mäkelä2018-10-121-1/+1
| | |
* | | threadpool_size can contribute to the wanted_filesDaniel Black2018-10-121-0/+4
| | |
* | | MDEV-17413 Crash in my_malloc_size_cb_func() during shutdown withVladislav Vaintroub2018-10-091-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | forceful connection close. Fix is to ensure that when close_connection() is called from shutdown thread, current_thd is set. This that allocation callback for THD specific memory won't assert(in debug version), or crash (in 10.1 and later) close_connection() allocates THD specific memory e.g when it writes the final error packet, and compression is ON for the connection.
* | | MDEV-17382 Hash join algorithm should not be used to join materializedIgor Babaev2018-10-071-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | derived table / view by equality Now rows of a materialized derived table are always put into a temporary table before join operation. If BNLH is used to join this table with the result of a partial join then both operands of the join are actually put into main memory. In most cases this is not efficient. We could avoid this by sending the rows of the derived table directly to the join operation. However this kind of data flow is not supported yet. Fixed by not allowing usage of hash join algorithm to join a materialized derived table if it's joined by an equality predicate of the form f=e where f is a field of the derived table.
* | | Correct a typo in a commentMarko Mäkelä2018-10-011-1/+1
| | |
* | | Merge remote-tracking branch 'origin/5.5' into bb-10.0-barbb-10.0-barAlexander Barkov2018-09-212-2/+6
|\ \ \ | |/ /
| * | Fixing the comment not to mention the removed class Item_copy_int.Alexander Barkov2018-09-211-1/+1
| | |
| * | A cleanup for MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong resultAlexander Barkov2018-09-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unary minus operation for the smallest possible signed long long value (LONLONG_MIN) is undefined in C++. Because of this, func_time.test failed on ppc64 buildbot machines. Fixing the code to avod using undefined operations. This is fix is similar to "MDEV-7973 bigint fail with gcc 5.0"
* | | Merge remote-tracking branch 'origin/5.5' into 10.0Alexander Barkov2018-09-2113-304/+96
|\ \ \ | |/ /
| * | MDEV-17250 Remove unused Item_copy_xxxAlexander Barkov2018-09-202-265/+0
| | |
| * | MDEV-17244 MAKETIME(900,0,0.111) returns a wrong resultAlexander Barkov2018-09-201-3/+4
| | |
| * | MDEV-17249 MAKETIME(-1e50,0,0) returns a wrong resultAlexander Barkov2018-09-209-32/+88
| | |
| * | MDEV-16741 Assertion `m_extra_cache' failed in ha_partition::late_extra_cacheEugene Kosov2018-09-102-1/+2
| | | | | | | | | | | | multi_delete sets TABLE::no_cache=1 and should set it to 0 when DELETE is done.
| * | Bug#27407480: AUTOMATIC_SP_PRIVILEGES REQUIRES NEED THE INSERT PRIVILEGES ↵Sergei Golubchik2018-09-041-1/+1
| | | | | | | | | | | | | | | | | | FOR MYSQL.USER TABLE A test case and a followup fix