Commit graph

1147 commits

Author SHA1 Message Date
Jan Lindström
a12326458d Add check to avoid NULL-pointer access if encryption information
is not available. Clarify system tablespace page 0 check.
2016-03-13 15:37:47 +02:00
Jan Lindström
f341d94423 MDEV-9549: Trying to decrypt a not encrypted page
Make sure that on decrypt we do not try to reference
NULL pointer and if page contains undefined
FIL_PAGE_FILE_FLUSH_LSN field on when page is not
the first page or page is not in system tablespace,
clear it.
2016-03-12 13:43:33 +02:00
Nirbhay Choubey
0251232f8c Fix to ensure updates in gtid_slave_state table do not get binlogged.
Also, renamed wsrep_skip_append_keys to wsrep_ignore_table.
Test case : galera.galera_as_slave_gtid.test
2016-02-24 23:32:37 -05:00
Nirbhay Choubey
cceec7858f Merge branch '10.0-galera' into bb-10.1-serg 2016-02-24 01:21:40 -05:00
Nirbhay Choubey
0d58323e26 Merge tag 'mariadb-10.0.24' into 10.0-galera 2016-02-23 20:53:29 -05:00
Sergei Golubchik
a5679af1b1 Merge branch '10.0' into 10.1 2016-02-23 21:35:05 +01:00
Nirbhay Choubey
2cdcde93c5 Merge sync point from previous commit to XtraDB. 2016-02-23 00:19:41 -05:00
Nirbhay Choubey
c1ea0570af refs codership/mysql-wsrep#184
Merge fix to XtraDB engine.
2016-02-22 16:51:45 -05:00
Nirbhay Choubey
2c56142b77 refs codership/mysql-wsrep#184
Merge fix to XtraDB engine.
2016-02-22 16:36:05 -05:00
Sergei Golubchik
a4b2714968 Merge branch 'bb-10.0-serg' into 10.0 2016-02-17 21:42:57 +01:00
Jan Lindström
36ca65b73b MDEV-9559: Server without encryption configs crashes if selecting from an implicitly encrypted table
There was two problems. Firstly, if page in ibuf is encrypted but
decrypt failed we should not allow InnoDB to start because
this means that system tablespace is encrypted and not usable.
Secondly, if page decrypt is detected we should return false
from buf_page_decrypt_after_read.
2016-02-17 12:32:07 +02:00
Sergei Golubchik
17a792a441 Merge branch 'merge-xtradb-5.6' into 10.0 2016-02-16 18:55:00 +01:00
Sergei Golubchik
d520d35380 Revert "MDEV-8696: Adding indexes on empty table is slow with large innodb_sort_buffer_size."
This reverts commit 13884cf206.

Fixed in 5.6 (merged in the next commit)
2016-02-16 12:53:24 +01:00
Sergei Golubchik
d76eba6a6b 5.6.28-76.1 2016-02-16 12:06:16 +01:00
Jan Lindström
a70b8961f4 MDEV-9424: Server crashes when slave works with partitioned tables copied from Windows to Linux
Add check to avoid NULL-pointer access and added warning if share->ib_table
is not what expected.
2016-02-15 18:38:15 +02:00
Jan Lindström
c0b6c27dbe MDEV-9548: Alter table (renaming and adding index) fails with "Incorrect key file for table"
MDEV-9469: 'Incorrect key file' on ALTER TABLE

InnoDB needs to rebuild table if column name is changed and
added index (or foreign key) is created based on this new
name in same alter table.
2016-02-15 14:48:15 +02:00
Sergei Golubchik
1fc6e297f2 XtraDB/InnoDB crash with autoinc, vcol and online alter
Fix the doubly questional fix for MySQL Bug#17250787:
* it detected autoinc index by looking for the first index
  that starts from autoinc column. never mind one column
  can be part of many indexes.
* it used autoinc_field->field_index to look up into internal
  innodb dictionary. But field_index accounts for virtual
  columns too, while innodb dictionary ignores them.

