summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.3 into 10.4bb-10.4-mergeMarko Mäkelä2021-04-252-0/+82
|\
| * Merge 10.2 into 10.3Marko Mäkelä2021-04-242-0/+82
| |\ | | | | | | | | | except commit 1288dfffe77a99d6c5906d12010a1677ee149308
| | * MDEV-25091 CREATE TABLE: field references qualified by a wrong table name ↵Aleksey Midenkov2021-04-232-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | succeed Before FRM is written walk vcol expressions through check_table_name_processor() and check if field items match (db, table_name) qualifier. We cannot do this in check_vcol_func_processor() as there is already no table name qualifiers in expressions of written and loaded FRM.
* | | Merge 10.3 into 10.4Marko Mäkelä2020-11-031-1/+1
|\ \ \ | |/ /
| * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-10-301-1/+1
| |\ \ | | |/
| | * Merge branch '10.1' into 10.2Oleksandr Byelkin2020-10-291-1/+1
| | |\
| | | * MDEV-23702 calculating(auto rounding) issueSergei Golubchik2020-10-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a different fix for "MDEV-19232: Floating point precision / value comparison problem" Instead of truncating decimal values after every division, truncate them for comparison purposes. This reverts commit 62d73df6b270 but keeps the test.
* | | | Merge 10.3 into 10.4Marko Mäkelä2020-09-032-4/+4
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2020-09-032-4/+4
| |\ \ \ | | |/ /
| | * | MDEV-20618 Assertion failed in row_upd_sec_index_entryNikita Malyavin2020-09-012-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a proper error handling of innobase_get_computed_value results in row_upd_store_row/row_upd_store_v_row. Also add an assertion in row_vers_build_clust_v_col to fail during row purge. Add one more assertion in row_sel_sec_rec_is_for_clust_rec for possible future catches.
* | | | Merge branch '10.3' into 10.4Oleksandr Byelkin2020-08-031-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-08-031-1/+1
| |\ \ \ | | |/ /
| | * | Merge branch '10.1' into 10.2Oleksandr Byelkin2020-08-021-1/+1
| | |\ \ | | | |/
| | | * MDEV-19232: Floating point precision / value comparison problemVarun Gupta2020-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue occurs when the subquery_cache is enabled. When there is a cache miss the division was leading to a value with scale 9. In the case of cache hit the value returned was of scale 9 and due to the different values for the scales the where condition evaluated to FALSE, hence the output was incomplete. To fix this problem we need to round up the decimal to the limit mentioned in Item::decimals. This would make sure the values are compared with the same scale.
* | | | Merge 10.3 into 10.4Marko Mäkelä2020-05-302-0/+20
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2020-05-272-0/+20
| |\ \ \ | | |/ /
| | * | MDEV-20015 Assertion `!in_use->is_error()' failed in TABLE::update_virtual_fieldAleksey Midenkov2020-05-262-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update_virtual_field() is called as part of index rebuild in ha_myisam::repair() (MDEV-5800) which is done on bulk INSERT finish. Assertion in update_virtual_field() was put as part of MDEV-16222 because update_virtual_field() returns in_use->is_error(). The idea: wrongly mixed semantics of error status before update_virtual_field() and the status returned by update_virtual_field(). The former can falsely influence the latter.
* | | | Merge 10.3 into 10.4Marko Mäkelä2020-05-182-0/+113
|\ \ \ \ | |/ / /
| * | | Merge remote-tracking branch 'origin/10.2' into 10.3Alexander Barkov2020-05-162-0/+113
| |\ \ \ | | |/ /
| | * | Merge remote-tracking branch 'origin/10.1' into 10.2Alexander Barkov2020-05-162-0/+113
| | |\ \ | | | |/ | | | | | | | | Also, adding 10.2 related changes for MDEV-22579
| | | * MDEV-22579 No error when inserting DEFAULT(non_virtual_column) into a ↵Alexander Barkov2020-05-152-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | virtual column The code erroneously allowed both: INSERT INTO t1 (vcol) VALUES (DEFAULT); INSERT INTO t1 (vcol) VALUES (DEFAULT(non_virtual_column)); The former is OK, but the latter is not. Adding a new virtual method in Item: virtual bool vcol_assignment_allowed_value() const { return false; } Item_null, Item_param and Item_default_value override it. Item_default_value overrides it in the way to: - allow DEFAULT - disallow DEFAULT(col)
* | | | Merge 10.3 into 10.4Marko Mäkelä2020-05-052-3/+3
|\ \ \ \ | |/ / /
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-11-013-0/+34
|\ \ \ \ | |/ / /
| * | | Merge branch '10.2' into 10.3Oleksandr Byelkin2019-10-313-0/+34
| |\ \ \ | | |/ /
| | * | MDEV-20799 DROP Virtual Column crashes MariaDBSergei Golubchik2019-10-283-0/+34
| | | | | | | | | | | | | | | | | | | | use the correct table for evaluating virtual columns in the InnoDB ALTER TABLE.
* | | | MDEV-20639 ASAN SEGV in get_prefix upon modifying base column type with ↵Alexander Barkov2019-09-282-0/+29
| | | | | | | | | | | | | | | | existing indexed virtual column
* | | | MDEV-20423 Assertion `0' failed or `btr_validate_index(index, 0, false)' in ↵Alexander Barkov2019-09-184-0/+101
| | | | | | | | | | | | | | | | row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with TIME_ROUND_FRACTIONAL
* | | | MDEV-18153 Assertion `0' or Assertion `btr_validate_index(index, 0)' failed ↵Alexander Barkov2019-09-138-0/+647
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL Conversion to a temporal data type resulting into a lower precision depends on TIME_ROUND_FRACTIONAL. Taking into account this dependency in: - indexed generated virtual column expressions - persistent virtual column expressions A warning is now issued if conversion from the generation expression to the column data type depends on TIME_ROUND_FRACTIONAL. The warning will be changed to error in 10.5
* | | | Merge branch '10.3' into 10.4Sergei Golubchik2019-09-064-112/+291
|\ \ \ \ | |/ / /
| * | | Merge branch '10.2' into 10.3Sergei Golubchik2019-09-064-112/+287
| |\ \ \ | | |/ /
| | * | Part3: MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, ↵Sergei Golubchik2019-09-064-112/+291
| | | | | | | | | | | | | | | | | | | | | | | | | | | | false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH Don't break compatibility in GA releases. Warn the user, but don't refuse to create a table until 10.5
* | | | Merge branch '10.3' into 10.4Sergei Golubchik2019-09-0613-31/+1321
|\ \ \ \ | |/ / /
| * | | Merge 10.2 (up to commit ef00ac4c86daf3294c46a45358da636763fb0049) into 10.3Alexander Barkov2019-09-0410-10/+1299
| |\ \ \ | | |/ /
| | * | Part2: MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, ↵Alexander Barkov2019-09-034-0/+538
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH This patch allows the server to open old tables that have "bad" generated columns (i.e. indexed virtual generated columns, persistent generated columns) that depend on sql_mode, for general things like SELECT, INSERT, DROP, etc. Warning are issued in such cases. Only these commands are now disallowed and return an error: - CREATE TABLE introducing a "bad" generated column - ALTER TABLE introducing a "bad" generated column - CREATE INDEX introdicing a "bad" generated column (i.e. adding an index on a virtual generated column that depends on sql_mode). Note, these commands are allowed: - ALTER TABLE removing a "bad" generate column - ALTER TABLE removing an index from a "bad" virtual generated column - DROP INDEX removing an index from a "bad" virtual generated column but only if the table does not have any "bad" columns as a result.
| | * | MDEV-18156 Assertion `0' failed or `btr_validate_index(index, 0, false)' in ↵Alexander Barkov2019-09-038-10/+757
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 branch '10.2' into 10.3Monty2019-09-033-21/+26
| |\ \ \ | | |/ /
| | * | Updated mtr files to support different compiled in optionsMonty2019-09-013-21/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-06-192-6/+78
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-06-192-6/+78
| |\ \ \ | | |/ /
| | * | Trivial test result update after fix for MDEV-19771Sergei Petrunia2019-06-161-4/+4
| | | |
| | * | MDEV-19771 REPLACE on table with virtual_field can cause crashMichael Widenius2019-06-152-4/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes also MDEV-17837 Problem was that we did not ignore warnings from virtual fields when updated virtual fields for to-be-replaced row.
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-06-121-2/+2
|\ \ \ \ | |/ / /
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-05-054-0/+92
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-04-274-0/+92
| |\ \ \ | | |/ /
| | * | Tests for MDEV-15881 Assertion `is_valid_value_slow()' failed in ↵Alexander Barkov2019-04-262-0/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Datetime::Datetime or corrupt data after ALTER with indexed persistent column The patch for "MDEV-18486 Database crash on a table with indexed virtual column" fixed MDEV-15881 as well. So adding tests only.
| | * | MDEV-16518 MYSQL57_GENERATED_FIELD: The code in ↵Alexander Barkov2019-04-262-0/+39
| | | | | | | | | | | | | | | | TABLE_SHARE::init_from_binary_frm_image() is not safe
* | | | Merge 10.3 into 10.4Marko Mäkelä2019-04-028-54/+54
|\ \ \ \ | |/ / /
| * | | Merge 10.2 into 10.3Marko Mäkelä2019-03-278-54/+54
| |\ \ \ | | |/ /
| | * | Merge 10.1 into 10.2Marko Mäkelä2019-03-278-54/+54
| | |\ \ | | | |/
| | | * Merge 10.0 into 10.1Marko Mäkelä2019-03-274-29/+29
| | | |\