summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-20712 Wrong data type for CAST(@a AS BINARY) for a numeric variableAlexander Barkov2019-10-011-8/+16
|
* Merge 10.4 into 10.5Marko Mäkelä2019-09-251-1/+4
|\
| * Merge 10.3 into 10.4Marko Mäkelä2019-09-251-1/+4
| |\
| | * Merge remote-tracking branch 'origin/10.2' into 10.3Alexander Barkov2019-09-241-1/+4
| | |\
| | | * Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2019-09-241-1/+8
| | | |\
| | | | * Merge remote-tracking branch 'origin/5.5' into 10.1Alexander Barkov2019-09-241-1/+8
| | | | |\
| | | | | * MDEV-20495 Assertion `precision > 0' failed in decimal_bin_size upon CREATE ↵Alexander Barkov2019-09-241-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .. SELECT with zerofilled decimal Also fixes: MDEV-20560 Assertion `precision > 0' failed in decimal_bin_size upon SELECT with MOD short unsigned decimal Changing the way how Item_func_mod calculates its max_length. It now uses decimal_precision(), decimal_scale() and unsigned_flag of its arguments, like all other Item_num_op descendants do.
* | | | | | MDEV-16470 - Session user variables trackerSergey Vojtovich2019-09-241-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Based on contribution by Dapeng Huang.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-121-7/+12
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.3 into 10.4Marko Mäkelä2019-09-121-7/+12
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.2 into 10.3Marko Mäkelä2019-09-101-7/+12
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-20517 Assertion `!is_expensive()' failed in ↵Alexander Barkov2019-09-071-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | Item::value_depends_on_sql_mode_const_item
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-061-0/+16
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.3' into 10.4Sergei Golubchik2019-09-061-0/+16
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge 10.2 (up to commit ef00ac4c86daf3294c46a45358da636763fb0049) into 10.3Alexander Barkov2019-09-041-0/+16
| | |\ \ \ \ | | | |/ / /
| | | * | | MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, false)' in ↵Alexander Barkov2019-09-031-3/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH This change takes into account a column's GENERATED ALWAYS AS expression dependcy on sql_mode's PAD_CHAR_TO_FULL_LENGTH and NO_UNSIGNED_SUBTRACTION flags. Indexed virtual columns as well as persistent generated columns are now not allowed to have such dependencies to avoid inconsistent data or index files on sql_mode changes. So an error is now returned in cases like this: CREATE OR REPLACE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (a) PERSISTENT -- CHAR->VARCHAR or CHAR->TEXT = ERROR ); Functions RPAD() and RTRIM() can now remove dependency on PAD_CHAR_TO_FULL_LENGTH. So this can be used instead: CREATE OR REPLACE TABLE t1 ( a CHAR(5), v VARCHAR(5) AS (RTRIM(a)) PERSISTENT ); Note, unlike CHAR->VARCHAR and CHAR->TEXT this still works, not RPAD(a) is needed: CREATE OR REPLACE TABLE t1 ( a CHAR(5), v CHAR(5) AS (a) PERSISTENT -- CHAR->CHAR is OK ); More sql_mode flags may affect values of generated columns. They will be addressed separately. See comments in sql_mode.h for implementation details.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2019-09-061-0/+66
|\ \ \ \ \ \ | |/ / / / /
| * | | | | MDEV-20397 Support TIMESTAMP, DATETIME, TIME in ROUND() and TRUNCATE()Alexander Barkov2019-08-221-0/+66
| | | | | |
* | | | | | MDEV-15777 Use inferred IS NOT NULL predicates in the range optimizerIgor Babaev2019-08-301-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the optimization that allows range optimizer to consider index range scans that are built employing NOT NULL predicates inferred from WHERE conditions and ON expressions. The patch adds a new optimizer switch not_null_range_scan.
* | | | | | MDEV-20353 Add separate type handlers for unsigned integer data typesAlexander Barkov2019-08-151-5/+14
| | | | | |
* | | | | | Merge remote-tracking branch 'origin/10.4' into 10.5Alexander Barkov2019-08-131-0/+1
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-07-281-0/+1
| |\ \ \ \ \ | | |/ / / /
| | * | | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-07-261-0/+1
| | |\ \ \ \ | | | |/ / /
| | | * | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-07-261-0/+1
| | | |\ \ \ | | | | |/ /
| | | | * | Merge branch '5.5' into 10.1Oleksandr Byelkin2019-07-251-0/+1
| | | | |\ \ | | | | | |/
| | | | | * MDEV-19778 Wrong Result on Left Outer Join with Subquery right on trueIgor Babaev2019-06-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and WHERE filter afterwards This patch complements the patch fixing the bug MDEV-6892. The latter properly handled queries that used mergeable views returning constant columns as inner tables of outer joins and whose where clause contained predicates referring to these columns if the predicates of happened not to be equality predicates. Otherwise the server still could return wrong result sets for such queries. Besides the fix for MDEV-6892 prevented some possible conversions of outer joins to inner joins for such queries. This patch corrected the function check_simple_equality() to handle properly conjunctive equalities of the where clause that refer to the constant columns of mergeable views used as inner tables of an outer join. The patch also changed the code of Item_direct_view_ref::not_null_tables(). This change allowed to take into account predicates containing references to constant columns of mergeable views when converting outer joins into inner joins.
| | | | * | imporve clang buildEugene Kosov2019-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Debug Maintainer mode makes all warnings errors. This patch fix warnings. Mostly about deprecated `register` keyword. Too much warnings came from Mroonga and I gave up on it.
* | | | | | Merge 10.4 into 10.5Marko Mäkelä2019-08-131-3/+3
|\ \ \ \ \ \ | |/ / / / /
| * | | | | Merge 10.3 into 10.4Marko Mäkelä2019-07-251-3/+3
| |\ \ \ \ \ | | |/ / / /
| | * | | | Fix typo and example in comment/KB for `setval()`Anel Husakovic2019-07-221-3/+3
| | | | | |
* | | | | | MDEV-20326 Add class DTCollation_numericAlexander Barkov2019-08-121-3/+3
| | | | | |
* | | | | | A cleanup: removing duplicate code: Item_func::val_decimal()Alexander Barkov2019-08-091-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using val_decimal_from_int() instead, which provides exactly the same functionality.
* | | | | | MDEV-19599 Change db_name, table_name to LEX_CSTRING in Item_ident and ↵Alexander Barkov2019-05-261-1/+1
|/ / / / / | | | | | | | | | | | | | | | Send_field
* | | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2019-05-191-7/+15
|\ \ \ \ \ | |/ / / /
| * | | | MDEV-16872 Add CAST(expr AS FLOAT)Alexander Barkov2019-05-161-6/+14
| | | | |
| * | | | Merge 10.2 into 10.3Marko Mäkelä2019-05-141-1/+1
| |\ \ \ \ | | |/ / /
| | * | | 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
| | * | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-05-041-1/+5
| | |\ \ \ | | | |/ /
| | | * | MDEV-11015 Assertion failed: precision > 0 in decimal_bin_size upon SELECT ↵Alexander Barkov2019-04-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with DISTINCT, CAST and other functions Item_func_min_max::fix_length_and_dec() erroneously set max_length to UINT32_MAX. Merge notes: In 10.3 this problem had been fixed earlier. During merge to 10.3, do a "null merge" in item_func.cc
* | | | | Merge 10.3 into 10.4Marko Mäkelä2019-04-251-1/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | In is_eits_usable(), we disable an assertion that fails due to MDEV-19334.
| * | | | Merge 10.2 into 10.3Marko Mäkelä2019-04-251-1/+1
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2019-04-251-0/+2
| | |\ \ \ | | | |/ /
| | | * | MDEV-17299 Assertion `maybe_null' failed in make_sortkeyAlexander Barkov2019-04-191-0/+2
| | | | |
* | | | | Merge 10.3 into 10.4Marko Mäkelä2019-03-261-12/+0
|\ \ \ \ \ | |/ / / /
| * | | | Merge 10.2 into 10.3Marko Mäkelä2019-03-261-12/+0
| |\ \ \ \ | | |/ / /
| | * | | Merge 10.1 into 10.2Marko Mäkelä2019-03-261-12/+0
| | |\ \ \ | | | |/ /
| | | * | MDEV-18968 Both (WHERE 0.1) and (WHERE NOT 0.1) return empty setAlexander Barkov2019-03-261-12/+0
| | | | |
| | * | | Backporting MDEV-15597 Add class Load_data_outvar and avoid using ↵Alexander Barkov2019-02-231-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Item::STRING_ITEM for Item_user_var_as_out_param detection This is a part of "MDEV-18045 Backporting the MDEV-15497 changes to 10.2 branch"