mariadb/mysql-test/suite/vcol/inc
Nikita Malyavin 25e2d0a6bb MDEV-34632 Assertion failed in handler::assert_icp_limitations
Assertion `table->field[0]->ptr >= table->record[0] &&
table->field[0]->ptr <= table->record[0] + table->s->reclength' failed in
handler::assert_icp_limitations.

table->move_fields has some limitations:
1. It cannot be used in cascade
2. It should always have a restoring pair.

Rule 1 is covered by assertions in handler::assert_icp_limitations
and handler::ptr_in_record (commit 30894fe9a9).

Rule 2 should be manually maintained with care. Hopefully, the rule 1 assertions
may sometimes help as well.

In ha_myisam::repair, both rules are broken. table->move_fields is used
asymmetrically there: it is set on every param->fix_record call
(i.e. in compute_vcols) but is restored only once, in the end of repair.

The reason to updating field ptr's for every call is that compute_vcols can
(supposedly) be called in parallel, that is, with the same table, but different
records.

The condition to "unmove" the pointers in ha_myisam::restore_vcos_after_repair
is incorrect, when stored vcols are available, and myisam stores a VIRTUAL field
if it's the only field in the table (the record cannot be of zero length).

This patch solves the problem by "unmoving" the pointers symmetrically, in
compute_vcols. That is, both rules will be preserved maintained.
2024-08-07 14:50:19 +02:00
..
vcol_cleanup.inc
vcol_column_def_options.inc MDEV-20729 Fix REFERENCES constraint in column definition 2019-11-20 13:18:54 +03:00
vcol_dependancies_on_vcol.inc
vcol_handler.inc
vcol_init_vars.pre
vcol_ins_upd.inc MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
vcol_keys.inc MDEV-34632 Assertion failed in handler::assert_icp_limitations 2024-08-07 14:50:19 +02:00
vcol_non_stored_columns.inc MDEV-11066 use MySQL terminology for "virtual columns" 2016-12-12 20:35:51 +01:00
vcol_partition.inc bugfix: non-deterministic vcols in partitioning 2016-12-12 20:35:50 +01:00
vcol_select.inc MDEV-18650: Options deprecated in previous versions - storage_engine 2020-02-13 13:42:01 +02:00
vcol_supported_sql_funcs.inc MDEV-7635: Update tests to adapt to the new default sql_mode 2017-02-10 06:30:42 -05:00
vcol_trigger_sp.inc MDEV-31003: Second execution for ps-protocol 2023-07-26 17:15:00 +07:00
vcol_unsupported_storage_engines.inc MDEV-11066 use MySQL terminology for "virtual columns" 2016-12-12 20:35:51 +01:00
vcol_view.inc