Commit graph

17226 commits

Author SHA1 Message Date
Daniele Sciascia
6da41e17d8 MW-365 Do not load/dump innodb buffer pool with wsrep_recover 2017-08-11 14:16:51 +03:00
Daniele Sciascia
3ef3c467ad MW-365 Do not load/dump innodb buffer pool with wsrep_recover 2017-08-11 14:15:27 +03:00
sjaakola
0ddf32c840 refs: MW-322 * generating fake trx id for CTAS, requires trx_sys mutex protection to be safe for concurrent CTAS processors 2017-08-11 14:10:30 +03:00
Jan Lindström
391b1af0fb MDEV-13471: Test failure on innodb.log_file_size,4k
Problem was that 4k page size is not really supported in
Galera. For reference see:
	codership/galera#398

Page size 4k is problematic because WSREP XID info location
that was set to constant UNIV_PAGE_SIZE - 3500 and that is conflicting
with rseg undo slots location if there is lot of undo tablespaces.
Undo tablespace identifiers and page numbers require
at least 126*8=1024 bytes starting from offset 56. Therefore,
WSREP XID startig from offset 596 would overwrite several
space_id,page_no pairs starting from 72th undo log tablespace
space_id,page_no pair at offset 594.
This will cause InnoDB startup failure seen as
[ERROR] InnoDB: Unable to open undo tablespace './undo30579'.

Originally, the undo tablespace ID would always be between
0 and 127. Starting with MySQL 5.6.36 which introduced
Bug #25551311 BACKPORT BUG #23517560 REMOVE SPACE_ID RESTRICTION
FOR UNDO TABLESPACES (merged to MariaDB 10.0.31)
it is possible for an undo tablespace ID to be 0x7773. But in
this case, the page number should be 3, not 0x72650003.
This is just the first collision. The WSREP XID data would
overwrite subsequent slots.

trx0sys.h

trx0sys.cc
	Code formatting and add comments.
2017-08-10 13:09:27 +03:00
Jan Lindström
56b03e308f Merge tag 'mariadb-10.0.32' into 10.0-galera 2017-08-09 08:56:11 +03:00
Vicențiu Ciorbaru
a346a5613e Merge branch 'bb-10.0-vicentiu' into 10.0
Includes Percona XtraDB and TokuDB 5.6.36-82.1
2017-08-04 09:32:40 +02:00
Vicențiu Ciorbaru
d2a19082c0 Disable rpl_tokudb_row_img_* tests
We need to pull rpl config files from MySQL before these tests can be
run.
2017-08-04 04:27:33 +03:00
Elena Stepanova
d85d6c9c41 Remove extra trailing spaces from the result file 2017-08-04 02:11:10 +03:00
Vicențiu Ciorbaru
8b0edbfb5e Merge branch 'merge-tokudb-5.6' into 10.0 2017-08-04 00:56:16 +03:00
Vicențiu Ciorbaru
d5164569e4 Move tokudb_rpl to rpl-tokudb suite 2017-08-03 22:15:19 +03:00
Monty
e35670f498 MDEV-12972 Random and Frequent Segfault
Problem was a memory overflow in MRR

Reviewed by Sergei Petruna. Testcase by Elena
2017-08-03 19:28:05 +03:00
Vicențiu Ciorbaru
13e4bf674e Fix tokudb compilation post merge 2017-08-03 12:22:35 +03:00
Vicențiu Ciorbaru
40e213f210 Merge branch 'merge-tokudb-5.6' into 10.0 2017-08-03 12:11:31 +03:00
Vicențiu Ciorbaru
b1a2031ff9 5.6.36-82.1 2017-08-03 11:48:44 +03:00
Vicențiu Ciorbaru
b278c02e18 Merge branch 'merge-xtradb-5.6' into 10.0 2017-08-02 12:15:58 +03:00
Vicențiu Ciorbaru
04ae1207ed 5.6.36-82.1 2017-08-02 12:11:06 +03:00
Vicențiu Ciorbaru
60c9485a8e Merge connect/10.0 into 10.0
Squash all connect/10.0's commits into one and keep only
changes from storage/connect directory.
2017-08-01 11:39:10 +03:00
Elena Stepanova
31f4df4505 MDEV-12915 ST_Centroid does not return the same result than MySQL
Fix storage_engine test results
2017-08-01 09:52:59 +02:00
Vicențiu Ciorbaru
900e3218cf Bump innodb version post merge 2017-07-30 11:35:48 +03:00
Vicențiu Ciorbaru
226dd699df Merge remote-tracking branch 'merge/merge-innodb-5.6' into 10.0
Following merge from 5.6.36, this merge also rejects changes that
collided with the rejection of 6ca4f693c1ce472e2b1bf7392607c2d1124b4293.

