Commit graph

186950 commits

Author SHA1 Message Date
Alexander Barkov
afe6eb499d Revert "MDEV-20342 Turn Field::flags from a member to a method"
This reverts commit e86010f909.

Reverting on Monty's request, as this change makes merging
things from 10.5 to 10.2 much harder.
2019-08-14 20:27:00 +04:00
Alexander Barkov
e86010f909 MDEV-20342 Turn Field::flags from a member to a method 2019-08-14 13:33:01 +04:00
Marko Mäkelä
fa21952e25 Merge 10.4 into 10.5 2019-08-14 12:01:04 +03:00
Marko Mäkelä
c4feef50cf MDEV-20138 innodb.trx_id_future fails on 10.4+
Adjust the test for full_crc32.
2019-08-14 11:58:22 +03:00
Marko Mäkelä
1c83c30064 Merge 10.4 into 10.5 2019-08-14 10:33:17 +03:00
Thirunarayanan Balathandayuthapani
7772c7cd94 MDEV-20340 Encrypted temporary tables cannot be read with full_crc32
Problem:
========
Checksum for the encrypted temporary tablespace is not stored in the page
for full crc32 format.

Solution:
========
Made temporary tablespace in full crc32 format irrespective of encryption
parameter.

buf_tmp_page_encrypt(), buf_tmp_page_decrypt() - Both follows full_crc32
format.
2019-08-14 10:32:52 +03:00
Marko Mäkelä
dc8a20f3d0 MDEV-19781: Adapt the test for full_crc32 2019-08-14 10:32:52 +03:00
Marko Mäkelä
d7be886cb8 Fix main.opt_trace
This was broken in 2dbe472ed0
2019-08-14 10:32:52 +03:00
Marko Mäkelä
34b937835e Re-record innodb.innodb-system-table-view
This was broken in the merge 624dd71b94
2019-08-14 09:32:37 +03:00
Alexander Barkov
c1599821a5 Merge remote-tracking branch 'origin/10.4' into 10.5 2019-08-13 23:49:10 +04:00
Marko Mäkelä
624dd71b94 Merge 10.4 into 10.5 2019-08-13 18:57:00 +03:00
Monty
c4fd167d5a Fixed access to unitialized memory when using unique HASH key
Fixed the following issues:
- Call info with HA_STATUS_CONST to ensure that (key_info->rec_per_key)
  contains latest data
- Don't access rec_per_key if key_info->algorithm == HA_KEY_ALG_LONG_HASH
  is in this case the rec_per_key points to uninitialized data
- Cleaned up code to avoid some extra 'if' and to make things more readable
- Updated test cases that used 'old' rec_per_key values
2019-08-13 17:19:00 +03:00
Sergei Petrunia
2dbe472ed0 Optimizer trace: print cost and #rows of the join prefix
The names rows_for_plan and cost_for_plan follow MySQL
Also added post-join-operation selectivity cost
2019-08-13 16:08:48 +03:00
Alexander Barkov
95cdc1ca5f Merge commit '43882e764d6867c6855b1ff057758a3f08b25c55' into 10.4 2019-08-13 11:42:31 +04:00
Alexander Barkov
d4d865fcc8 MDEV-20332 Wrong UNSIGNED metadata flag returned for COALESCE(unsigned_field,timestamp_field) 2019-08-12 23:11:36 +04:00
Alexander Barkov
0e0d57141e MDEV-20331 Add class Type_numeric_attributes 2019-08-12 21:46:20 +04:00
Marko Mäkelä
ae1d17f52d MDEV-20316 InnoDB writes uninitialised tail of XID buffer
Starting with commit 210855ce5d
Valgrind became aware that the unused tail of the buffer that
is returned by thd_get_xid() is actually uninitialized.

