summaryrefslogtreecommitdiff
path: root/mysql-test/suite/vcol
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.4 into 10.5Marko Mäkelä2022-12-133-1/+29
|\
| * Merge 10.3 into 10.4Marko Mäkelä2022-12-133-1/+29
| |\
| | * try harder to reject not strictly deterministic vcols in indexes/storedSergei Golubchik2022-12-022-0/+28
| | | | | | | | | | | | | | | | | | detect non-determinism in vcol of vcol, like: create table t1 (a int, b real as (rand()), c real as (b) stored);
| | * MDEV-30016 Virtual columns do not support autoincrement columnsSergei Golubchik2022-12-021-1/+1
| | | | | | | | | | | | change vcol_upgrade test to use stored gcols
* | | Merge remote-tracking branch 'origin/10.4' into 10.5Alexander Barkov2022-09-1419-281/+281
|\ \ \ | |/ /
| * | Merge 10.3 into 10.4Marko Mäkelä2022-09-1319-282/+282
| |\ \ | | |/
| | * MDEV-29446 Change SHOW CREATE TABLE to display default collationAlexander Barkov2022-09-1219-282/+282
| | |
* | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-08-032-0/+30
|\ \ \ | |/ /
| * | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-08-022-0/+29
| |\ \ | | |/
| | * bugfix: RAND is VCOL_SESSION_FUNCSergei Golubchik2022-07-292-0/+29
| | | | | | | | | | | | | | | | | | it's not "non deterministic", it's completely defined by @@rand_seed1 and @@rand_seed2. And as a session func it needs to be re-fixed at the beginning of every statement.
* | | Merge 10.4 into 10.5Marko Mäkelä2022-07-271-6/+6
|\ \ \ | |/ /
| * | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-07-271-6/+6
| |\ \ | | |/
| | * MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers ↵Alexander Barkov2022-07-061-6/+6
| | | | | | | | | | | | and strings
* | | Merge branch '10.4' into 10.5Sergei Golubchik2022-05-096-20/+83
|\ \ \ | |/ /
| * | Merge branch '10.3' into 10.4Sergei Golubchik2022-05-086-7/+82
| |\ \ | | |/
| | * Merge branch '10.2' into 10.3Sergei Golubchik2022-04-216-7/+82
| | |\
| | | * vcols: cannot use CONTEXT_ANALYSIS_ONLY_VCOL_EXPR on fix_fieldsSergei Golubchik2022-04-193-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | because CONTEXT_ANALYSIS_ONLY_VCOL_EXPR can be used only for, exactly, context analysys. Items fixed that way cannot be evaluated. But vcols are going to be evaluated, so they have to be fixed properly, for evaluation.
| | | * MDEV-28092 MariaDB SEGV issueSergei Golubchik2022-04-192-0/+19
| | | | | | | | | | | | | | | | add test
| | | * MDEV-26281 ASAN use-after-poison when complex conversion is involved in blobSergei Golubchik2022-04-142-6/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the bug was that in_vector array in Item_func_in was allocated in the statement arena, not in the table->expr_arena. revert part of the 5acd391e8b2d. Instead, change the arena correctly in fix_all_session_vcol_exprs(). Remove TABLE_ARENA, that was introduced in 5acd391e8b2d to force item tree changes to be rolled back (because they were allocated in the wrong arena and didn't persist. now they do)
* | | | Merge 10.4 into 10.5Marko Mäkelä2022-04-212-2/+174
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2022-04-212-2/+174
| |\ \ \ | | |/ /
| | * | MDEV-24176 Server crashes after insert in the table with virtualAleksey Midenkov2022-04-182-2/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | column generated using date_format() and if() vcol_info->expr is allocated on expr_arena at parsing stage. Since expr item is allocated on expr_arena all its containee items must be allocated on expr_arena too. Otherwise fix_session_expr() will encounter prematurely freed item. When table is reopened from cache vcol_info contains stale expression. We refresh expression via TABLE::vcol_fix_exprs() but first we must prepare a proper context (Vcol_expr_context) which meets some requirements: 1. As noted above expr update must be done on expr_arena as there may be new items created. It was a bug in fix_session_expr_for_read() and was just not reproduced because of no second refix. Now refix is done for more cases so it does reproduce. Tests affected: vcol.binlog 2. Also name resolution context must be narrowed to the single table. Tested by: vcol.update main.default vcol.vcol_syntax gcol.gcol_bugfixes 3. sql_mode must be clean and not fail expr update. sql_mode such as MODE_NO_BACKSLASH_ESCAPES, MODE_NO_ZERO_IN_DATE, etc must not affect vcol expression update. If the table was created successfully any further evaluation must not fail. Tests affected: main.func_like Reviewed by: Sergei Golubchik <serg@mariadb.org>
* | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2022-02-012-0/+18
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2022-01-302-0/+18
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3mariadb-10.3.33Oleksandr Byelkin2022-01-292-0/+18
| | |\ \ | | | |/
| | | * test cases for MySQL bugsSergei Golubchik2022-01-212-0/+18
| | | | | | | | | | | | | | | | also fix a comment, and update a macro just in case
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-08-182-0/+121
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-08-182-0/+121
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-08-182-0/+121
| | |\ \ | | | |/ | | | | | | | | MDEV-18734 FIXME: vcol.partition triggers ASAN heap-use-after-free
| | | * MDEV-18734 ASAN heap-use-after-free upon sorting by blob column from ↵Aleksey Midenkov2021-08-052-0/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | partitioned table ha_partition stores records in array of m_ordered_rec_buffer and uses it for prio queue in ordered index scan. When the records are restored from the array the blob buffers may be already freed or rewritten. The solution is to take temporary ownership of cached blob buffers via String::swap(). When the record is restored from m_ordered_rec_buffer the ownership is returned to table fields. Cleanups: init_record_priority_queue(): removed needless !m_ordered_rec_buffer check as there is same assertion few lines before. dbug_print_row() for arbitrary row pointer
* | | | Merge branch '10.4' into 10.5Oleksandr Byelkin2021-07-312-0/+28
|\ \ \ \ | |/ / /
| * | | Merge branch '10.3' into 10.4Oleksandr Byelkin2021-07-312-0/+28
| |\ \ \ | | |/ /
| | * | Merge branch '10.2' into 10.3Sergei Golubchik2021-07-212-0/+28
| | |\ \ | | | |/
| | | * [1/2] MDEV-18166 ASSERT_COLUMN_MARKED_FOR_READ failed on tables with vcolsNikita Malyavin2021-07-122-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a 10.2+ part of a jira task The two bugs regarding virtual column marking have been fixed: 1. UPDATE of a partitioned table, where the optimizer has chosen a secondary index to make a filesort; 2. INSERT into a table with a nonblob field generated from a blob, with binlog enabled and binlog_row_image=noblob. 3. DELETE from a view on a table with virtual column. Generally the assertion happens from update_virtual_fields() call These bugs are root-caused by missing field marking for dependant fields of a virtual column. Therefore a fix is: mark all the fields involved in the vcol expression by calling field->register_field_in_read_map() instead just setting a single bit. 3 was reproducible only on 10.4+, however the problem might has just been invisible in the earlier versions. The fix is applicable to 10.2-10.3 as well.
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-06-082-5/+23
|\ \ \ \ | |/ / /
| * | | Merge 10.3 into 10.4Marko Mäkelä2021-06-082-5/+23
| |\ \ \ | | |/ /
| | * | Merge 10.2 into 10.3Marko Mäkelä2021-06-082-5/+23
| | |\ \ | | | |/
| | | * MDEV-25672 table alias from previous statement interferes later commandsSergei Golubchik2021-06-022-5/+23
| | | | | | | | | | | | | | | | | | | | only perform the "correct table name" check for *new* generated columns, but not for already existing ones - they're guaranteed to be valid
* | | | Merge branch bb-10.4-release into bb-10.5-releasemariadb-10.5.10Nikita Malyavin2021-05-052-0/+27
|\ \ \ \ | |/ / /
| * | | Merge branch bb-10.3-release into bb-10.4-releaseNikita Malyavin2021-05-052-0/+27
| |\ \ \ | | |/ /
| | * | Merge branch bb-10.2-release into bb-10.3-releaseNikita Malyavin2021-05-042-0/+27
| | |\ \ | | | |/
| | | * MDEV-24583 SELECT aborts after failed REPLACE into table with vcolNikita Malyavin2021-04-272-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | table->move_fields wasn't undone in case of error. 1. move_fields is unconditionally undone even when error is occurred 2. cherry-pick an assertion in `ptr_in_record`, which is already in 10.5
* | | | Merge 10.4 into 10.5Marko Mäkelä2021-04-252-0/+82
|\ \ \ \ | |/ / /
| * | | 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.4' into 10.5Oleksandr Byelkin2020-11-011-1/+1
|\ \ \ \
| * \ \ \ Merge branch '10.3' into 10.4Oleksandr Byelkin2020-10-311-1/+1
| |\ \ \ \ | | |/ / / | |/| / / | | |/ /
| | * | Merge branch '10.2' into 10.3Oleksandr Byelkin2020-10-301-1/+1
| | |\ \ | | | |/