diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-08-21 20:05:02 +1000 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2020-09-01 18:27:09 +1000 |
commit | a3d66090c789dfd9f31a63187ef2cf7a85df9c1b (patch) | |
tree | 7f95e87d5e57c384de5122462dea150564819878 /mysql-test/suite/gcol | |
parent | 6112a0f93d137b9754bc04449873311784e0edd9 (diff) | |
download | mariadb-git-a3d66090c789dfd9f31a63187ef2cf7a85df9c1b.tar.gz |
MDEV-18366 Crash on SELECT on a table with indexed virtual columns
The problem was in improper error handling behavior in
`row_upd_build_difference_binary`:
`innobase_free_row_for_vcol` wasn't called.
To eliminate this problem in all potential places, a refactoring has been
made:
* class ib_vcol_row is added. It owns VCOL_STORAGE and heap and maintains
it in RAII manner
* all innobase_allocate_row_for_vcol/innobase_free_row_for_vcol pairs are
substituted
with ib_vcol_row usage
* row_merge_buf_add is only left untouched because it doesn't own vheap
passed as an argument
* innobase_allocate_row_for_vcol does not allocate VCOL_STORAGE anymore and
accepts it as an argument -- this reduces a number of memory allocations
* move rec_printer out of `#ifndef DBUG_OFF` and mark it cold
Diffstat (limited to 'mysql-test/suite/gcol')
-rw-r--r-- | mysql-test/suite/gcol/r/innodb_virtual_index.result | 3 | ||||
-rw-r--r-- | mysql-test/suite/gcol/t/innodb_virtual_index.test | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_index.result b/mysql-test/suite/gcol/r/innodb_virtual_index.result index cd079544ed0..20311a21136 100644 --- a/mysql-test/suite/gcol/r/innodb_virtual_index.result +++ b/mysql-test/suite/gcol/r/innodb_virtual_index.result @@ -259,6 +259,9 @@ ERROR 22007: Incorrect date value: '20190132' for column `test`.`t1`.`vb` at row SELECT * FROM t1; a b vb ROLLBACK; +SELECT * FROM t1; +a b vb +1 20190132 0000-00-00 CHECK TABLE t1; Table Op Msg_type Msg_text test.t1 check status OK diff --git a/mysql-test/suite/gcol/t/innodb_virtual_index.test b/mysql-test/suite/gcol/t/innodb_virtual_index.test index c2f9cd78fe2..353841840dc 100644 --- a/mysql-test/suite/gcol/t/innodb_virtual_index.test +++ b/mysql-test/suite/gcol/t/innodb_virtual_index.test @@ -278,7 +278,6 @@ DELETE FROM t1; INSERT INTO t1 (a,b) VALUES(1,20190123); SELECT * FROM t1; ROLLBACK; -# MDEV-18366 FIXME: fix the crash and enable this -# SELECT * FROM t1; +SELECT * FROM t1; CHECK TABLE t1; DROP TABLE t1; |