The problem should exist already in MySQL 5.0. I was able to
repeat it on MariaDB Server 5.5 with some additional instrumentation.
InnoDB is allocating 128+4+4 bytes for the XID and the lengths of
its components, even when the XID is shorter than 64+64 bytes.
In MariaDB Server 10.3, while running the test main.xa_binlog,
in the xid_t::set() that is called by sql_yacc.yy, the 128-byte data
buffer was uninitialized according to Valgrind, and only the first bytes
were initialized. When the xid_t::data was copied to
thd.transaction.xid_state.xid.data, it happened so that the entire
target buffer was considered initialized. With MariaDB Server 10.4 since
the said commit, Valgrind will correctly be detect the tail of the buffer
as uninitialized.

The impact of this bug is as follows:

(1) InnoDB will write unnecessarily much redo log for XA PREPARE.
(2) InnoDB will write garbage bytes to the redo log and undo log pages.
(3) The garbage should be 'harmless', because on recovery, only the
actual payload of the XID will be used, based on the written length.

trx_rseg_write_wsrep_checkpoint(), trx_undo_write_xid(): Write only
the actually used length of xid->data to the data page, and
zero out the rest of the buffer by mlog_memset().
2019-08-12 19:37:24 +03:00
Marko Mäkelä
97bbac8ec6 Revert part of 05619f6989
This fixes the following test failures related to index cardinality:
main.join main.stat_tables main.partition main.stat_tables_innodb
innodb.innodb_bug57252
2019-08-12 19:37:24 +03:00
Alexander Barkov
e7525beac8 MDEV-20326 Add class DTCollation_numeric 2019-08-12 18:41:02 +04:00
Monty
05619f6989 Fixes based on warnings from gcc/clang and valgrind
- Initialize variables that could be used uninitialized
- Added extra end space to DbugStringItemTypeValue to get rid of warnings
  from c_ptr()
- Session_sysvars_tracker::update() accessed unitialized memory if called
  with NULL value.
- get_schema_stat_record() accessed unitialized memory if HA_KEY_LONG_HASH
  was used
- parse_vcol_defs() accessed random memory for tables without keys.
2019-08-12 10:48:38 +03:00
Sergei Petrunia
f6e386f00b Myrocks: Get the upstream's valgrind suppressions to work 2019-08-11 21:55:39 +03:00
Sergei Petrunia
d2a04ae55d MDEV-20315: MyRocks tests produce valgrind failures
- Include the valgrind suppressions from the FB upstream

- Use HAVE_Valgrind, not HAVE_Purify (like the rest of MariaDB code does)
  The call to DisownData() is now actually disabled under Valgrind
