Commit graph

184674 commits

Author SHA1 Message Date
Marko Mäkelä
2465d3e00b Remove unnecessary __attribute__((unused)) 2019-01-01 19:23:52 +02:00
Michael Widenius
88cc78c9c4 Removed compiler warnings 2019-01-01 15:12:39 +02:00
Marko Mäkelä
17b73fb954 Use the accessor HA_CREATE_INFO::tmp_table() 2018-12-31 21:08:27 +02:00
Sergei Golubchik
67240858b2 Merge branch '10.1' into 10.2 2018-12-30 18:30:29 +01:00
Sergei Golubchik
aeefd26ecb Merge branch '10.0' into 10.1 2018-12-29 23:44:45 +01:00
Marko Mäkelä
cf9070a8f7 Merge 10.1 into 10.2 2018-12-29 23:12:25 +02:00
Marko Mäkelä
50c9469be8 MDEV-18105 Mariabackup fails to copy encrypted InnoDB system tablespace if LSN>4G
This is a regression caused by
commit 8c43f96388
that was part of the MDEV-12112 fixes.

page_is_corrupted(): Never interpret page_no=0 as encrypted.
2018-12-29 22:59:20 +02:00
Eugene Kosov
802ce9672f MDEV-18041 Database corruption after renaming a prefix-indexed column
This is a regression after MDEV-13671.

The bug is related to key part prefix lengths wich are stored in SYS_FIELDS.
Storage format is not obvious and was handled incorrectly which led to data
dictionary corruption.

SYS_FIELDS.POS actually contains prefix length too in case if any key part
has prefix length.

innobase_rename_column_try(): fixed prefixes handling

Tests for prefixed indexes added too.

Closes #1063
2018-12-29 22:57:05 +02:00
Sergey Vojtovich
3bdd93c10a tc_contention_warning_reported transition to std::atomic 2018-12-29 14:19:08 +04:00
Sergey Vojtovich
0f034e2e96 time_collector transition to std::atomic 2018-12-29 14:19:03 +04:00
Sergey Vojtovich
1e7df0e530 XID_cache_element::m_state transition to std::atomic 2018-12-29 14:09:33 +04:00
Sergey Vojtovich
9e37537c4e MDEV-17441 - InnoDB transition to C++11 atomics
Trivial fil_space_t::n_pending_ops transition. Since it is not
obvious which memory barriers are supposed to be issued, seq_cst
memory order was preserved.
2018-12-29 14:09:33 +04:00
Sergey Vojtovich
e2d96e8a16 MDEV-17441 - InnoDB transition to C++11 atomics
buf_pool_t::n_pend_unzip transition to Atomic_counter.
2018-12-29 14:09:32 +04:00
Sergey Vojtovich
66bca0dfa9 MDEV-17441 - InnoDB transition to C++11 atomics
zip_pad_info_t::pad transition to Atomic_counter.
2018-12-29 14:09:32 +04:00
Sergey Vojtovich
c6a00544ff MDEV-17441 - InnoDB transition to C++11 atomics
ibuf_t::n_merged_ops and ibuf_t::n_discarded_ops transition to
Atomic_counter.
2018-12-29 14:09:31 +04:00
Sergey Vojtovich
d2bdd78915 Master_info counters transition to Atomic_counter 2018-12-29 14:09:15 +04:00
Sergey Vojtovich
656a702ca9 MDEV-17441 - InnoDB transition to C++11 atomics
buf_block_t::n_pointers transition to Atomic_counter.
2018-12-29 14:02:15 +04:00
Sergey Vojtovich
54b3fd2581 MDEV-17441 - InnoDB transition to C++11 atomics
Trivial fil_space_t::n_pending_ios transition. Since it is not
obvious which memory barriers are supposed to be issued, seq_cst
memory order was preserved.
2018-12-29 14:02:15 +04:00
Sergey Vojtovich
fbe2a5b7d6 MDEV-17441 - InnoDB transition to C++11 atomics
Almost trivial ReadView::m_state transition. Since C++11 doesn't seem to
allow mixed (atomic and non-atomic) access to atomic variables, we have
to perform all accesses atomically.
2018-12-29 14:02:15 +04:00
Sergey Vojtovich
28d627392b MDEV-17441 - InnoDB transition to C++11 atomics
srv_sys_t::n_threads_active transition to Atomic_counter.
2018-12-29 14:02:15 +04:00
Sergey Vojtovich
adc30ecab5 MDEV-17441 - InnoDB transition to C++11 atomics
Almost trivial TTASFutexMutex::m_lock_word transition. Since C++11
doesn't seem to allow mixed (atomic and non-atomic) access to atomic
variables, we have to perform all accesses atomically.
2018-12-29 14:02:15 +04:00
Marko Mäkelä
0b73b96f9d Merge 10.1 into 10.2 2018-12-29 11:05:26 +02:00
Marko Mäkelä
68143c8905 MDEV-17470: Fix the test for --embedded 2018-12-29 10:57:26 +02:00
Vladislav Vaintroub
ed66acb291 Silence LeakSanitizer by default in mariabackup, so that phanthom "leaks"
would not hide more interesting information, like invalid memory accesses.


