Commit graph

50 commits

Author SHA1 Message Date
Sergei Golubchik
ca4dbcff69 Tests: system columns *not* being auto-renamed (create, alter)
it's correct, they preserve their documented names
2018-01-09 14:18:39 +03:00
Sergei Golubchik
35b679b924 SQL: error messages
remove unused error messages
reword ER_VERS_SYS_FIELD_NOT_HIDDEN->ER_VERS_SYS_FIELD_EXISTS
2018-01-09 14:16:47 +03:00
Sergei Golubchik
1a0b986e78 MDEV-14764 Confusing error message: Table t1 must have at least one temporal column
compiler warning (mix of bool and enum in ?:)
2018-01-09 13:56:31 +03:00
Eugene Kosov
dbf21ff396
MDEV-14787 CREATE does not allow tables with versioning columns only, but ALTER does 2018-01-03 15:51:23 +03:00
Eugene Kosov
157150cfcf MDEV-14769 Temporary table can be altered into system versioning + system_versioning_alter_history has no effect 2018-01-01 23:37:02 +03:00
Eugene Kosov
0fe67f2ef9 MDEV-14744 Assertion `table->versioned() == m_prebuilt->table->versioned()' failed in ha_innobase::open 2017-12-29 00:23:07 +03:00
Eugene Kosov
d8aabb44b5
SQL: prohibit ALTER ... AS ROW START|END [fixes #429] 2017-12-25 13:38:03 +03:00
Eugene Kosov
a04a283469
MDEV-14692 Server crash in MDL_ticket::has_stronger_or_equal_type
SQL: disable system-versioning stuff on TEMPORARY tables
2017-12-21 10:14:25 +03:00
Eugene Kosov
acdfacee75
IB: TRT is not updated on ADD SYSTEM VERSIONING [fixes #413] 2017-12-20 22:46:28 +03:00
Eugene Kosov
4bc268d406
MDEV-14632 Assertion `!((new_col->prtype ^ col->prtype) & ~256U)' failed in row_log_table_apply_convert_mrec
SQL, IB: proper fix is to disable unimplemented Online DDL for system-versioned tables inside InnoDB
2017-12-20 19:42:15 +03:00
Eugene Kosov
b13f1cc59a
MDEV-14681 Bogus ER_UNSUPPORTED_EXTENSION 2017-12-20 16:41:42 +03:00
Aleksey Midenkov
fc21529f14 MDEV-14683 Possible redundancy in error codes
ER_VERS_GENERATED_ALWAYS_NOT_EMPTY vs ER_VERS_ALTER_SYSTEM_FIELD

