summaryrefslogtreecommitdiff
path: root/sql/item_subselect.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '10.1' into 10.2Oleksandr Byelkin2020-08-021-4/+4
|\
| * Code comment spellfixesIan Gilfillan2020-07-221-4/+4
| |
* | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
|\ \ | |/
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |\
| | * Update FSF AddressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | * Update wrong zip-code
* | | MDEV-16240: Assertion `0' failed in row_sel_convert_mysql_key_to_innobasebb-10.2-MDEV-16240Oleksandr Byelkin2019-04-251-1/+1
| | | | | | | | | | | | Set table in row ID position mode before using this function.
* | | MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in ↵Oleksandr Byelkin2018-06-151-11/+11
| | | | | | | | | | | | | | | | | | Locked_tables_list::unlock_locked_table fix_length_and_dec now return result (error/OK)
* | | Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2017-11-091-2/+2
|\ \ \ | |/ /
| * | Merge remote-tracking branch 'origin/10.0' into 10.1Alexander Barkov2017-11-091-2/+2
| |\ \
| | * | MDEV-14164: Unknown column error when adding aggregate to function in oracle ↵Oleksandr Byelkin2017-11-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | style procedure FOR loop Make differentiation between pullout for merge and pulout of outer field during exists2in transformation. In last case the field was outer and so we can safely start from name resolution context of the SELECT where it was pulled. Old behavior lead to inconsistence between list of tables and outer name resolution context (which skips one SELECT for merge purposes) which creates problem vor name resolution.
* | | | Merge 10.1 into 10.2Marko Mäkelä2017-05-231-2/+6
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2017-05-201-2/+6
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | Significantly reduce the amount of InnoDB, XtraDB and Mariabackup code changes by defining pfs_os_file_t as something that is transparently compatible with os_file_t.
| | * | Merge remote-tracking branch 'origin/5.5' into 10.0Vicențiu Ciorbaru2017-05-171-2/+6
| | |\ \ | | | |/
| | | * Fixed the bugs mdev-12670 and mdev-12675.Igor Babaev2017-05-091-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code that blocked conversion of a IN subselect pedicate to a semi-join if it occurred in the ON expression of an outer join did not do it correctly. As a result, the conversion was blocked for IN subselect predicates encountered in ON expressions of INNER joins or in WHERE conditions of mergeable views / derived tables. This patch fixes this problem.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-05-091-0/+7
|\ \ \ \ | |/ / / | | | | | | | | | | | | Revert commit db0917f68f, because the fix for MDEV-12696 is coming from 5.5 and 10.1 in this merge.
| * | | Merge branch '10.0' 10.1Sergei Golubchik2017-04-281-0/+7
| |\ \ \ | | |/ /
| | * | Fixed bug mdev-10053.Igor Babaev2017-04-211-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of the walk method for the class Item_in_subselect was missing. As a result the method never traversed the left operand of any IN subquery predicate. Item_exists_subselect::exists2in_processor() that performs the Exist-To-In transformation calls the walk method to collect info on outer references. As the walk method did not traverse the left operands of the IN subqueries the outer references there were not taken into account and some subqueries that were actually correlated were marked as uncorrelated. It could lead to an attempt of the materialization of such a subquery. Also added a cleanup for some test cases merged from 5.5.
* | | | Fixed the bug mdev-12519.Igor Babaev2017-04-211-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixed some problems that occurred with subqueries that contained directly or indirectly recursive references to recursive CTEs. 1. A [NOT] IN predicate with a constant left operand and a non-correlated subquery as the right operand used in the specification of a recursive CTE was considered as a constant predicate and was evaluated only once. Now such a predicate is re-evaluated after every iteration of the process that produces the records of the recursive CTE. 2. The Exists-To-IN transformation could be applied to [NOT] IN predicates with recursive references. This opened a possibility of materialization for the subqueries used as right operands. Yet, materialization is prohibited for the subqueries if they contain a recursive reference. Now the Exists-To-IN transformation cannot be applied for subquery predicates with recursive references. The function st_select_lex::check_subqueries_with_recursive_references() is called now only for the first execution of the SELECT.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2017-03-301-0/+9
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2017-03-091-0/+9
| |\ \ \ | | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, implement MDEV-11027 a little differently from 5.5 and 10.0: recv_apply_hashed_log_recs(): Change the return type back to void (DB_SUCCESS was always returned). Report progress also via systemd using sd_notifyf().
| | * | Merge 5.5 into 10.0Marko Mäkelä2017-03-081-0/+9
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, implement MDEV-11027 a little differently from 5.5: recv_sys_t::report(ib_time_t): Determine whether progress should be reported. recv_apply_hashed_log_recs(): Rename the parameter to last_batch.
| | | * MDEV-11078: NULL NOT IN (non-empty subquery) should never return resultsVarun Gupta2017-03-051-0/+8
| | | | | | | | | | | | | | | | | | | | Disabling the cond guards during the creation of Tricond Item for constant and NULL left expression items
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2016-08-251-2/+3
| |\ \ \ | | |/ /
| | * | Merge branch '5.5' into 10.0Sergei Golubchik2016-08-101-2/+3
| | |\ \ | | | |/
| | | * MDEV-10419: crash in mariadb 10.1.16-MariaDB-1~trustyOleksandr Byelkin2016-07-301-2/+3
| | | | | | | | | | | | | | | | Fixed initialization and usage of THD reference in subselect engines.
* | | | MDEV-11784 View is created with invalid definition which causes ERROR 1241 ↵Sergei Golubchik2017-02-131-12/+10
| | | | | | | | | | | | | | | | | | | | | | | | (21000): Operand should contain 1 column(s) set the correct print precedence for IN subqueries
* | | | cleanup: avoid Field::field_indexSergei Golubchik2016-12-121-2/+2
| | | | | | | | | | | | | | | | prefer x->field over table->field[x->field->field_index]
* | | | Merge branch '10.2' into bb-10.2-mdev9864Igor Babaev2016-09-071-2/+3
|\ \ \ \
| * | | | MDEV-10419: crash in mariadb 10.1.16-MariaDB-1~trustyOleksandr Byelkin2016-09-021-2/+3
| | | | | | | | | | | | | | | | | | | | Fixed initialization and usage of THD reference in subselect engines.
* | | | | Merge branch '10.2-mdev9197-cons' of github.com:shagalla/serverIgor Babaev2016-08-311-0/+3
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | into branch 10.2-mdev9197.
| * | | | The consolidated patch for mdev-9197.Galina Shalygina2016-08-231-0/+3
| | | | |
* | | | | Merge 10.2 into 10.2-mdev9864.Igor Babaev2016-08-301-32/+28
|\ \ \ \ \
| * \ \ \ \ Merge branch '10.1' into 10.2Sergei Golubchik2016-06-301-19/+15
| |\ \ \ \ \ | | | |/ / / | | |/| | |
| | * | | | Merge branch '10.0' into 10.1Sergei Golubchik2016-06-281-19/+15
| | |\ \ \ \ | | | | |/ / | | | |/| |
| | | * | | Merge branch '5.5' into 10.0Sergei Golubchik2016-06-281-19/+15
| | | |\ \ \ | | | | | |/ | | | | |/|
| | | | * | MDEV-10050: Crash in subselectOleksandr Byelkin2016-06-241-19/+15
| | | | | | | | | | | | | | | | | | | | | | | | thd should not be taken earlier then fix_field and reset on fix_fields if it is needed.
| * | | | | better ER_VIRTUAL_COLUMN_FUNCTION_IS_NOT_ALLOWEDSergei Golubchik2016-06-301-1/+1
| | | | | |
| * | | | | cleanup: change Item::walk() to take void* not uchar*Sergei Golubchik2016-06-301-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and remove all related casts to uchar* also remove a couple of unused methods
| * | | | | MDEV-7563 Support CHECK constraint as in (or close to) SQL StandardMichael Widenius2016-06-301-2/+2
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-10134 Add full support for DEFAULT - Added support for using tables with MySQL 5.7 virtual fields, including MySQL 5.7 syntax - Better error messages also for old cases - CREATE ... SELECT now also updates timestamp columns - Blob can now have default values - Added new system variable "check_constraint_checks", to turn of CHECK constraint checking if needed. - Removed some engine independent tests in suite vcol to only test myisam - Moved some tests from 'include' to 't'. Should some day be done for all tests. - FRM version increased to 11 if one uses virtual fields or constraints - Changed to use a bitmap to check if a field has got a value, instead of setting HAS_EXPLICIT_VALUE bit in field flags - Expressions can now be up to 65K in total - Ensure we are not refering to uninitialized fields when handling virtual fields or defaults - Changed check_vcol_func_processor() to return a bitmap of used types - Had to change some functions that calculated cached value in fix_fields to do this in val() or getdate() instead. - store_now_in_TIME() now takes a THD argument - fill_record() now updates default values - Add a lookahead for NOT NULL, to be able to handle DEFAULT 1+1 NOT NULL - Automatically generate a name for constraints that doesn't have a name - Added support for ALTER TABLE DROP CONSTRAINT - Ensure that partition functions register virtual fields used. This fixes some bugs when using virtual fields in a partitioning function
* | | | | mdev-9864: cleanup, re-factoring.Igor Babaev2016-08-261-0/+5
| | | | | | | | | | | | | | | | | | | | Added comments.
* | | | | Fixed the problem of wrong identification of WITH tables defined in WITH ↵Galina Shalygina2016-05-241-1/+3
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | clauses without RECURSIVE. Added test cases to check the fix. Fixed the problem of wrong types of recursive tables when the type of anchor part does not coincide with the type of recursive part. Prevented usage of marerialization and subquery cache for subqueries with recursive references. Introduced system variables 'max_recursion_level'. Added a test case to test usage of this variable.
* | | | Removed TABLE->sort to make it possible to have multiple active calls toMonty2016-03-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesort and init_read_record() for the same table. This will simplify code for WINDOW FUNCTIONS (MDEV-6115) - Filesort_info renamed to SORT_INFO and moved to filesort.h - filesort now returns SORT_INFO - init_read_record() now takes a SORT_INFO parameter. - unique declaration is moved to uniques.h - subselect caching of buffers is now more explicit than before - filesort_buffer is now reusable even if rec_length has changed. - filsort_free_buffers() and free_io_cache() calls are removed - Remove one malloc() when using get_addon_fields() Other things: - Added --debug-assert-on-not-freed-memory option to make it easier to debug some not-freed-memory issues.
* | | | MDEV-9215 Detect cmp_type() and result_type() from field_type()Alexander Barkov2015-12-011-0/+1
|/ / / | | | | | | | | | (A dependency task for MDEV-4912 Add a plugin to field types)
* | | Merge branch '10.0' into 10.1Sergei Golubchik2015-10-121-0/+6
|\ \ \ | |/ /
| * | Merge branch '5.5' into 10.0Sergei Golubchik2015-10-091-0/+6
| |\ \ | | |/
| | * MDEV-7846: postreview fixOleksandr Byelkin2015-10-061-0/+5
| | |
| | * MDEV-7846: Server crashes in Item_subselect::fix_fields or fails with Thread ↵Oleksandr Byelkin2015-10-061-0/+1
| | | | | | | | | | | | | | | | | | stack overrun Substitute into transformed subselects original left expression and than register its change in case it was substituted.
* | | MDEV-8010 - Avoid sql_alloc() in Items (Patch #1)Sergey Vojtovich2015-08-211-8/+8
| | | | | | | | | | | | | | | | | | | | | Added mandatory thd parameter to Item (and all derivative classes) constructor. Added thd parameter to all routines that may create items. Also removed "current_thd" from Item::Item. This reduced number of pthread_getspecific() calls from 290 to 177 per OLTP RO transaction.
* | | Merge branch '10.1' of github.com:MariaDB/server into 10.1Monty2015-07-091-1/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: sql/item_subselect.cc Fixed also typo in comment
| * | | MDEV-7811: EXPLAIN/ANALYZE FORMAT=JSON should show subquery cacheSergei Petrunia2015-07-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes over the original patch: - Fix variable/class/other names - Fix the JSON output to be in line with the output of other JSON constructs we produce