mariadb/mysql-test/suite/versioning/t
Aleksey Midenkov 04b06f69e6 MDEV-37008 ROW START/END columns added with ALTER TABLE are never INVISIBLE
FIXME: commit message

invisible property in Alter_column and
add_alter_alter_list(). mysql_prepare_alter_table() takes this value
for new column definition.

Vers_parse_info::fix_alter_info() is more fine-grained on throwing
ER_VERS_ALTER_SYSTEM_FIELD. Now it does not fail on visibility change.

mysqltest: At line 78: query 'alter table t add column trx_start
timestamp(6) as row start' succeeded - should have failed with error
ER_MISSING (4125)...

In Vers_parse_info::fix_alter_info() we override data from parser:

9059          as_row= start_end_t(start, end);
9060          period= as_row;

Then Vers_parse_info::check_conditions() fails to find error:

9180      if (!as_row.start || !as_row.end)
9181      {
9182        my_error(ER_MISSING, MYF(0), table_name.str,
9183                    as_row.start ? "AS ROW END" : "AS ROW START");
9184        return true;
9185      }

But as_row is used when creating frm:

529       if (create_info->versioned())
530       {
531         *pos++= EXTRA2_PERIOD_FOR_SYSTEM_TIME;
532         *pos++= 2 * frm_fieldno_size;
533         store_frm_fieldno(pos, get_fieldno_by_name(create_info, create_fields,
534                                            create_info->vers_info.as_row.start));
535         pos+= frm_fieldno_size;
536         store_frm_fieldno(pos, get_fieldno_by_name(create_info, create_fields,
537                                            create_info->vers_info.as_row.end));
538         pos+= frm_fieldno_size;
539       }

There should be other info for it to take start/end indexes.

Parser stage and prepare stage data
separation. Vers_parse_info::as_row and period are left untouched (the
exception is fix_create_like() where as_row
2025-07-21 17:25:28 +03:00
..
alter.test MDEV-37008 ROW START/END columns added with ALTER TABLE are never INVISIBLE 2025-07-21 17:25:28 +03:00
autoinc.test MDEV-22562 Assertion `next_insert_id == 0' upon UPDATE on system-versioned table 2021-03-31 21:25:36 +03:00
binlog.test MDEV-29732 mysqlbinlog produces syntactically incorrect output with system_versioning_insert_history 2022-10-26 15:30:38 +02:00
commit_id.test Merge 10.5 into 10.6 2024-10-03 09:31:39 +03:00
create.test Merge 11.2 into 11.4 2024-10-03 14:32:14 +03:00
cte.test Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00
data.test MDEV-32250 Enable --no-autocommit by default in mysqldump 2024-12-03 20:25:04 +05:30
debug.test MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT 2022-05-06 15:11:02 +03:00
delete.test MDEV-31005: Make working cursor-protocol 2024-09-18 18:39:26 +07:00
delete_history.test MariaDB 11.4.4 release 2024-11-08 07:17:00 +01:00
derived.test MDEV-32148 fixup: replace timestamp on Windows 2025-03-29 12:17:47 +02:00
foreign.combinations
foreign.test cleanup: select ... into tests 2025-02-11 20:31:25 +01:00
insert.test cleanup: select ... into tests 2025-02-11 20:31:25 +01:00
insert2.test Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00
misc.test MDEV-32188 make TIMESTAMP use whole 32-bit unsigned range 2024-05-27 12:39:02 +02:00
not_embedded.test cleanup: disconnect before DROP USER 2025-07-16 09:14:33 +07:00
old_timestamp.test MDEV-32250 Enable --no-autocommit by default in mysqldump 2024-12-03 20:25:04 +05:30
online.test support 'alter online table t1 page_checksum=0' 2023-08-15 10:16:11 +02:00
optimized.test
partition.test Merge branch '11.8' into 12.0 2025-06-18 07:50:39 +02:00
replace.test cleanup: select ... into tests 2025-02-11 20:31:25 +01:00
rpl.test cleanup: select ... into tests 2025-02-11 20:31:25 +01:00
rpl_common.inc fix sporadic versioning.rpl_row failures 2022-06-16 09:57:31 +02:00
rpl_mix.test Fix typos in mysql-test/ 2025-04-29 13:53:16 +10:00
rpl_row.test MariaDB 11.4.4 release 2024-11-08 07:17:00 +01:00
rpl_stmt.test MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT 2022-05-06 15:11:02 +03:00
select.test Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00
select2.test Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00
simple.test MDEV-31005: Make working cursor-protocol 2024-09-18 18:39:26 +07:00
sysvars.test Merge branch '10.5' into 10.6 2021-08-02 10:11:41 +02:00
trx_id.opt MDEV-29989 binlog_do_db option breaks versioning table 2023-09-26 10:47:59 +05:30
trx_id.test Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00
update-big.test MDEV-17554 Auto-create new partition for system versioned tables with history partitioned by INTERVAL/LIMIT 2022-05-06 15:11:02 +03:00
update.test Merge 10.11 into 11.4 2025-01-09 07:58:08 +02:00
view.test Merge 11.4 into 11.6 2024-10-03 16:09:56 +03:00