summaryrefslogtreecommitdiff
path: root/sql/sql_tvc.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.3 into 10.4Marko Mäkelä2018-10-171-2/+17
|\
| * MDEV-17222 Reproducible server crash in String_list::append_str orIgor Babaev2018-10-141-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in Field_iterator_table::create_item When IN predicate is converted to IN subquery we have to ensure that any item from the select list of the subquery has some name and this name is unique across the select list. This was not guaranteed by the code before the patch for MDEV-17222. If the name of an item of the select list was not set, and this happened for binary constants, then the server crashed. If the first row in the IN list contained the same constant in two different positions then the server returned an error message. This was fixed by providing all constants in the first row of the IN list with generated names.
* | MDEV-11953: support of brackets in UNION/EXCEPT/INTERSECT operationsOleksandr Byelkin2018-07-041-4/+4
| |
* | MDEV-16388 Replace member Item::fixed to virtual method is_fixed()Alexander Barkov2018-06-051-2/+1
|/
* Add likely/unlikely to speed up executionMonty2018-05-071-1/+1
| | | | | | | | | 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-16038 Assertion `map->n_bits > 0' failed (my_bitmap.c:386: ↵Igor Babaev2018-04-261-0/+6
| | | | | | | bitmap_is_clear_all) Rows with no elements are not allowed in a table value constructor unless it is used in an INSERT statement.
* MDEV-14835 Server crashes in Field_iterator_table::create_item when number ofGalina Shalygina2018-02-201-1/+1
| | | | | | | | | | | elements of BIGINT or YEAR type in the IN list reaches in_predicate_conversion_threshold The bug appears at the prepare stage when IN-predicate with the long list of values is converted into IN-subquery. It happens because values in the right operand of the IN-predicate that have BIGINT or YEAR types are converted into the Item_int_with_ref. To fix it in the procedure Item_func_in::create_value_list_for_tvc real_item() is taken for each value in the right operand of the IN-predicate.
* Bug fixGalina Shalygina2018-01-251-2/+2
| | | | Wrong conversion
* System Versioning 1.0pre2Aleksey Midenkov2017-11-231-2/+6
|\ | | | | | | Merge branch '10.3' into trunk
| * Handle failures from mallocMichael Widenius2017-11-171-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most "new" failures fixed in the following files: - sql_select.cc - item.cc - item_func.cc - opt_subselect.cc Other things: - Allocate udf_handler strings in mem_root - Required changes in sql_string.h - Add mem_root as argument to some new [] calls - Mark udf_handler strings as thread specific - Removed some comment blocks with code
* | SQL: VIEW of UNION [fixes #293]Aleksey Midenkov2017-11-131-1/+1
|/
* Fixed mdev-14281 Wrong result from query with NOT IN predicate in WHEREIgor Babaev2017-11-051-4/+10
| | | | | | | Conversion of NOT IN predicates into NOT IN subqueries did not work correctly: the predicates actually were converted into IN subqueries. As a result if the conversion was applied for the query with a NOT IN predicate the query could return a wrong result set.
* Remove a type castMarko Mäkelä2017-11-021-2/+2
|
* Fixed compilation failuresMonty2017-11-021-2/+17
| | | | - Also added missing copyright notices
* Merge remote-tracking branch 'shagalla/10.3-mdev12172' into 10.3Igor Babaev2017-11-011-24/+27
| | | | | | | As a result of this merge the code for the following tasks appears in 10.3: - MDEV-12172 Implement tables specified by table value constructors - MDEV-12176 Transform [NOT] IN predicate with long list of values INTO [NOT] IN subquery.
* Mistakes corrected.Galina Shalygina2017-10-281-0/+97
| | | | | TVC can be used in IN subquery and in PARTITION BY struct now. Special variable to control working of optimization added.
* New tests on errors added. Comments corrected. Some procedures corrected.Galina Shalygina2017-09-041-81/+142
|
* Post review changes for the optimization of IN predicates into IN subqueries.Galina Shalygina2017-09-021-119/+170
|
* Memory allocation corrected. New tests added.Galina Shalygina2017-09-011-88/+68
|
* Mistakes corrected. Now all tests in opt_tvc.test file work correctlyGalina Shalygina2017-08-291-1/+0
|
* Mistakes corrected, new error messages addedGalina Shalygina2017-08-291-2/+9
|
* Summarized results of two previous commits (26 July, 25 August)Galina Shalygina2017-08-291-31/+539
|
* New structure Table Value Constructor added in grammar.Galina Shalygina2017-06-291-0/+128
TVC can be used in UNION-statement, in view and in subquery. Files where TVC is defined and its methods are stored added. Methods exec and prepare for TVC added. Tests for TVC added.