2019-08-11 13:17:30 +03:00
Alexander Barkov
d5f5cd2831 A cleanup: removing duplicate code: Item_func::val_decimal()
Using val_decimal_from_int() instead, which provides exactly
the same functionality.
2019-08-09 23:17:01 +04:00
Alexander Barkov
43882e764d MDEV-20303 SPACE(-1) returns a wrong data type 2019-08-09 14:18:13 +04:00
Alexander Barkov
2dac123515 A cleanup for MDEV-20273 Add class Item_sum_min_max - removing duplicate code
Reusing the MIN()/MAX() fix_length_and_dec() related code for window functions
- FIRST_VALUE()
- LAST_VALUE()
- NTH_VALUE()
- LEAD()
- LAG
2019-08-09 09:00:17 +04:00
Alexander Barkov
3e27677b59 Cleanup: moving the definition of Lex_cstring from vers_string.h to lex_string.h 2019-08-08 17:31:42 +04:00
Alexander Barkov
c3d67c17c1 MDEV-20292 REPEAT(x,-1) returns a wrong data type 2019-08-08 17:08:56 +04:00
Alexander Barkov
e98f3bcf53 Adding the override keyword into all classes in the Type_handler hierarchy, for consistency. 2019-08-08 15:44:31 +04:00
Alexander Barkov
3f7659b838 Fixing -Winconsistent-missing-override with CLANG 2019-08-08 14:55:39 +04:00
Alexander Barkov
e555df648c MDEV-20285 Wrong result on INSERT..SELECT when converting from SIGNED to UNSIGNED 2019-08-08 13:47:50 +04:00
Alexander Barkov
7fc86a73d8 MDEV-20272 PERCENTILE_DISC() crashes on a temporal type input 2019-08-07 22:44:54 +04:00
Alexander Barkov
d70dac2079 MDEV-20278 PERCENTILE_DISC() returns a wrong data type 2019-08-07 21:01:22 +04:00
Nikita Malyavin
e81db2baed Add const qualifiers to Field::cmp, Field::cmp_max and Field::cmp_binary 2019-08-07 20:59:22 +10:00
Alexander Barkov
e978efd96b MDEV-20273 Add class Item_sum_min_max 2019-08-07 14:13:44 +04:00
Alexander Barkov
a8def12e8a MDEV-20263 sql_mode=ORACLE: BLOB(65535) should not translate to LONGBLOB 2019-08-06 18:02:03 +04:00
Sergei Petrunia
f36c0189b1 MDEV-17544: No warning when trying to name a primary key constraint
Part#2: update .result files for affected MyRocks tests
2019-08-06 14:37:08 +03:00
Alexander Barkov
13f36fffea MDEV-19301 Assertion `!is_valid_datetime() || fraction_remainder(((item->decimals) < (6) ? (item->decimals) : (6))) == 0' failed in Datetime_truncation_not_needed::Datetime_truncation_not_needed 2019-08-06 10:53:55 +04:00
Alexander Barkov
4c4e379ba9 MDEV-20101 Assertion failure on select @@global.'m2'.replicate_ignore_table;
- Removing the wrong assert
- Re-enabling  multi_source.mdev-8874
2019-08-05 16:03:33 +04:00
Alexander Barkov
6b48bdf269 MDEV-18456 Assertion `item->maybe_null' failed in Type_handler_temporal_result::make_sort_key
Adding tests only.

This problem was earlier fixed in 10.4 by MDEV-17325 and backported to 10.3
with this commit:

  f4019f5b35
2019-08-05 15:25:31 +04:00
Alexander Barkov
c99f9766b1 MDEV-19166 Assertion `!is_zero_datetime()' failed in Timestamp_or_zero_datetime::tv 2019-08-05 14:41:17 +04:00
Alexey Botchkov
e244652831 MDEV-20246 Error compiling PAM plugin.
Ignore the setreuid() return here.
2019-08-03 01:02:32 +04:00
Varun Gupta
60a37783ae MDEV-20224: main.derived crashes with ASAN with error use-after-poison
Make sure that the references in the GROUP BY clause that need to be considered for
pushdown from having to where are of Item_field objects
2019-08-01 12:26:36 +05:30
Kentoku SHIBA
b428b09997
MDEV-20179 Server hangs on shutdown during installation of Spider (#1369)
Use LOCK_server_started, COND_server_started and mysqld_server_started for waiting starting the server
2019-08-01 08:59:53 +09:00
Daniel Bartholomew
798080f4b3
bump the VERSION 2019-07-31 10:00:26 -04:00
Daniel Bartholomew
e1e142e7fc
bump the VERSION 2019-07-31 09:58:59 -04:00
Anel Husakovic
fde7eb9ab2 Fix README 2019-07-31 02:51:20 -07:00
Alexey Botchkov
c6efbc543d MDEV-17544 No warning when trying to name a primary key constraint.
Warning added.
2019-07-30 21:57:48 +04:00
Elena Stepanova
9a78a283f4 List of unstable tests for 10.4.7 release (updated) 2019-07-30 14:28:46 +03:00
Noel Kuntze
46553c2508 Fix compiler warnings GCC8 2019-07-30 09:58:17 +03:00
Kentoku SHIBA
6dfa085fd5
MDEV-20179 Server hangs on shutdown during installation of Spider (#1368) 2019-07-30 06:16:48 +09:00