Related to #310 (91ba4f04be).
2017-12-19 21:55:40 +03:00
Aleksey Midenkov
ee68d019d1 SQL: removed VERS_HIDDEN_FLAG [closes #409] 2017-12-19 16:12:56 +03:00
Aleksey Midenkov
82379ce14d SQL: error messages revised 2017-12-18 19:11:54 +03:00
Aleksey Midenkov
b55a149194
Timestamp-based versioning for InnoDB [closes #209]
* Removed integer_fields check
* Reworked Vers_parse_info::check_sys_fields()
* Misc renames
* versioned as vers_sys_type_t

* Removed versioned_by_sql(), versioned_by_engine()

versioned() works as before;
versioned(VERS_TIMESTAMP) is versioned_by_sql();
versioned(VERS_TRX_ID) is versioned_by_engine().

* create_tmp_table() fix
* Foreign constraints for timestamp-based
* Range auto-specifier fix
* SQL: 1-row partition rotation fix [fixes #260]
* Fix 'drop system versioning, algorithm=inplace'
2017-12-18 19:03:51 +03:00
Eugene Kosov
9b55cc73f1
SQL, IB: unversioned fields with ALTER TABLE [fixes #401] 2017-12-15 20:37:36 +03:00
Aleksey Midenkov
4624e565f3 System Versioning 1.0 pre6
Merge remote-tracking branch 'mariadb/bb-10.3-temporal-serg' into trunk
2017-12-15 18:12:18 +03:00
Sergei Golubchik
f149013393 rename versioning_* variables 2017-12-14 11:31:44 +01:00
Sergei Golubchik
a1141e226d fix nullable autoinc test w/o versioning 2017-12-13 21:44:31 +01:00
Eugene Kosov
cb4657e3b4
MDEV-14627 SQL: disallow ADD SYSTEM VERSIONING for system-versioned tables
SQL: disallow ADD SYSTEM VERSIONING for system-versioned tables
2017-12-12 14:56:28 +03:00
Eugene Kosov
2968543f8d IB: NULL instead of autodecrement [closes #373] 2017-12-08 19:37:24 +03:00
Sergei Golubchik
b3fe45bcd4 rephrase error messages, fix quoting 2017-12-08 16:26:17 +03:00
Sergei Golubchik
d3845132fc remove 'vers_auto_decrement'
Do not generate fake values when adding an auto-inc column to a versioned
table. This is not a auto-inc issue, but a more general case of adding
a not nullalble unique column to a table with history. We don't support
it yet, not even with a special auto-inc hack. As a workaround, one
can use a nullable unique column, that works.
2017-12-05 18:01:43 +03:00
Aleksey Midenkov
68e160fb25 Tests: removed common.inc from results 2017-12-04 00:49:44 +03:00
Aleksey Midenkov
f9d875d212 SQL: disable engine change [fixes #358] 2017-11-27 19:48:36 +03:00
Aleksey Midenkov
0c571f8c4e SQL: versioning_alter_history ERROR mode [closes #350]
Disabled DROP and SURVIVE modes.
2017-11-27 15:07:34 +03:00
Marko Mäkelä
0b89a42ffc Remove the flag vers_update_trt
THD::vers_update_trt, trx_t::vers_update_trt, trx_savept_t::vers_update_trt:
Remove. Instead, determine from trx_t::mod_tables whether versioned
columns were affected by the transaction.

handlerton::prepare_commit_versioned: Replaces vers_get_trt_data.
Return the transaction start ID and also the commit ID, in case
the transaction modified any system-versioned columns (0 if not).

TR_table::store_data(): Remove (merge with update() below).

TR_table::update(): Add the parameters start_id, end_id.

ha_commit_trans(): Remove a condition on SQLCOM_ALTER_TABLE.
If we need something special for ALTER TABLE...ALGORITHM=INPLACE,
that can be done inside InnoDB by modifying trx_t::mod_tables.

innodb_prepare_commit_versioned(): Renamed from innodb_get_trt_data().
Check trx_t::mod_tables to see if any changes to versioned columns
are present.

trx_mod_table_time_t: A pair of logical timestamps, replacing the
undo_no_t in trx_mod_tables_t. Keep track of not only the first
modification to a persistent table in each transaction, but also
the first modification of a versioned column in a table.

dtype_t, dict_col_t: Add the accessor is_any_versioned(), to check
if the type refers to a system-versioned user or system column.

upd_t::affects_versioned(): Check if an update affects a versioned
column.

trx_undo_report_row_operation(): If a versioned column is affected
by the update, invoke trx_mod_table_time_t::set_versioned().

trx_rollback_to_savepoint_low(): If all changes to versioned columns
were rolled back, invoke trx_mod_table_time_t::rollback_versioned(),
so that trx_mod_table_time_t::is_versioned() will no longer hold.
2017-11-27 15:07:33 +03:00
Aleksey Midenkov
cbe93291e4 SQL,IB: add auto_inc copy mode fix [#347]
Related to #212.

Extra update of sys_trx_start removed [#87].
2017-11-23 18:31:55 +03:00
Eugene Kosov
91ba4f04be SQL: prohibit column conversion to system fields for non-empty table [fixes #310] 2017-11-22 15:31:03 +03:00
Eugene Kosov
f9b8c908a0 SQL: ADD/DROP SYSTEM VERSIONING syntax for ALTER TABLE 2017-11-17 11:25:49 +03:00
Aleksey Midenkov
33085349e9 IB, SQL: removed VTQ, added TRT on SQL layer [closes #305] 2017-11-15 00:22:10 +03:00
Aleksey Midenkov
17bd486f36 SQL: thd_start_utime() fix [fixes #284] 2017-10-17 17:20:46 +03:00
Aleksey Midenkov
75bc483d7a Tests: moved concat_execN() to common.inc 2017-09-25 22:07:01 +03:00
Eugene Kosov
c2a70c8050 SQL, IB: option to drop historical rows on ALTER [closes #249] 2017-09-01 12:41:46 +03:00
Aleksey Midenkov
d3d2ea9fd5 SQL, Parser: system_time logic and syntax fixes [closes #237] 2017-08-08 17:12:16 +03:00
Eugene Kosov
5ce6044b1c SQL: remove versioning only when hidden system fields
[closes #211]
2017-08-03 16:03:19 +03:00
Eugene Kosov
f8b6256992 SQL: disallow ALTER CHANGE of system fields [fixes #213] 2017-07-19 23:06:07 +03:00
Aleksey Midenkov
bdcce58fad IB: long names in information_schema 2017-07-04 12:09:33 +03:00
Eugene Kosov
5570ab3789 SQL: history records became alive on copy [fixes #212] 2017-07-03 14:04:34 +03:00
Aleksey Midenkov
4b0f1284ee SQL: revisit error messages [closes #217] 2017-07-03 14:04:34 +03:00
Eugene Kosov
229c528110 SQL: hide system fields instead of drop [closes #210] 2017-06-29 12:07:16 +03:00
Eugene Kosov
414651c80a SQL: ALTER ADD COLUMN order fix 2017-05-25 15:25:04 +03:00
Aleksey Midenkov
b19645caf5 Tests: verify_vtq() fix 2017-05-05 20:36:38 +03:00
Aleksey Midenkov
7a525e7e93 Parser: no implicit NOT NULL for system fields [fixes #163] 2017-05-05 20:36:33 +03:00
Aleksey Midenkov
1894fab11a Tests: split versioning.select into combinations 2017-05-05 20:36:32 +03:00
kevg
fb801289f3 IB, Tests: ALTER with ALGORITHM=INPLACE for InnoDB [closes #87] 2017-05-05 20:36:28 +03:00
kevg
57692d7117 SQL, IB: ALTER ADD AUTO_INCREMENT for versioned tables [closes #112] 2017-05-05 20:36:24 +03:00
Aleksey Midenkov
e851c140f4 SQL: (0.5) Versioned partitions [closes #77]
* one `AS OF NOW`, multiple `VERSIONING` partitions;
* rotation of `VERSIONING` partitions by record count, time period;
* rotation is multi-threaded;
* conventional subpartitions as bottom level for versioned partitions;
* `DEFAULT` keyword selects first `VERSIONING` partition;
* ALTER TABLE ADD/DROP partition;
* REBUILD PARTITION basic operation.
2017-05-05 20:36:21 +03:00
kevg
1742561b4e fix use-after-free [closes #89] 2017-05-05 20:36:21 +03:00
kevg
a17b8f707f 0.5: basic support for ALTER TABLE for InnoDB and other storage engines [closes #57] 2017-05-05 20:36:21 +03:00