Commit graph

11635 commits

Author SHA1 Message Date
Eugene Kosov
edeeaac451 MDEV-14829 Assertion `0' failed in Protocol::end_statement upon concurrent UPDATE
vers_insert_history_row(): do not insert rows with zero or negative lifetime.

mysql_update(): properly handle error from vers_insert_history_row()
2018-02-24 00:50:55 +01:00
Aleksey Midenkov
75afaa7e00 MDEV-15001 no tests for system_versioning_innodb_algorithm_simple
Vers SQL: TRT fix getting TRX_ID by COMMIT_TS

Fixed wrong assumption that records are ordered by COMMIT_TS.
This is anyway a quick hack until tempesta-tech#314 is done.

See also FIXME and TODO in TR_table::query(MYSQL_TIME, bool).

Test: SEES case for trx_id.test [closes #456]
2018-02-24 00:50:55 +01:00
Sergei Golubchik
e36c5ec0a5 PARTITION BY SYSTEM_TIME INTERVAL ...
Lots of changes:
* calculate the current history partition in ::external_lock(),
  not in ::write_row() or ::update_row()
* remove dynamically collected per-partition row_end stats
* no full table scan in open_table_from_share to calculate these
  stats, no manual MDL/thr_locks in open_table_from_share
* no shared stats in TABLE_SHARE = no mutexes or condition waits when
  calculating current history partition
* always compare timestamps, don't convert them to MYSQL_TIME
  (avoid DST ambiguity, and it's faster too)
* correct interval handling, 1 month = 1 month, not 30 * 24 * 3600 seconds
* save/restore first partition start time, and count intervals from there
* only allow to drop first partitions if INTERVAL
* when adding new history partitions, split the data in the last history
  parition, if it was overflowed
* show partition boundaries in INFORMATION_SCHEMA.PARTITIONS
2018-02-23 19:17:48 +01:00
Sergei Golubchik
f38ef43013 cleanup: remove *.opt files from the versioning suite
use include/have_xxx.inc when some feature needs to be present
(because --xxx in the opt file will fail if the xxx is not compiled in)

set variables in the test, not on the command line, to avoid unnecessary
server restarts (they're must slower than SET).
2018-02-23 15:33:23 +01:00
Aleksey Midenkov
f1bd02d994 MDEV-15004 parser greedily parses AS OF TIMESTAMP
* TIMESTAMP precedence fixed.
2018-02-23 15:33:23 +01:00
Aleksey Midenkov
df0e1817c7 Vers SQL: partition rotation by INTERVAL fix
Update partition stats on ha_partition::write_row()
2018-02-23 15:33:22 +01:00
Sergei Golubchik
45e1c9bb6d cleanup: remove a pretty formatting function from a test 2018-02-23 15:33:22 +01:00
Sergei Golubchik
9fa715b84d MDEV-14798 Add, drop system versioning semantic and syntax
SQL: DROP PERIOD FOR SYSTEM_TIME syntax

and remove ER_VERS_SYS_FIELD_EXISTS

originally by: Eugene Kosov
2018-02-23 15:33:22 +01:00
Sergei Golubchik
9f6a7ed2d7 SQL: Truncate history of partitioned table [fixes #399, closes #403]
also, don't rotate versioning partitions for DELETE HISTORY

originally by: Aleksey Midenkov
2018-02-23 15:33:21 +01:00
Sergei Golubchik
221d010f3e MDEV-14789 Creating federated table on versioned table fails
don't allow to discover WITH SYSTEM VERSIONING clause

originally by: Aleksey Midenkov
2018-02-23 15:33:21 +01:00
Sergei Golubchik
2732fcc608 Merge branch 'bb-10.2-ext' into 10.3 2018-02-23 08:43:34 +01:00
Marko Mäkelä
59dd0464a9 MDEV-11455 shutdown or abort during innodb buffer pool load (from file) causing incomplete save
Merge pull request #622
2018-02-23 08:17:23 +02:00
Sergei Golubchik
b8af22af15 Merge branch '10.2' into bb-10.2-ext 2018-02-22 19:29:52 +01:00
Sergei Golubchik
e4a73acc63 Merge branch '10.1' into 10.2 2018-02-22 16:46:02 +01:00
Sergei Golubchik
a04e4f531a Merge branch '10.0' into 10.1 2018-02-22 14:12:02 +01:00
Jan Lindström
504beb1325 Add supressions for possible warning. 2018-02-22 14:22:44 +02:00
Sergei Golubchik
b728641e86 Merge branch '5.5' into 10.0 2018-02-22 09:22:03 +01:00
Sergei Golubchik
2daa005800 Merge branch '10.1' into 10.2 2018-02-22 08:39:24 +01:00
Daniel Black
9b8d0d9ff9 MDEV-11455: test case for status variable innodb_buffer_pool_load_incomplete
Add innodb debug system variable, innodb_buffer_pool_load_pages_abort, to test
the behaviour of innodb_buffer_pool_load_incomplete.
(innodb_buufer_pool_dump_abort_loads.test)
2018-02-22 15:50:50 +11:00
Marko Mäkelä
947efe17ed MDEV-15158 On commit, do not write to the TRX_SYS page
This is based on a prototype by
Thirunarayanan Balathandayuthapani <thiru@mariadb.com>.

Binlog and Galera write-set replication information was written into
TRX_SYS page on each commit. Instead of writing to the TRX_SYS during
normal operation, InnoDB can make use of rollback segment header pages,
which are already being written to during a commit.

The following list of fields in rollback segment header page are added:
    TRX_RSEG_BINLOG_OFFSET
    TRX_RSEG_BINLOG_NAME (NUL-terminated; empty name = not present)
    TRX_RSEG_WSREP_XID_FORMAT (0=not present; 1=present)
    TRX_RSEG_WSREP_XID_GTRID
    TRX_RSEG_WSREP_XID_BQUAL
    TRX_RSEG_WSREP_XID_DATA

trx_sys_t: Introduce the fields
recovered_binlog_filename, recovered_binlog_offset, recovered_wsrep_xid.

To facilitate upgrade from older mysql or mariaDB versions, we will read
the information in TRX_SYS page. It will be overridden by the
information that we find in rollback segment header pages.

Mariabackup --prepare will read the metadata from the rollback
segment header pages via trx_rseg_array_init(). It will still
not read any undo log pages or recover any transactions.
2018-02-20 21:36:36 +02:00
Jan Lindström
c3a3b77f9a Disable failing Galera tests:
* galera_gtid_slave
* galera_unicode_identifiers
2018-02-20 09:27:31 +02:00
Jan Lindström
3a7126cbb7 Disable galera_gtid until 1047: WSREP has not yet prepared node for application use is fixed. 2018-02-20 09:18:33 +02:00
Marko Mäkelä
2ba487cfe8 Merge bb-10.2-ext into 10.3 2018-02-19 11:37:29 +02:00
Monty
ef3147b1d6 Fix for MDEV-15105 (memory loss with LOCK sequence)
MDEV 15105 "Bytes lost and Assertion `global_status_var.global_memory_used == 0' fails on shutdown after attempts
to LOCK/RENAME sequence"
2018-02-19 11:27:21 +02:00
Monty
06ba07c269 Test case for MDEV-12887 (bug fixed long ago)
MDEV-12887 UT_LIST_GET_LEN(trx->lock.trx_locks) == 0 when mysqldump
sequence
2018-02-19 11:26:25 +02:00
Marko Mäkelä
278c036275 Merge 10.2 into bb-10.2-ext 2018-02-19 09:01:06 +02:00
Marko Mäkelä
112cb56182 Add suppressions for background page read errors 2018-02-19 08:59:36 +02:00
Jan Lindström
7a84688e2c MDEV-14814: encryption.innodb_encryption-page-compression failed in buildbot with timeout on wait condition
Test changes only.
2018-02-19 08:06:32 +02:00
Vladislav Vaintroub
acab33a1f2 Merge branch '10.2-backup-fixes' into 10.2 2018-02-18 10:49:46 +00:00
Vladislav Vaintroub
e917188f99 Merge branch 'bb-10.2-wlad' into 10.2-backup-fixes 2018-02-18 10:47:23 +00:00
Jan Lindström
9ea3ad6d75 Disable failing test. 2018-02-18 07:32:19 +02:00
Jan Lindström
0e8cb572f1 Fix innodb_encryption-page-compression test by force flushing dirty
pages.
2018-02-17 19:28:32 +02:00
Monty
f853b8ed26 partition_alter_myisam produces warning if no symlink support 2018-02-17 18:04:58 +02:00
Marko Mäkelä
970ce270c9 Merge 10.1 into 10.2
Disable the test encryption.innodb_encryption-page-compression
because the wait_condition would seem to time out deterministically.
MDEV-14814 has to be addressed in 10.2 separately.