some "leaks" are expected
- partly this is due to weird options parsing, that runs twice, and
does not free memory after the first run.
- also we do not mind to exit()  whenever it makes sense, without full
cleanup.
2018-12-29 02:06:19 +01:00
Marko Mäkelä
33caaba5c8 Merge 10.1 into 10.2 2018-12-28 17:40:38 +02:00
Eugene Kosov
c5a5eaa9a9 MDEV-17470 Orphan temporary files after interrupted ALTER cause InnoDB: Operating system error number 17 and eventual fatal error 71
Orphan #sql* tables may remain after ALTER TABLE
was interrupted by timeout or KILL or client disconnect.

This is a regression caused by MDEV-16515.

Similar to temporary tables (MDEV-16647), we had better ignore the
KILL when dropping the original table in the final part of ALTER TABLE.

Closes #1020
2018-12-28 17:05:48 +02:00
Aleksey Midenkov
d46b3c99b4 MDEV-17697 Broken versioning info after instant drop column
Closes #986
2018-12-28 16:26:18 +02:00
Marko Mäkelä
cb2f36d3ea MDEV-14975: Cleanup check_all_privileges()
Remove an unused variable, and propagate the error to the caller
instead of calling exit().
2018-12-28 15:33:34 +02:00
Marko Mäkelä
6639fc3fda MDEV-18098 Crash after rollback of instant DROP COLUMN
dict_table_t::rollback_instant(): Restore dict_index_t::n_core_fields.
2018-12-28 15:23:42 +02:00
Marko Mäkelä
b74eb5a5fe row_drop_table_for_mysql(): Correct a parameter to innobase_format_name()
This fixes a regression that was introduced in MySQL 5.6.6
in an error handling code path, in the following change:

commit 024f363d6b5f09b20d1bba411af55be95c7398d3
Author: kevin.lewis@oracle.com <>
Date:   Fri Jun 15 09:01:42 2012 -0500

    Bug #14169459 INNODB; DROP TABLE DOES NOT DELETE THE IBD FILE
    FOR A TEMPORARY TABLE.
2018-12-28 12:28:16 +02:00
Sergey Vojtovich
dc90234bda MDEV-17441 - InnoDB transition to C++11 atomics
Added lf_hash_size() macro, so that callers don't need to use atomic
operations.
2018-12-28 13:24:11 +04:00
Sergey Vojtovich
830a7c67a4 MDEV-17441 - InnoDB transition to C++11 atomics
Simplified worker threads completion waiting, made it use std::atomic.
2018-12-28 13:24:11 +04:00
Sergey Vojtovich
db9b96ef02 MDEV-17441: Pointer indirection for buf_block_t::debug_latch
This is follow-up patch. Avoid calling constructor/destructor twice.
2018-12-28 13:24:10 +04:00
Marko Mäkelä
0e11d96a84 MDEV-17441: Pointer indirection for buf_block_t::debug_latch
This is a follow-up to commit 9581c4a8f5
which added a memcpy() call to rtr_copy_buf(), to copy
rw_lock_t debug_latch. This could emit a warning.