We initially rejected 6ca4f693c1ce472e2b1bf7392607c2d1124b4293 because
it was introducing a new storage engine API method.
2017-07-29 20:51:29 +03:00
Vicențiu Ciorbaru
d36bd69790 5.6.37 2017-07-29 19:59:51 +03:00
Vicențiu Ciorbaru
786ad0a158 Merge remote-tracking branch 'origin/5.5' into 10.0 2017-07-25 00:41:54 +03:00
Sergei Golubchik
2ce3f95151 Connect engine is Gamma 2017-07-22 13:10:10 +02:00
Jan Lindström
92cbe388b6 MDEV-13325: InnoDB assert dict_sys->size > 0 during ALTER TABLE
Problem was that dict_sys->size tries to maintain used memory
occupied by the data dictionary table and index objects.
However at least on table objects table->heap size can increase
between when table object is inserted to dict_sys and when
it is removed from dict_sys causing inconsistency on amount
of memory added to and removed from dict_sys->size variable.

Removed unnecessary dict_sys:size variable as it is really
used only for status output.

Introduced dict_sys_get_size function to calculate memory
occupied by the data dictionary table and index objects
that is then used on show engine innodb output.

dict_table_add_to_cache(),
dict_table_rename_in_cache(),
dict_table_remove_from_cache_low(),
dict_index_remove_from_cache_low(),
	Remove size calculation.

srv_printf_innodb_monitor(): Use dict_sys_get_size function to
get dictionary memory allocated.

xtradb_internal_hash_tables_fill_table(): Use dict_sys_get_size
function to get dictionary memory allocated.
2017-07-21 16:05:20 +03:00
Sergei Golubchik
da2a838628 MDEV-12824 GCC 7 warning: this statement may fall through [-Wimplicit-fallthrough=] 2017-07-20 20:13:28 +02:00
Sergei Golubchik
59fca5806a Merge branch 'merge-xtradb-5.5' into 5.5 2017-07-18 19:50:11 +02:00
Sergei Golubchik
46977e0a01 5.5.55-38.8 2017-07-18 19:47:01 +02:00
Daniel Black
c9883b7591 ma_check/mi_check: maria_repair_parallel initialization for !quick
end_io_call uses uninitialized values from the new_data_cache

As such we the buffer 0 and check this before calling end_io_cache on it.

Thanks Sergey Vojtovich for the review and for this solution.

Found by Coverity (ref 972481).
2017-07-18 10:09:16 +04:00
Elena Stepanova
7d309b5f74 Add storage_engine/parts overlay for MyISAM 2017-07-18 01:38:13 +03:00
Sergei Golubchik
6efee22541 change flags as it was done in MyISAM
in ab785bfe5b
2017-07-15 08:44:14 +02:00
Daniel Black
ec4e39558e ma_recovery: unintentional order of operations
Coverity report this as:
CID 971840 (#1 of 1): Operands don't affect result (CONSTANT_EXPRESSION_RESULT)
result_independent_of_operands: 4 | (flags & 1) is always true regardless of the values of its operands. This occurs as the logical first operand of "?:".

The C order of precidence has | of higher precidence than ?:. The
intenting implies an | of the 3 terms.

Adjust to intented meaning.
2017-07-15 08:44:14 +02:00
Sergei Golubchik
89dc445a55 Merge branch '5.5' into 10.0 2017-07-06 23:47:33 +02:00
Daniel Black
89b81a9a24 ma_pagecache: release lock in pagecache_read
make_lock_and_pin didn't release the lock so we should.

Found by Coverity (id 972095).
2017-07-03 13:31:09 +04:00
Daniel Black
2328860379 ma_loghandler: translog_set_only_in_buffers failed to release lock
Release the lock for the error path.

Found by Coverity (id 972093).
2017-07-03 13:14:05 +04:00
Daniel Black
051f90a534 ma_loghandler: release file_header_lock on error
translog_stop_writing doesn't release a lock (though
does to a DBUG_ASSERT).

Better to just release the lock.

Found by Coverity id 972092
2017-07-03 13:05:35 +04:00
Daniel Black
cb870674d4 ha_archive::info remove hidden assignment
max_data_file_size is overwritten in next statement
so this assignment didn't ever get used.

Found by Coverity (ID 1409644)
2017-07-03 11:47:44 +04:00
Jacob Mathew
21689d1252 Run spider mtr suites in 10.0 only on demand. 2017-06-30 15:58:27 -07:00
Marko Mäkelä
5e4f4ec821 MDEV-12975 InnoDB redo log minimum size check uses detected file size instead of requested innodb_log_file_size
log_calc_max_ages(): Use the requested size in the check, instead of
the detected redo log size. The redo log will be resized at startup
if it differs from what has been requested.
2017-06-19 15:59:19 +03:00
Vladislav Vaintroub
74e4cf70d0 MDEV-13059 XtraDB hangs on Windows due to failing to release block->lock X-latch
in innodb_read_only mode.

The reason for the hang is that there was no notification received about
completed read io. File handles are bound to completion_port, and there
were no background "write" threads that would be waiting on completion_port,
only 2 "read" threads waiting on read_completion_port were active.