Datafile::validate_first_page(): Do not invoke
page_size_t::page_size_t(flags) before validating the tablespace flags.
This avoids a crash in MDEV-15333 innodb.restart test case.
FIXME: Reduce the number of error messages. The first one is enough.
2018-02-17 14:54:12 +02:00
Marko Mäkelä
9a46d97149 MDEV-15333 MariaDB (still) slow start
This performance regression was introduced in the MariaDB 10.1
file format incompatibility bug fix MDEV-11623 (MariaDB 10.1.21
and MariaDB 10.2.4) and partially fixed in MariaDB 10.1.25 in
MDEV-12610 without adding a regression test case.

On a normal startup (without crash recovery), InnoDB should not read
every .ibd data file, because this is slow. Like in MySQL, for now,
InnoDB will still open every data file (without reading), and it
will read every .ibd file for which an .isl file exists, or the
DATA DIRECTORY attribute has been specified for the table.

The test case shuts down InnoDB, moves data files, replaces them
with garbage, and then restarts InnoDB, expecting no messages to
be issued for the garbage files. (Some messages will for now be
issued for the table that uses the DATA DIRECTORY attribute.)
Finally, the test shuts down the server, restores the old data files,
and restarts again to drop the tables.

fil_open_single_table_tablespace(): Remove the condition on flags,
and only call fsp_flags_try_adjust() if validate==true
(reading the first page has been requested). The only caller with
validate==false is at server startup when we are processing all
records from SYS_TABLES. The flags passed to this function are
actually derived from SYS_TABLES.TYPE and SYS_TABLES.N_COLS,
and there never was any problem with SYS_TABLES in MariaDB 10.1.
The problem that MDEV-11623 was that incorrect tablespace flags
were computed and written to FSP_SPACE_FLAGS.
2018-02-17 14:20:33 +02:00
Marko Mäkelä
8bf2c08d54 Add a suppression for background page read error 2018-02-16 21:02:35 +02:00
Alexander Barkov
a55ded1b89 Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext 2018-02-16 13:52:02 +04:00
Alexander Barkov
6668da2216 MDEV-15289 Binding an out-of-range DATETIME value in binary protocol breaks replication 2018-02-16 13:44:24 +04:00
Jan Lindström
21e5335154 MDEV-9962: encryption.innodb_encryption_filekeys stalled waiting for key encryption threads to decrypt all required spaces
Test changes.
2018-02-16 10:19:57 +02:00
Jan Lindström
d3fbff38b9 MDEV-14814: encryption.innodb_encryption-page-compression failed in buildbot with timeout on wait condition
Problem is that if pages are in buffer pool there is no need for
decrypt or page decompression operations.
2018-02-16 08:21:19 +02:00
Monty
144616034c Don't run sql_sequence.grant for embeddes server 2018-02-16 01:35:19 +02:00
Vladislav Vaintroub
2129eab7e2 MDEV-15071 backup does not store xtrabackup_info in the --extra-lsndir directory 2018-02-15 21:08:18 +00:00
Elena Stepanova
8df787d375 Follow-up for 54db0be3be (Added Max_index_length and Temporary) 2018-02-15 18:41:32 +02:00
Marko Mäkelä
cc3b5d1fe7 Merge bb-10.2-ext into 10.3 2018-02-15 11:48:30 +02:00
Sergei Golubchik
7bd258c44c fix plugins.server_audit test for --ps 2018-02-15 10:06:14 +01:00
Marko Mäkelä
b006d2ead4 Merge bb-10.2-ext into 10.3 2018-02-15 10:22:03 +02:00
Monty
7bd81c726b Crash when giving error message for ALTER SEQUENCE
Fixes MDEV-14761 "Assertion `!mysql_parse_status || thd->is_error() ||
thd->get_internal_handler()' failed in parse_sql"
2018-02-15 10:18:55 +02:00
Vladislav Vaintroub
d49f8e9f05 Windows,tests : fix pcre_test_bat test from pcre library.
Tests that are not available in certain configurations, are marked as
Test command : NOT_AVAILABLE in ctest output.

pcre_test_bat does not work without ctest's -C option (--build-config
that was used earlier was wrong).
2018-02-14 23:21:58 +00:00
Sergei Golubchik
03de234baf MDEV-13982 Server crashes in in ha_partition::engine_name
use the correct handlerton when looking for TRANSACTIONAL=1 support
2018-02-14 19:12:23 +01:00
Sergei Golubchik
2709380587 MDEV-13748 Assertion `status_var.local_memory_used == 0 || !debug_assert_on_not_freed_memory' failed in virtual THD::~THD after query with INTERSECT
my_safe_alloca()/my_safe_afree() work as alloca() or malloc()/free()
depending on the memory size to allocate, that is, depending on
reclength here. They only work correctly if reclength doesn't
change in the middle.
2018-02-14 18:41:37 +01:00