Find the index by its name, like elsewhere in ha_innobase.
2016-02-15 13:02:21 +01:00
Jan Lindström
33ac501b6a Use C++ linkage. 2016-02-04 13:54:57 +02:00
Jan Lindström
1d00d5c626 Fix function visibility as it is used on row0mysql.c in Windows. 2016-02-03 16:51:23 +02:00
Jan Lindström
73d23f8581 MDEV-9471: Server crashes or returns an error while trying to alter partitioning on a table moved from Windows to Linux
At alter table when server renames the table to temporal name,
old name uses normal partioned table naming rules. However,
if tables are created on Windows and then transfered to Linux
and lower-case-table-names=1 we should modify the old name
on rename to lower case to be able to find it from the
InnoDB dictionary.
2016-02-03 14:34:06 +02:00
Sergei Golubchik
02cc921a44 compiler warnings 2016-01-27 16:40:15 +01:00
Vladislav Vaintroub
c76ab94fa9 Fix invalid format warnings 2016-01-26 14:36:13 +01:00
Jan Lindström
111acb721f MDEV-9359: encryption.create_or_replace fails sporadically in buildbot: failing assertion: mutex->magic_n == MUTEX_MAGIC_N
Make sure that encryption threads mutex is initialized before starting
encryption threads.
2016-01-05 18:50:54 +02:00
Sergey Vojtovich
93b078cc85 MDEV-9128 - Compiling on IBM System Z fails
Provided IBM System Z have outdated compiler version, which supports gcc sync
builtins but not gcc atomic builtins. It also has weak memory model.

InnoDB attempted to verify if __sync_lock_test_and_set() is available by
checking IB_STRONG_MEMORY_MODEL. This macro has nothing to do with availability
of __sync_lock_test_and_set(), the right one is HAVE_ATOMIC_BUILTINS.
2015-12-29 14:24:46 +04:00
Sergey Vojtovich
30b2447f7d MDEV-9128 - Compiling on IBM System Z fails
Provided IBM System Z have outdated compiler version, which supports gcc sync
builtins but not gcc atomic builtins. It also has weak memory model.

InnoDB attempted to verify if __sync_lock_test_and_set() is available by
checking IB_STRONG_MEMORY_MODEL. This macro has nothing to do with availability
of __sync_lock_test_and_set(), the right one is HAVE_ATOMIC_BUILTINS.
2015-12-27 15:40:34 +04:00
Sergei Golubchik
7697bf0bd7 Merge branch 'github/10.0-galera' into 10.1
Note: some tests fail, just as they failed before the merge!
2015-12-22 10:32:33 +01:00
Sergei Golubchik
dfb58a3782 innodb/xtradb: init scrub mutex even in read-only mode
because it's locked for innodb part of SHOW STATUS,
which can happen in read-only mode too.
2015-12-21 21:25:01 +01:00
Sergei Golubchik
a2bcee626d Merge branch '10.0' into 10.1 2015-12-21 21:24:22 +01:00
Jan Lindström
080da551ea MDEV-8869: Potential lock_sys->mutex deadlock
In wsrep BF we have already took lock_sys and trx
mutex either on wsrep_abort_transaction() or
before wsrep_kill_victim(). In replication we
could own lock_sys mutex taken in
lock_deadlock_check_and_resolve().
2015-12-21 16:36:26 +02:00
Nirbhay Choubey
dad555a09c Merge tag 'mariadb-10.0.23' into 10.0-galera 2015-12-19 14:24:38 -05:00
Jan Lindström
428e09a789 Fix buildbot failure seen on p8-rhel71.
Currently we support file block sizes 512K-4K.
2015-12-18 11:22:58 +02:00
Jan Lindström
206039b8ba Merge pull request #135 from grooverdan/crc32_conditional
Do not build optimised power crc32 on bigendian
2015-12-18 10:11:02 +02:00
Daniel Black
e4e2d9dd3c Do not build optimised power crc32 on bigendian 2015-12-18 17:15:06 +11:00
Jan Lindström
69147040a6 MDEV-9236: Dramatically overallocation of InnoDB buffer pool leads to crash
Part I: Add diagnostics to page allocation if state is not correct
but do not assert if it is incorrect.
2015-12-17 19:45:42 +02:00
Jan Lindström
670bc0b352 Improve validation. If page type is not valid, try to print more
information from the page (note that page could be corrupt).
2015-12-17 09:24:54 +02:00
Jan Lindström
953d5680a3 Merge pull request #133 from grooverdan/power-crc32
MDEV-9288: Use POWER8 accelerated crc32
2015-12-16 09:34:24 +02:00
Daniel Black
60f09cd2b7 MDEV-9288: portablity for compling on non-power platforms
Also removed surperflous stdio include.
2015-12-16 11:12:05 +11:00
Jan Lindström
1ac6640210 MDEV-9129: Server is restarting in the loop after crash
Analysis: We have reserved ROW_MERGE_RESERVE_SIZE ( = 4) for
encryption key_version. When calculating is there more
space on sort buffer, this value needs to be substracted
from current available space.
2015-12-15 20:37:33 +02:00
Jan Lindström
98c9fbfa21 MDEV-8297: information_schema.innodb_sys_tablestats.modified_counter doesn't change on UPDATE
Update modified-counter also if update effects non-indexed columns.
2015-12-15 11:29:15 +02:00
Alexander Barkov
e9b4a041af MDEV-8721 AIX: Compile error xtradb:log0log.cc 2015-12-15 11:59:37 +04:00
Jan Lindström
b63bf7368b MDEV-8923: port innodb_buffer_pool_dump_pct from MySQL
Backport pull request #125 from grooverdan/MDEV-8923_innodb_buffer_pool_dump_pct to 10.0