The fix is to use a single IO completion port for all IOs, if
innodb_read_only is set.
2017-06-12 18:43:23 +00:00
Marko Mäkelä
4325041df6 MDEV-13057 innodb_read_only=1 should avoid creating buf_flush_page_cleaner_thread
When the server is started in innodb_read_only mode, there cannot be
any writes to persistent InnoDB/XtraDB files. Just like the creation
of buf_flush_page_cleaner_thread is skipped in this case, also
the creation of the XtraDB-specific buf_flush_lru_manager_thread
should be skipped.
2017-06-12 11:08:06 +03:00
Marko Mäkelä
417434f12d MDEV-13039 innodb_fast_shutdown=0 may fail to purge all undo log
When a slow shutdown is performed soon after spawning some work for
background threads that can create or commit transactions, it is possible
that new transactions are started or committed after the purge has finished.
This is violating the specification of innodb_fast_shutdown=0, namely that
the purge must be completed. (None of the history of the recent transactions
would be purged.)

Also, it is possible that the purge threads would exit in slow shutdown
while there exist active transactions, such as recovered incomplete
transactions that are being rolled back. Thus, the slow shutdown could
fail to purge some undo log that becomes purgeable after the transaction
commit or rollback.

srv_undo_sources: A flag that indicates if undo log can be generated
or the persistent, whether by background threads or by user SQL.
Even when this flag is clear, active transactions that already exist
in the system may be committed or rolled back.

innodb_shutdown(): Renamed from innobase_shutdown_for_mysql().
Do not return an error code; the operation never fails.
Clear the srv_undo_sources flag, and also ensure that the background
DROP TABLE queue is empty.

srv_purge_should_exit(): Do not allow the purge to exit if
srv_undo_sources are active or the background DROP TABLE queue is not
empty, or in slow shutdown, if any active transactions exist
(and are being rolled back).

srv_purge_coordinator_thread(): Remove some previous workarounds
for this bug.

innobase_start_or_create_for_mysql(): Set buf_page_cleaner_is_active
and srv_dict_stats_thread_active directly. Set srv_undo_sources before
starting the purge subsystem, to prevent immediate shutdown of the purge.
Create dict_stats_thread and fts_optimize_thread immediately
after setting srv_undo_sources, so that shutdown can use this flag to
determine if these subsystems were started.

dict_stats_shutdown(): Shut down dict_stats_thread. Backported from 10.2.

srv_shutdown_table_bg_threads(): Remove (unused).
2017-06-09 16:20:42 +03:00
Marko Mäkelä
a9117c9008 Correct a merge error of MDEV-11626 2017-06-09 13:44:04 +03:00
Jan Lindström
d03abc71a4 MDEV-12609: Allow suppression of InnoDB log messages about reserving extents
Removed this output.
2017-06-08 10:34:10 +03:00
Marko Mäkelä
151daaf480 MDEV-12994 innodb_fast_shutdown=0 skips change buffer merge; fast shutdown does it
srv_master_thread(): Pass the correct parameter to srv_shutdown().
This bug was introduced in MDEV-12052, and it affects the MariaDB 10.1.24
release.
2017-06-05 15:16:15 +03:00
Sachin Setiya
92209ac6f6 Merge tag 'mariadb-10.0.31' into 10.0-galera
Signed-off-by: Sachin Setiya <sachin.setiya@mariadb.com>
2017-05-30 15:28:52 +05:30
Marko Mäkelä
c2ef0bb6ce Merge 5.5 into 10.0 2017-05-29 13:15:36 +03:00
Marko Mäkelä
2cb94aa1b7 MDEV-11626 innodb.innodb-change-buffer-recovery fails for xtradb
buf_page_get_gen(): Remove the error log messages about
page flushing and eviction when
innodb_change_buffering_debug=1 is in effect.
2017-05-29 13:07:23 +03:00
Marko Mäkelä
449a88e1c6 MDEV-12052 Shutdown crash presumably due to master thread activity
InnoDB shutdown assumes that once the server has entered
SRV_SHUTDOWN_FLUSH_PHASE, no change to persistent data is allowed.
It was possible for the master thread to wake up while shutdown
is executing in SRV_SHUTDOWN_FLUSH_PHASE or
even in SRV_SHUTDOWN_LAST_PHASE.

We do not yet know if further crashes at shutdown are possible.
Also, we do not know if all the observed crashes could be explained
by the race conditions that we are now fixing.

srv_shutdown_print_master_pending(): Remove a redundant ut_time() call.

srv_shutdown(): Renamed from srv_master_do_shutdown_tasks().

srv_master_thread(): Do not resume after shutdown has been initiated.
2017-05-26 15:08:35 +03:00
Sergei Golubchik
725e47bfb5 Merge branch '5.5' into 10.0 2017-05-20 00:59:40 +02:00
Sergei Golubchik
eb30230359 compilation warnings in Connect 2017-05-19 22:27:26 +02:00