A cleaner approach is to make buf_block_t::debug_latch a pointer,
so that we can avoid copying it. An even cleaner approach would be to
redesign the InnoDB SPATIAL INDEX code so that the function
rtr_copy_buf() is not needed at all.
2018-12-28 09:56:46 +02:00
Marko Mäkelä
aa4e8dfdf9 fts_fetch_doc_from_rec(): Remove redundant variables 2018-12-28 09:45:35 +02:00
Vladislav Vaintroub
c4ec6bb69e "flush ssl" ASAN warnings with yassl
avoid calling SSL_get_verify_mode() and  SSL_get_verify_depth(),
since yassl implementation of the function accesses the acceptor context,
which can be freed on FLUSH SSL command.
2018-12-28 00:16:49 +01:00
Sergey Vojtovich
0ce7f6b0bf MDEV-17441 - InnoDB transition to C++11 atomics
purge_sys_t::m_enabled transition to std::atomic.

enabled_latched() doesn't make much sense: in this particular case it is
as fast as atomic load. The sole caller has to reload it's value anyway,
due to rw_lock_x_lock(&purge_sys.latch) issuing acquire memory barrier.

When purge_sys_t::close() is reached, m_enabled must be false, otherwise
we may free members, which are still in use by the coordinator thread.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
f401ba477c MDEV-17441 - InnoDB transition to C++11 atomics
purge_sys_t::m_paused transition to Atomic_counter.

paused_latched() doesn't make much sense: in this particular case it is
as fast as atomic load. The sole caller has to reload it's value anyway,
due to rw_lock_x_lock(&purge_sys.latch) issuing acquire memory barrier.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
5cc6b48f39 MDEV-17441 - InnoDB transition to C++11 atomics
onlineddl_rowlog_rows transition to Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
4ef481f5bc MDEV-17441 - InnoDB transition to C++11 atomics
os_aio_validate_count transition to Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
dbd40edfe6 MDEV-17441 - InnoDB transition to C++11 atomics
ibuf_t::n_merges transition to Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
66ec8adb77 MDEV-17441 - InnoDB transition to C++11 atomics
dict_table_t::n_foreign_key_checks_running transition to
Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
edde1f6e0d MDEV-17441 - InnoDB transition to C++11 atomics
trx_sys_t::rseg_history_len transition to Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
de32e66336 MDEV-17441 - InnoDB transition to C++11 atomics
fil_space_t::redo_skipped_count transition to Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
b1c3e6c2f2 MDEV-17441 - InnoDB transition to C++11 atomics
srv_conc_t.n_active and srv_conc_t.n_waiting transition to
Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
d93653bf96 MDEV-17441 - InnoDB transition to C++11 atomics
btr_defragment_compression_failures, btr_defragment_failures and
btr_defragment_count transition to Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
8c82ca171e MDEV-17441 - InnoDB transition to C++11 atomics
os_thread_count transition to Atomic_counter.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
e60dc209d4 MDEV-17441 - InnoDB transition to C++11 atomics
Almost trivial rw_lock_t::waiters transition. Since C++11 doesn't
seem to allow mixed (atomic and non-atomic) access to atomic variables,
we have to perform atomic initialisation.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
9581c4a8f5 MDEV-17441 - InnoDB transition to C++11 atomics
Almost trivial rw_lock_t::lock_word transition. Since C++11 doesn't
seem to allow mixed (atomic and non-atomic) access to atomic variables,
we have to perform atomic initialisation.

Also made previously broken code in gis0sea.cc even more broken. It is
unclear how it was supposed to work and what exactly it was supposed to
do.
2018-12-27 22:46:38 +04:00
Sergey Vojtovich
4404ee2901 MDEV-17441 - InnoDB transition to C++11 atomics
os_total_large_mem_allocated transition to Atomic_counter.
2018-12-27 22:46:38 +04:00