Commit graph

424 commits

Author SHA1 Message Date
Aleksey Midenkov
d1e4c5d13e MDEV-14748 Assertion in ha_myisammrg::attach_children() [fixes #434] 2017-12-29 00:23:20 +03:00
Sergei Golubchik
9daf583ab6 fix CREATE ... SELECT
move table->vers_update_fields() where it belongs - into fill_record(),
right after table_arg->update_virtual_fields()
2017-12-29 00:23:13 +03:00
Sergei Golubchik
1a06a48230 Tests: ER_VERS_DUPLICATE_ROW_START_END check 2017-12-29 00:23:13 +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
Aleksey Midenkov
04451f0f8a MDEV-14765 Server crashes in Sys_var_vers_asof::update 2017-12-26 15:25:39 +03:00
Aleksey Midenkov
11c6882741 MDEV-14747 ALTER PARTITION BY SYSTEM_TIME after LOCK TABLES 2017-12-26 15:25:39 +03:00
Aleksey Midenkov
4236f589b6 MDEV-14751 Server crashes in TABLE::versioned on 2nd execution of SP [fixes #431]
SQL: TABLE_LIST cleanup on free_tmp_table()

May affect non-versioning tests (main suite passed).
2017-12-26 15:25:39 +03:00
Eugene Kosov
d8aabb44b5
SQL: prohibit ALTER ... AS ROW START|END [fixes #429] 2017-12-25 13:38:03 +03:00
Aleksey Midenkov
ea49441c41 Partition: uninitialized vers_info fix 2017-12-22 16:40:09 +03:00
Aleksey Midenkov
57f827cdd6 MDEV-14741 Assertion '(trx)->start_file == 0' failed
in row_truncate_table_for_mysql()
2017-12-22 14:52:17 +03:00
Aleksey Midenkov
1e8eae40ce MDEV-14740 Locking assertion for system_time partitioning
Assertion `thd->locked_tables_mode <= LTM_LOCK_TABLES ||
!thd->lex->requires_prelocking()' failed in lock_tables().
2017-12-22 12:51:48 +03:00
Aleksey Midenkov
7e39f70044 MDEV-14722 Partition: assertion in ha_commit_trans() for sub-statement 2017-12-21 16:15:56 +03:00
Aleksey Midenkov
e65a695f28 Tests: disabled embedded for versioning.trx_id [#387]
Error ER_VERS_TRT_IS_DISABLED is not thrown.
2017-12-21 15:08:34 +03:00
Eugene Kosov
aa4d1bedfc
MDEV-14689 Server crashes in find_field_in_tables on 2nd execution of PS with versioned table and view
SQL: wrong usage of Item::transform()
2017-12-21 14:59:46 +03:00
Eugene Kosov
6dc75b5f89
MDEV-14632 Assertion `!((new_col->prtype ^ col->prtype) & ~256U)' failed in row_log_table_apply_convert_mrec
ha_innobase::check_if_supported_inplace_alter(): enabled non-rebuilding operations for trx_id-based system-versioning tables

Also added better error message for not implemented operations.
2017-12-21 14:59:18 +03:00
Aleksey Midenkov
5c760d952b Parser: default SYSTEM_TIME ALL for DELETE HISTORY 2017-12-21 10:48:48 +03:00
Aleksey Midenkov
36888cc531 MDEV-14686 Server crashes in Item_field::used_tables on 2nd call of SP [fixes #422] 2017-12-21 10:25:32 +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
7eff2080fd MDEV-14687 DELETE HISTORY in prepared stmt crash [fixes #421]
Also fixes broken truncate after 617e108fb6
2017-12-20 16:12:32 +03:00
Aleksey Midenkov
c5d0c38efc MDEV-14676 Redundancy in error codes
ER_VERS_NOT_VERSIONED vs ER_VERSIONING_REQUIRED
2017-12-19 22:05:25 +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
Sergei Golubchik
617e108fb6 s/TRUNCATE ... TO/DELETE HISTORY FROM ... BEFORE/ 2017-12-19 16:35:38 +03:00
Aleksey Midenkov
ee68d019d1 SQL: removed VERS_HIDDEN_FLAG [closes #409] 2017-12-19 16:12:56 +03:00
Eugene Kosov
8ba06032ae
MDEV-14684 Assertion `table' failed in mysql_delete
SQL: disable TRUNCATE table_name TO statement for VIEWs
2017-12-19 15:12:11 +03:00
Aleksey Midenkov
04bed58acf SQL: partitioning CREATE, ALTER fixes
MDEV-14688 Assertion `tab_part_info->part_type == LIST_PARTITION' failed in prep_alter_part_table
MDEV-14673 Assertion `part_elem->type() == partition_element::AS_OF_NOW' failed in check_partition_info
2017-12-18 22:17:53 +03:00
Aleksey Midenkov
b0d9dc43ca SQL: system_versioning_transaction_registry default OFF 2017-12-18 22:17:52 +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
Aleksey Midenkov
70d7672377 SQL: MDEV-14633 Assertion on TRT read [fixes #406] 2017-12-15 16:42:25 +03:00
Eugene Kosov
0e0f1126e6
MDEV-14649 Assertion `t->mysql_col_len == 8' failed in row_insert_for_mysql
SQL: add check for internal partition table type

Also fixes MDEV-14654
2017-12-15 16:35:53 +03:00
Aleksey Midenkov
73606a3977 System Versioning 1.0 pre5 [closes #407]
Merge branch '10.3' into trunk

Both field_visibility and VERS_HIDDEN_FLAG exist independently.

TODO:
VERS_HIDDEN_FLAG should be replaced with SYSTEM_INVISIBLE (or COMPLETELY_INVISIBLE?).
2017-12-15 15:18:59 +03:00
Sergei Golubchik
84e14bff4a privilege: s/delete versioning rows/delete history/ 2017-12-14 20:19:20 +01:00
Sergei Golubchik
18405e5fd9 Partitioning syntax for versioning
partition by system_time (
    partition p0 history,
    partition pn current
 )
2017-12-14 20:19:14 +01:00
Aleksey Midenkov
2ae2876a6c MDEV-14652 NATURAL JOIN crash in mark_common_columns() [fixes #405]
SQL: reverted NATURAL JOIN fix #161 (deprecated by #383)
2017-12-14 21:31:38 +03:00
Aleksey Midenkov
27187443ef MDEV-14650 Assertion 0 failed in TABLE::vers_update_fields [fixes #402]
SQL: fixed selecion of handlerton by respecting partitioning
2017-12-14 19:45:11 +03:00
Aleksey Midenkov
ab5ec0f346 SQL: disable truncate history on partitioned [fixes #399] 2017-12-14 19:11:02 +03:00
Aleksey Midenkov
f96815fe97 SQL: unit resolution Item_field not yet accessible [fixes #398] 2017-12-14 18:42:53 +03:00
Aleksey Midenkov
1668efb722 MDEV-14645: AS OF TIMESTAMP is misused as TRX_ID [fixes #396] 2017-12-14 18:14:21 +03:00
Aleksey Midenkov
2e3b580ba4 SQL: inner/outer system_time consistency [fixes #384] 2017-12-14 13:43:37 +03:00
Sergei Golubchik
f149013393 rename versioning_* variables 2017-12-14 11:31:44 +01:00
Aleksey Midenkov
eab471260b Paritioning: better error for disabled IB engine 2017-12-13 23:51:30 +03:00
Sergei Golubchik
ca6454bcfe for now, remove FOR SYSTEM_TIME at the end of the query
non-standard, redundant, potentially risky in the future,
hides bugs. See #383, #384, #385

Fixed a parser bug where
SELECT * FROM (t1 join t2) FOR SYSTEM_TIME ...
was not an error.
2017-12-13 21:51:20 +01:00
Sergei Golubchik
a1141e226d fix nullable autoinc test w/o versioning 2017-12-13 21:44:31 +01:00
Sergei Golubchik
e77080c7d5 if a table is partitioned by system_time, its partitions are not versioned
they store history and the history does not have history
2017-12-13 21:44:30 +01:00
Sergei Golubchik
21d0a9fe3b yet another error message fix 2017-12-13 21:32:52 +01:00