Commit graph

187408 commits

Author SHA1 Message Date
Teemu Ollakka
509d103810 MDEV-20561 Galera node shutdown fails in non-Primary (#1386)
Command COM_SHUTDOWN was rejected in non-Primary because
server_command_flags[COM_SHUTDOWN] had value CF_NO_COM_MULTI
instead of CF_SKIP_WSREP_CHECK.

As a fix removed assignment
server_command_flags[CF_NO_COM_MULTI]= CF_NO_COM_MULTI
which overwrote server_command_flags[COM_SHUTDOWN].
2019-09-15 11:24:57 +03:00
Jan Lindström
2a98d0b5ca Fix #2 for galera.MW-336 2019-09-14 12:15:01 +03:00
Jan Lindström
c946b5f38a Re-record galera.galera_pc_ignore_sb test result for 10.4. 2019-09-14 11:48:42 +03:00
Jan Lindström
e73dbec1c8 Disable wsrep.variables until fixed. 2019-09-14 11:48:41 +03:00
Jan Lindström
1f1f172002 Re-record galera.galera_events2 test case. 2019-09-14 11:48:41 +03:00
Jan Lindström
8711f5505a Fix galera.galera_sst_mysqldump_with_key test case for 10.4 2019-09-14 11:48:41 +03:00
Igor Babaev
ae2b88ff3f Adjusted test results after the change of a test case 2019-09-13 21:10:52 -07:00
Igor Babaev
0954bcb663 Post fix after the patch for MDEV-20576.
Adjusted test results.
2019-09-13 15:09:28 -07:00
Alexander Barkov
7ced6fa141 MDEV-20228 mysql_upgrade fails on every version upgrade: "ERROR 1267 (HY000) at line 7: Illegal mix of collations (utf8mb4_unicode_ci,COERCIBLE) and (utf8mb4_general_ci,COERCIBLE) for operation 'like'" 2019-09-13 20:03:43 +04:00
Marko Mäkelä
bfbf0f2251 MDEV-20525: Fix the -std=c90 builds 2019-09-13 18:11:32 +03:00
Marko Mäkelä
23657a2101 MDEV-13893/MDEV-12699: Enable encryption.innodb-redo-badkey
The test had been disabled in 10.2 due to frequent failures,
in 5ec9b88e11.
After the problems were addressed, we failed to re-enable the test
until now.
2019-09-13 17:07:58 +03:00
Marko Mäkelä
b214264aee MDEV-20525 rocksdb debug compilation fails on Windows due to unresolved my_assert variable
MYSQL_PLUGIN_IMPORT did not work correctly for the RocksDB helper library
rocksdb_aux_lib, because that library was not compiled with
-DMYSQL_DYNAMIC_PLUGIN.

Fix DBUG such that it does not depend on exported data, only on functions
(which do not need MYSQL_PLUGIN_IMPORT decoration)

Use a "getter" function _db_my_assert() instead of DLL-exported variable.

Also, reduce object code duplication by moving more of the DBUG_ASSERT
logic inside the _db_my_assert() function, and add unlikely() and
ATTRIBUTE_COLD hints to ensure that the 'assertion failed' code will
be separated from the main control flow logic. Thus, the compiler can
move the unlikely() code to the end of the compiled function, reachable
via a forward conditional branch, which the processor's branch predictor
could assume 'not taken'.
2019-09-13 15:28:53 +03:00
Anel Husakovic
3793da44cf Enable the auto parameter of the flag default-character-set
Closes #739

When invoking option `--default-character-set=auto` character set
from underlying OS settings should be detected for mysqldump.
2019-09-13 02:26:16 -07:00
Jan Lindström
3422c13ab7 Try to fix galera.MW-336 test case. 2019-09-13 11:53:07 +03:00
Alexander Barkov
c924e39fab MDEV-18153 Assertion 0' or Assertion btr_validate_index(index, 0)' failed in row_upd_sec_index_entry or error code 126: Index is corrupted upon UPDATE with TIME_ROUND_FRACTIONAL
Conversion to a temporal data type resulting into a lower precision
depends on TIME_ROUND_FRACTIONAL. Taking into account this dependency in:
- indexed generated virtual column expressions
- persistent virtual column expressions

A warning is now issued if conversion from the generation expression
to the column data type depends on TIME_ROUND_FRACTIONAL.

The warning will be changed to error in 10.5
2019-09-13 11:47:43 +04:00
Marko Mäkelä
368e64aaed MDEV-19826: Avoid unused variable in cmake -DPLUGIN_PERFSCHEMA=NO 2019-09-13 10:42:10 +03:00
Teemu Ollakka
40beeb1402 MDEV-20561 Galera node shutdown fails in non-Primary (#1386)
Command COM_SHUTDOWN was rejected in non-Primary because
server_command_flags[COM_SHUTDOWN] had value CF_NO_COM_MULTI
instead of CF_SKIP_WSREP_CHECK.

As a fix removed assignment
server_command_flags[CF_NO_COM_MULTI]= CF_NO_COM_MULTI
which overwrote server_command_flags[COM_SHUTDOWN].
2019-09-13 09:18:11 +03:00
Igor Babaev
deb9121fdf MDEV-20576 A new assertion added to check validity of calculated
selectivity values fails

After having set the assertion that checks validity of selectivity values
returned by the function table_cond_selectivity() a test case from
order_by.tesst failed. The failure occurred because range optimizer could
return as an estimate of the cardinality of the ranges built for an index
a number exceeding the total number of records in the table.

The second bug is more subtle. It may happen when there are several
indexes with same prefix defined on the first joined table t accessed by
a constant ref access. In this case the range optimizer estimates the
number of accessed records of t for each usable index and these
estimates can be different. Only the first of these estimates is taken
into account when the selectivity of the ref access is calculated.
However the optimizer later can choose a different index that provides
a different estimate. The function table_condition_selectivity() could use
this estimate to discount the selectivity of the ref access. This could
lead to an selectivity value returned by this function that was greater
that 1.
2019-09-12 23:01:11 -07:00
Igor Babaev
c11e26946f Fixed a typo in the patch for mdev-15777 2019-09-12 21:30:02 -07:00
Sergei Petrunia
d0b74bbacc MDEV-20440: Optimizer trace: print more details about semi-join optimization
Followup patch: fix typos
2019-09-12 19:07:56 +03:00
Vladislav Vaintroub
41290e91b7 Fix CMake warning in spider, in Windows ninja build 2019-09-12 17:06:06 +02:00
Marko Mäkelä
61bbf39915 Fix GCC -Woverloaded-virtual
Follow-up to 9d26f3dabb:
do not declare a never-overloaded function as virtual.
2019-09-12 17:26:39 +03:00
Marko Mäkelä
d28686ada6 Merge 10.4 into 10.5 2019-09-12 16:36:46 +03:00
Marko Mäkelä
9d26f3dabb Add C++11 override qualifiers to Field member functions 2019-09-12 16:35:32 +03:00
Marko Mäkelä
0b578882e7 MDEV-20477: Add missing override 2019-09-12 16:35:32 +03:00
Vladislav Vaintroub
99ecb33389 MDEV-20570 : Packaging fails "The specified timestamp server either could not be reached"
On  Windows, during packaging step, if signing fails, retry
signtool again without timestamp parameter.

Fixes sporadic (rare) failures on buildbot
2019-09-12 15:15:33 +02:00
Ian Gilfillan
3f1b569a1d MDEV-19887: Document --copy-s3-tables option on mysqldump man page
Closes PR #1385
2019-09-12 03:22:06 -07:00
Marko Mäkelä
60c04be659 Merge 10.3 into 10.4 2019-09-12 12:16:40 +03:00
Sachin
a43c367286 Fix sysvars_server_embedded.test
Rerecord the result file. It was caused by MDEV-20477(967c14c04)
2019-09-12 14:32:17 +05:30
Marko Mäkelä
ebddd8699c MDEV-20565 Assertion failure on CHANGE COLUMN...SYSTEM VERSIONING
innobase_rename_or_enlarge_column_try(): Relax a debug assertion.
The DATA_VERSIONED bits in dict_col_t::prtype do not affect the
storage format.
2019-09-12 11:42:48 +03:00
Alexey Botchkov
9554ef0678 MDEV-19670 json escaped unicode parse error.
Fixed 4-byte length characters handled incorrectly.
2019-09-12 11:12:55 +04:00
Sachin
a039b0888d Fix sysvars_server_notembedded
Rerecord sysvars_server_notembedded
2019-09-12 10:28:00 +05:30
Jan Lindström
9bacc9d0c1 MDEV-20505: Server crash on startup beacuse of bad wsrep configuration
Problem was that if user used bad wsrep configuration
we call unireg_abort and in wsrep case there is check
to wsrep_server_state that might not yet be initialized.
Fixed by checking that wsrep_server_state is initialized
before checking it's state.

Changes to be committed:
	modified:   sql/mysqld.cc
	modified:   sql/wsrep_server_state.h
2019-09-12 07:31:17 +03:00
Sergei Petrunia
be6beb73e9 MDEV-16560: [counter] rocksdb.ttl_secondary_read_filtering fail in buildbot
It is not reproducible, but the issue seems to be the same as with
MDEV-20490 and rocksdb.ttl_primary_read_filtering - a compaction caused
by DROP TABLE gets behind and compacts away the expired rows for the next
test. Fix this in the same way.
2019-09-11 23:05:12 +03:00
Sergei Petrunia
c8dc866fde MDEV-20371: Invalid reads at plan refinement stage: join->positions...
best_access_path() is called from two optimization phases:

1. Plan choice phase, in choose_plan(). Here, the join prefix being
   considered is in join->positions[]

2. Plan refinement stage, in fix_semijoin_strategies_for_picked_join_order
   Here, the join prefix is in join->best_positions[]

It used to access join->positions[] from stage #2. This didnt cause any
valgrind or asan failures (as join->positions[] has been written-to before)
but the effect was similar to that of reading the random data:
The join prefix we've picked (in join->best_positions) could have
nothing in common with the join prefix that was last to be considered
(in join->positions).
2019-09-11 17:06:50 +03:00
Marko Mäkelä
0fa5ad3acf Merge 10.2 into 10.3 2019-09-11 16:42:01 +03:00
Daniel Bartholomew
5c5452a5a0
bump the VERSION 2019-09-11 09:15:28 -04:00
Daniel Bartholomew
40ab433ecc
bump the VERSION 2019-09-11 09:13:47 -04:00
Daniel Bartholomew
863a951731
bump the VERSION 2019-09-11 09:11:58 -04:00
Marko Mäkelä
0f950e53f0 MDEV-20562 btr_cur_open_at_rnd_pos() fails to return error for corrupted page
In mysql-server/commit@f46329044f
the InnoDB function btr_cur_open_at_rnd_pos() was corrected so that
it would return a status that indicates whether the cursor was
successfully positioned. But this change was not correctly merged to
MariaDB in 2e814d4702.

btr_cur_open_at_rnd_pos(): In the code path that was introduced in
MDEV-8588, properly return failure status.

No deterministic test case was found for this failure.
It was caught after removing the function
page_copy_rec_list_end_to_created_page() in a development branch.
As a result, the fill factor of index trees would improve, and
supposedly, so would the probability of btr_cur_open_at_rnd_pos()
reaching the intentionally corrupted page in the test
innodb.leaf_page_corrupted_during_recovery.
The wrong return value would cause
btr_estimate_number_of_different_key_vals() to wrongly invoke
btr_rec_get_externally_stored_len() on a non-leaf page and
trigger an assertion failure at the start of that function.
2019-09-11 15:30:19 +03:00
Thirunarayanan Balathandayuthapani
df4dee4b84 MDEV-17939 Assertion `++loop_count < 2' failed in trx_undo_report_rename
- During trx_undo_report_rename(), InnoDB can fail to write undo log
for it if undo log doesn't fit in the undo page. In that case, InnoDB
adds one more undo log page and retry to write the rename undo log.
But the assert is wrong and it doesn't allow to fail even for one time.
2019-09-11 16:02:41 +05:30
Alexander Barkov
fdd00665c2 Revert "Part3: MDEV-18156 Assertion 0' failed or btr_validate_index(index, 0, false)' in row_upd_sec_index_entry or error code 126: Index is corrupted upon DELETE with PAD_CHAR_TO_FULL_LENGTH"
This reverts commit 5a9e2b77d4 in 10.5,
so it produces an error on "bad" generated columns.

Note, 10.2, 10.3, 10.4 produce only warnings, for backward compatibility.
2019-09-11 13:52:33 +04:00
Sachin
967c14c04e MDEV-20477 Merge binlog extended metadata support from the upstream
Cherry-pick the commits the mysql and some changes.
WL#4618 RBR: extended table metadata in the binary log

This patch extends Table Map Event. It appends some new fields for
more metadata. The new metadata includes:
- Signedness of Numberic Columns
- Character Set of Character Columns and Binary Columns
- Column Name
- String Value of SET Columns
- String Value of ENUM Columns
- Primary Key
- Character Set of SET Columns and ENUM Columns
- Geometry Type

Some of them are optional, the patch introduces a GLOBAL system
variable to control it. It is binlog_row_metadata.
- Scope:   GLOBAL
- Dynamic: Yes
- Type:    ENUM
- Values:  {NO_LOG, MINIMAL, FULL}
- Default: NO_LOG
  Only Signedness, character set and geometry type are logged if it is MINIMAL.
  Otherwise all of them are logged.

Also add a binlog_type_info() to field, So that we can have extract
relevant binlog info from field.
2019-09-11 15:09:35 +05:30
Alexander Barkov
0636645e7e Merge remote-tracking branch 'origin/10.4' into 10.5 2019-09-11 11:46:31 +04:00
Marko Mäkelä
c6a6830916 Merge 10.2 into 10.3 2019-09-11 10:32:24 +03:00
Alexander Barkov
f1616bacb7 Adding missing semicolons to sql_yacc_ora.yy (10.3), indentation cleanups. 2019-09-11 10:13:19 +04:00
Marko Mäkelä
f7fe51f126 Merge 10.1 into 10.2 2019-09-11 08:48:00 +03:00
Marko Mäkelä
d6f0e60a67 Merge 5.5 into 10.1
Null merge the MDEV-14383 fix; it affects 5.5 only.
2019-09-11 08:11:46 +03:00
Alexander Barkov
f1309fac33 Adding missing semicolons to sql_yacc.yy (10.3), indentation cleanups. 2019-09-11 05:12:37 +04:00
Alexander Barkov
48f8e3f3f4 Merge remote-tracking branch 'origin/10.2' into 10.3 2019-09-11 04:47:01 +04:00