Commit graph

180009 commits

Author SHA1 Message Date
Aleksey Midenkov
f826f1249b Tests: suppress tinyint error for ppc64le [#347] 2017-11-28 14:21:00 +03:00
Eugene Kosov
8eac050440
Tests: revert unneded changes 2017-11-28 11:40:13 +03:00
Marko Mäkelä
219280392e Cleanup: Do not add a parameter to row_update_for_mysql()
row_prebuilt_t::versioned_write: Cache the value of TABLE::versioned_write()
in ha_innobase::build_template()
2017-11-28 11:32:12 +03:00
Marko Mäkelä
3fdd9c1ccc Correct a comment 2017-11-28 11:32:11 +03:00
Aleksey Midenkov
86b590c064 SQL: hide system fields from PK [#361] 2017-11-27 21:44:34 +03:00
Aleksey Midenkov
f9d875d212 SQL: disable engine change [fixes #358] 2017-11-27 19:48:36 +03:00
Aleksey Midenkov
ababd6a935 SQL: destroy Vers_min_max_stats [#346] 2017-11-27 18:28:56 +03:00
Aleksey Midenkov
941e8b7b0b Tests: suppression for innodb.log_corruption 2017-11-27 16:38:43 +03:00
Marko Mäkelä
9b6a790660 Use the FORCE to avoid trouble with vtmd_template [#356] 2017-11-27 16:32:01 +03:00
Aleksey Midenkov
1e3620cc39 Tests: commit_id, truncate for Windows fix [#307] 2017-11-27 16:31:18 +03:00
Aleksey Midenkov
aeee150656 SQL: switch_defaults_to_nullable_trigger_fields() fix [#355] 2017-11-27 15:07:35 +03:00
Aleksey Midenkov
7fab5ecabb Tests: enable disabled tests [closes #341] 2017-11-27 15:07:34 +03:00
Eugene Kosov
01a8bad897 SQL: allow PERIOD as identifier [fixes #331] 2017-11-27 15:07:34 +03:00
Eugene Kosov
62470fc787 SQL: recreate PRIMARY KEY on DROP SYSTEM VERSIONING [#348] 2017-11-27 15:07:34 +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
Aleksey Midenkov
7320c683b9 Parser: disable SV for tmp tables [closes #344] 2017-11-27 15:07:33 +03:00
Marko Mäkelä
86e57eaaa3 Remove upd_node_t::versioned 2017-11-27 15:07:33 +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
Marko Mäkelä
03fbfeef66 Identify system-versioned columns in the InnoDB dictionary
Both bits DATA_VERSIONED will be set in prtype if the column
is system-versioned. The bits will be 0 for normal unversioned
columns. For the special columns identifying the logical start
and end times of versions, only one bit will be set:
DATA_VERS_START or DATA_VERS_END.

create_table_info_t::create_table_def(),
prepare_inplace_alter_table_dict(): Set prtype |= DATA_VERSIONED
for system-versioned columns.

dfield_t::is_version_historical_end(): Determine if a data tuple
field is_version_end() and contains a timestamp in the past
(not TRX_ID_MAX).

dtype_t, dict_col_t: Add the accessors
is_versioned(), is_version_start(), is_version_end().

trx_id_max_bytes[]: The bit pattern of TRX_ID_MAX, for use with
memcmp().
2017-11-27 15:07:33 +03:00
Eugene Kosov
0cdc1164dc SQL, IB: various refactoring [#337] 2017-11-27 15:07:32 +03:00
Marko Mäkelä
4dd8736c15 Cleanup: removed unused variable in sql_yacc 2017-11-27 15:07:32 +03:00
Aleksey Midenkov
6e0b2c7fe0 System Versioning 1.0pre2
Merge branch '10.3' into trunk
2017-11-23 19:41:44 +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
Marko Mäkelä
b612f3baa2 Tests: more fine-grained TRT check 2017-11-23 17:44:47 +03:00
Aleksey Midenkov
5aae304fa0 SQL: low timer resolution hack for THD::start_time [#307]
Windows platform is suffered with this problem.
2017-11-23 17:44:47 +03:00
Aleksey Midenkov
3d51315912 Tests: disabled DDL survival tests [#196] 2017-11-23 17:44:39 +03:00
Marko Mäkelä
1773116fe0 Use ST_AsText() to get textual result 2017-11-23 15:02:26 +02:00
Sergey Vojtovich
84ee7a1000 Less code to depend on ut_crc32_init() 2017-11-23 15:55:51 +04:00
Sergey Vojtovich
aaf5ee85f3 Removed HW acceleration for big endian checksum
Big endian checksum is needed to workaround 10+ years old bug, where checksum
was calculated incorrectly on big endian hardware. We can still checksum such
tablespaces using software implementation of CRC32.
2017-11-23 15:55:51 +04:00
Sergey Vojtovich
62ce8ce75f Removed ut_crc32_byte_by_byte: never used 2017-11-23 15:55:51 +04:00
Monty
e69466d023 Improve performance of heap tables
- make hp_mask an inline function (short and called 16 times)
- Simplify hp_search. Biggest benefit is for doing key lookup
  without a matching row. Matching rows may be a bit slower, but
  is offseted by having hp_mask inlined.
2017-11-23 10:04:12 +02:00
Marko Mäkelä
d8ada08152 MDEV-14477 InnoDB update_time is wrongly updated after partial rollback or internal COMMIT
The non-persistent UPDATE_TIME for InnoDB tables was not being
updated consistently at transaction commit.

If a transaction is partly rolled back so that in the end it will
not modify a table that it intended to modify, the update_time will
be updated nevertheless. This will also happen when InnoDB fails
to write an undo log record for the intended modification.

If a transaction is committed internally in InnoDB, instead of
being committed from the SQL interface, then the trx_t::mod_tables
will not be applied to the update_time of the tables.

trx_t::mod_tables: Replace the std::set<dict_table_t*>
with std::map<dict_table_t*,undo_no_t>, so that the very first
modification within the transaction is identified.

trx_undo_report_row_operation(): Update mod_tables for every operation
after the undo log record was successfully written.

trx_rollback_to_savepoint_low(): After partial rollback, erase from
trx_t::mod_tables any tables for which all changes were rolled back.

trx_commit_in_memory(): Tighten some assertions and simplify conditions.
Invoke trx_update_mod_tables_timestamp() if persistent tables were
affected.

trx_commit_for_mysql(): Remove the call to
trx_update_mod_tables_timestamp(), as it is now invoked at the
lower level, in trx_commit_in_memory().

trx_rollback_finish(): Clear mod_tables before invoking trx_commit(),
because the trx_commit_in_memory() would otherwise wrongly process
mod_tables after a full ROLLBACK.
2017-11-23 09:54:24 +02:00
Marko Mäkelä
fda4fabe9c Correct a comment 2017-11-23 09:54:24 +02:00
Michael Widenius
8a24be6e74 Less dependencies in include files 2017-11-23 09:49:45 +02:00
Michael Widenius
166056f744 Remove not used mem_root argument from build_clone(), get_copy() and get_item_copy()
TODO:
- Make get_thd_memroot() inline
  - To do this, we need to reduce dependence of include files, especially
    so that sql_class.h is not depending in item.h
2017-11-23 09:49:45 +02:00
Aleksey Midenkov
5994b6873c Daemon: TRT check doesn't abort [fixes #335]
Added schema check logging messages.
2017-11-22 22:20:14 +03:00
Eugene Kosov
0b40a981de Scripts: versioning plugin in deb package [closes #332] 2017-11-22 15:31:04 +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
Aleksey Midenkov
00b98264a8 IB: removed alloc from row_ins_set_tuple_col_8() 2017-11-22 15:31:03 +03:00
Aleksey Midenkov
4ecb38d7c9 SQL: variadic argument type fix [#307] 2017-11-22 15:31:03 +03:00
Aleksey Midenkov
b0c44d2874 Misc: Debian patch for db.Delete_versioning_rows_priv 2017-11-22 15:31:03 +03:00
Sergey Vojtovich
e44107c4d9 Tencent contributions added 2017-11-22 14:39:21 +04:00
Aleksey Midenkov
2b16681ee0 SQL, IB: single check of vers_update_trt [#305]
Warnings cleanup in vtmd.cc
Stale thd->vers_update_trt after rollback to savepoint fix
2017-11-21 21:54:11 +03:00
Eugene Kosov
c31aa75dee SQL: open TRT only after versioned write [#305][fixes #321] 2017-11-21 21:54:11 +03:00
Aleksey Midenkov
9ee3ca8d84 Tests: reverted original results [#322]
main.shm (Windows)
main.named_pipe (Windows)
tokudb_parts.partition_syntax_tokudb
2017-11-21 21:54:11 +03:00
Aleksey Midenkov
e83b54cb34 Tests: disabled tests failing in 10.3 [#302]
main.tc_heuristic_recover
main.func_regexp_pcre
main.mysql_client_test
main.mysql_client_test_comp
main.mysql_client_test_nonblock
encryption.innodb_encrypt_log_corruption
innodb.group_commit_binlog_pos
innodb.group_commit_binlog_pos_no_optimize_thread
innodb.innodb-alter-tempfile
innodb.log_file
innodb.log_file_name
innodb.log_file_name_debug
innodb.log_file_size
innodb.log_corruption
innodb_gis.rtree_compress
innodb_gis.rtree_compress2
innodb_gis.rtree_purge
innodb_gis.rtree_split
mariabackup.huge_lsn
rpl.rpl_semi_sync_event_after_sync
rpl.rpl_semi_sync_after_sync_row
rpl.rpl_semi_sync_after_sync
2017-11-21 21:54:11 +03:00
Aleksey Midenkov
64d9b82825 Tests: TRT-related results [#305] 2017-11-21 21:54:10 +03:00
Aleksey Midenkov
4f386579f8 Tests: renamed to mariabackup.system_versioning [#307]
Removed needless combinations.
2017-11-21 21:54:10 +03:00
Otto Kekäläinen
feec04f29d Travis-CI: clean up cruft and add more in-line commments
This will make these files easier to maintain in the future.
2017-11-21 13:07:26 +02:00
Otto Kekäläinen
325c9ce9b3 Travis-CI: slim down the deb build so it passes in the 50 minute time limit
The Debian packaging build was failing on Travis-CI due to timeouts.
These changes make it faster by skipping less relevant parts of the build,
like the test suite, RocksDB, TokuDB and Mroonga.

Also fix the usage of the 'make -j' flag to not have any spaces as
recommended in an example in the Debian policy.
2017-11-21 13:07:26 +02:00