maria:bb-10.3-MDEV-16246

Last commit made on 2018-07-09
Get this branch:
git clone -b bb-10.3-MDEV-16246 https://git.launchpad.net/maria

Branch merges

Branch information

Name:
bb-10.3-MDEV-16246
Repository:
lp:maria

Recent commits

97cc9d3... by Jacob Mathew

MDEV-16246: insert timestamp into spider table from mysqldump gets wrong time zone.

The problem occurred because the Spider node was incorrectly handling
timestamp values sent to and received from the data nodes.

The problem has been corrected as follows:
- Added logic to set and maintain the UTC time zone on the data nodes.
  To prevent timestamp ambiguity, it is necessary for the data nodes to use
  a time zone such as UTC which does not have daylight savings time.
- Removed the spider_sync_time_zone configuration variable, which did not
  solve the problem and which interfered with the solution.
- Added logic to convert to the UTC time zone all timestamp values sent to
  and received from the data nodes. This is done for both unique and
  non-unique timestamp columns. It is done for WHERE clauses, applying to
  SELECT, UPDATE and DELETE statements, and for UPDATE columns.
- Disabled Spider's use of direct update when any of the columns to update is
  a timestamp column. This is necessary to prevent false duplicate key value
  errors.
- Added a new test spider.timestamp to thoroughly test Spider's handling of
  timestamp values.

Author:
  Jacob Mathew.

Reviewer:
  Kentoku Shiba.

b27ec70... by Jacob Mathew

MDEV-16319: Test for crash introduced by b4a2baffa8 fixed by 4968049799

Add a Spider test to ensure that a bug similar to MDEV-11084 is not
re-introduced. Spider would crash if the first partition was not used first.

Author:
  Eric Herman.

First Reviewer:
  Jacob Mathew.

Second Reviewer:
  Kentoku Shiba.

0121d5a... by Marko Mäkelä

Merge 10.2 into 10.3

63027a5... by Sergei Golubchik

.gitignore

after 4461b0f9b30

f2c4180... by Sergey Petrunia

Fix a typo in get_best_ror_intersect

cpk_scan should not be used if using it increases the cost of the query
plan.

c55de8d... by Alexander Barkov

MDEV-9334 ALTER from DECIMAL to BIGINT UNSIGNED returns a wrong result

When altering from DECIMAL to *INT UNIGNED or to BIT, go through val_decimal(),
to avoid truncation to the biggest possible signed integer
(0x7FFFFFFFFFFFFFFF / 9223372036854775807).

f61909e... by Alexander Barkov

MDEV-10182 Bad value when inserting COALESCE(CURRENT_TIMESTAMP) into a DECIMAL column

This problem was earlier fixed by the patch cb16d753b2db936afff844cca0dd434fa7fe736b
for MDEV-11337 Split Item::save_in_field() into virtual methods in Type_handler.

Adding tests only.

ec4fdd5... by Galina Shalygina <email address hidden>

MDEV-16386: Wrong result when pushdown into the HAVING clause of the
            materialized derived table/view that uses aliases is done

The problem appears when a column alias inside the materialized derived
table/view t1 definition coincides with the column name used in the
GROUP BY clause of t1. If the condition that can be pushed into t1
uses that ambiguous column name this column is determined as a column that
is used in the GROUP BY clause instead of the alias used in the projection
list of t1. That causes wrong result.
To prevent it resolve_ref_in_select_and_group() was changed.

a79b033... by Marko Mäkelä

MDEV-16457 mariabackup 10.2+ should default to innodb_checksum_algorithm=crc32

Since MariaDB Server 10.2.2 (and MySQL 5.7), the default value of
innodb_checksum_algorithm is crc32 (CRC-32C), not the inefficient "innodb"
checksum. Change Mariabackup to use the same default, so that checksum
validation (when using the default algorithm on the server) will take less
time during mariabackup --backup. Also, mariabackup --prepare should be
a little faster, and the server should read backups faster, because the
page checksums would only be validated against CRC-32C.

2ca904f... by Marko Mäkelä

MDEV-13103 Deal with page_compressed page corruption

fil_page_decompress(): Replaces fil_decompress_page().
Allow the caller detect errors. Remove
duplicated code. Use the "safe" instead of "fast" variants of
decompression routines.

fil_page_compress(): Replaces fil_compress_page().
The length of the input buffer always was srv_page_size (innodb_page_size).
Remove printouts, and remove the fil_space_t* parameter.

buf_tmp_buffer_t::reserved: Make private; the accessors acquire()
and release() will use atomic memory access.

buf_pool_reserve_tmp_slot(): Make static. Remove the second parameter.
Do not acquire any mutex. Remove the allocation of the buffers.

buf_tmp_reserve_crypt_buf(), buf_tmp_reserve_compression_buf():
Refactored away from buf_pool_reserve_tmp_slot().

buf_page_decrypt_after_read(): Make static, and simplify the logic.
Use the encryption buffer also for decompressing.

buf_page_io_complete(), buf_dblwr_process(): Check more failures.

fil_space_encrypt(): Simplify the debug checks.

fil_space_t::printed_compression_failure: Remove.

fil_get_compression_alg_name(): Remove.

fil_iterate(): Allocate a buffer for compression and decompression
only once, instead of allocating and freeing it for every page
that uses compression, during IMPORT TABLESPACE. Also, validate the
page checksum before decryption, and reduce the scope of some variables.

fil_page_is_index_page(), fil_page_is_lzo_compressed(): Remove (unused).

AbstractCallback::operator()(): Remove the parameter 'offset'.
The check for it in FetchIndexRootPages::operator() was basically
redundant and dead code since the previous refactoring.