WL#6504 InnoDB buffer pool dump/load enchantments

This patch consists of two parts:

    1. Dump only the hottest N% of the buffer pool(s)
    2. Prevent hogging the server duing BP load

From MySQL - commit b409342c43ce2edb68807100a77001367c7e6b8e

Add testcases for innodb_buffer_pool_dump_pct_basic.

Part of the code authored by Daniel Black
2015-12-15 09:35:22 +02:00
Daniel Axtens
2538c7cf89 Use POWER8 accelerated crc32
- Make accelerated checksum available to InnoDB and XtraDB.
 - Fall back to slice-by-eight if not available. The mode used is printed on startup.
 - Will only build on POWER systems at the moment until CMakeLists are modified
   to only add the crc32_power8/ files when building on POWER.

running MySQL-5.7 unittest/gunit/innodb/ut0crc32-t

Before:

1..2
Using software crc32 implementation, CPU is little-endian
ok 1
Using software crc32 implementation, CPU is little-endian
    normal CRC32: real    0.148006 sec
    normal CRC32: user    0.148000 sec
    normal CRC32: sys     0.000000 sec
big endian CRC32: real    0.144293 sec
big endian CRC32: user    0.144000 sec
big endian CRC32: sys     0.000000 sec
ok 2

After:

1..2
Using POWER8 crc32 implementation, CPU is little-endian
ok 1
Using POWER8 crc32 implementation, CPU is little-endian
    normal CRC32: real    0.008097 sec
    normal CRC32: user    0.008000 sec
    normal CRC32: sys     0.000000 sec
big endian CRC32: real    0.147043 sec
big endian CRC32: user    0.144000 sec
big endian CRC32: sys     0.000000 sec
ok 2

Author CRC32 ASM code: Anton Blanchard <anton@au.ibm.com>
ref: https://github.com/antonblanchard/crc32-vpmsum

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2015-12-15 15:11:17 +11:00
Jan Lindström
99404c3437 MDEV-9276: MySQL Bug #78754: FK definitions missing from SHOW CREATE TABLE in "innodb_read_only" mode 2015-12-14 22:10:37 +02:00
Nirbhay Choubey
18173ddfc4 MDEV-9162 : MariaDB Galera Cluster memory leak on async slave node
As galera node (slave) received query log events from an async
replication master, it partially wrote the updates made to replication
state table (mysql.gtid_slave_pos) to galera transaction writeset post
TOI. As a result, the transaction handle, thus created within galera,
was never freed/purged as the corresponding trx did not commit.
Thus, it kept piling up for every query log event and was only reclaimed
upon server shutdown when the transaction map object got destructed.
Fixed by making sure that updates in replication slave state table
are not written to galera transaction writeset and thus, not replicated
to other nodes.
2015-12-14 11:33:52 -05:00
Vladislav Vaintroub
0db50be893 Fix logic around retrying failed Windows async IO as synchronous IO . os_file_write/read macros were wrong (had wrong number of args), among other things 2015-12-14 17:06:08 +01:00
Vladislav Vaintroub
f0da062818 fix compile error on Windows 2015-12-14 17:02:42 +01:00
Jan Lindström
4437f51682 MDEV-8869: Potential lock_sys->mutex deadlock
In wsrep brute force (BF) we have already took lock_sys and trx
mutex either on wsrep_abort_transaction() or
before wsrep_kill_victim().
2015-12-14 10:10:09 +02:00
Sergei Golubchik
359ae59ac0 Merge branch 'merge/merge-xtradb-5.6' into 10.0 2015-12-13 16:23:02 +01:00
Sergei Golubchik
1e270d504d 5.6.27-76.0 2015-12-13 10:13:18 +01:00
Sergei Golubchik
1623995158 Merge branch '5.5' into 10.0 2015-12-13 00:10:40 +01:00