Commit graph

90882 commits

Author SHA1 Message Date
Jan Lindström
143f5d9172 MDEV-7061: Augment innochecksum to give insight of fragmentation
Merged 615dd07d90 from https://github.com/facebook/mysql-5.6/
authored by rongrong. Removed C++11 requirement by using
std::map instead of std::unordered_set.

Add analysis to leaf pages to estimate how fragmented an index is
and how much benefit we can get out of defragmentation.
2015-03-04 16:57:31 +02:00
Kristian Nielsen
2e4dc5a370 after-merge fixes 2015-03-04 14:12:48 +01:00
Kristian Nielsen
95d7208859 Merge MDEV-6589 and MDEV-6403 into 10.1.
Conflicts:
	sql/log.cc
	sql/rpl_rli.cc
	sql/sql_repl.cc
2015-03-04 13:49:37 +01:00
Kristian Nielsen
78c74dbe30 MDEV-6403: Temporary tables lost at STOP SLAVE in GTID mode if master has not rotated binlog since restart
The binlog contains specially marked format description events to mark
when a master restart happened (which could have caused temporary
tables to be silently dropped). Such events also cause slave to close
temporary tables.

However, there was a bug that if after this, slave re-connects to the
master in GTID mode, the master can send an old format description
event again. If temporary tables are closed when such event is seen
for the second time, it might drop temporary tables created after that
event, and cause replication failure.

With this patch, the restart flag of the format description event is
cleared by the master when it is sent to the slave in a subsequent
connection, to avoid the errorneous temp table close.
2015-03-04 13:36:29 +01:00
Kristian Nielsen
ad0d203f2e MDEV-6589: Incorrect relay log start position when restarting SQL thread after error in parallel replication
The problem occurs in parallel replication in GTID mode, when we are using
multiple replication domains. In this case, if the SQL thread stops, the
slave GTID position may refer to a different point in the relay log for each
domain.

The bug was that when the SQL thread was stopped and restarted (but the IO
thread was kept running), the SQL thread would resume applying the relay log
from the point of the most advanced replication domain, silently skipping all
earlier events within other domains. This caused replication corruption.

This patch solves the problem by storing, when the SQL thread stops with
multiple parallel replication domains active, the current GTID
position. Additionally, the current position in the relay logs is moved back
to a point known to be earlier than the current position of any replication
domain. Then when the SQL thread restarts from the earlier position, GTIDs
encountered are compared against the stored GTID position. Any GTID that was
already applied before the stop is skipped to avoid duplicate apply.

This patch should have no effect if multi-domain GTID parallel replication is
not used. Similarly, if both SQL and IO thread are stopped and restarted, the
patch has no effect, as in this case the existing relay logs are removed and
re-fetched from the master at the current global @@gtid_slave_pos.
2015-03-04 13:36:04 +01:00
Sergey Vojtovich
f4f37533a0 Replaced lf-hash element_size hack with initializer function. 2015-03-04 13:34:53 +04:00
Sergey Vojtovich
5c6aa4dea0 MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"
Replaced hash with lock-free hash.
2015-03-04 13:34:53 +04:00
Sergey Vojtovich
d9e3a9f20e MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"
Extended lf-hash implementation to accept user defined hash function.
2015-03-04 13:34:53 +04:00
Sergey Vojtovich
9c8165fdb4 MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"
Added initializer callback to lf-hash. Needed to initialize properly non-POD
types.
2015-03-04 13:34:53 +04:00
Sergey Vojtovich
f5bd1d0126 MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"
Simplified MDL_object_lock and MDL_scoped_lock dichotomy so that they can be
stored in LF_HASH. This was done by moving out their differences to a
MDL_lock_strategy structure which is referenced from the MDL_lock object by
pointer.
2015-03-04 13:34:53 +04:00
Sergey Vojtovich
f475a7f949 MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"
Replaced m_ref_usage, m_ref_release, m_is_destroyed and m_version with single
m_state, which is updated atomically. Needed to get rid of MDL_map::m_mutex.
2015-03-04 13:34:52 +04:00
Sergey Vojtovich
ecd3ff9f24 MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"
Removed MDL map partitions. Won't be needed when this MDEV is implemented.
2015-03-04 13:34:52 +04:00
Sergey Vojtovich
903160ef59 MDEV-6089 - MySQL WL#7305 "Improve MDL scalability by using lock-free hash"
Removed MDL objects cache. Won't be needed when this MDEV is implemented.
2015-03-04 13:34:52 +04:00
Alexander Barkov
87b0cc9912 MDEV-7286 TRIGGER: CREATE OR REPLACE, CREATE IF NOT EXISTS
Based on the patch by Sriram Patil, made under terms of GSoC 2014.
2015-03-04 09:52:01 +04:00
Alexander Barkov
a7ed8523e3 Adding a shared include file ctype-mb.ic and removing a number
of very similar copies of my_well_formed_len_xxx(), implemented
for big5, cp932, euckr, eucjpms, gb2312m gbk, sjis, ujis.
2015-03-04 09:16:43 +04:00
Sergei Golubchik
d8c1165c28 fix failing innodb.innodb-page_encryption_log_encryption again
adjust suppression rules after warning message format change
2015-03-03 11:46:44 +01:00
Alexander Barkov
b1b6101af2 A preparatory patch for MDEV-6566.
Adding a new virtual function MY_CHARSET_HANDLER::copy_abort().
Moving character set specific code into the correspoding implementations
(for simple, multi-byte and mbmaxlen>1 character sets).
2015-03-02 18:24:22 +04:00
Jan Lindström
7047bef1ef Use standard InnoDB error mechanism on compression and encryption
error messages.
2015-03-02 10:55:48 +02:00
Sergei Golubchik
1f1f977167 Fix test failing when file_key_management_plugin doesn't load
* remove useless suppressions from the test file, when a plugin doesn't
  load, the file isn't executed anyway
* add the suppression to mysql-test-run.pl instead
2015-03-01 16:53:31 +01:00
Sergei Golubchik
c3f80a2bff fix new innodb warnings to use the standard innodb warning syntax 2015-03-01 16:53:31 +01:00
Sergei Golubchik
c78f594bbc MDEV-6479 stack traces in 10.1
Take into account that PIE binaries are loaded at some offset, so
addresses cannot be directly resolved with addr2line. Find this
offset and subtract it before resolving an address.
2015-02-28 19:48:22 +01:00
Sergei Golubchik
7ba2916c55 MDEV-7000 Assertion `0' failed in Protocol::end_statement() on executing DDL under innodb_fake_changes=1
correct the if() condition to match the behavior of the old code
that this if() was supposed to replace
2015-02-28 19:48:22 +01:00
Sergei Golubchik
ba80708f66 MDEV-6960 Server crashes in check_alter_user on setting a default role via PS
There were two issues:

* set_var_default_role::user was overwritten with a new value,
  allocated in the thd->mem_root, which is reset between executions.
  That was causing the crash. Solved by introducing set_var_default_role::real_user

* when privilege tables were opened on EXECUTE, the reprepare_observer
  would abort the statement (as privilege tables are opened using
  the local TABLE_LIST that doesn't preserve metadata from PREPARE, so
  reprepare_observer thought they're changed). This issue also applied
  to SET PASSWORD. Solved by disabling reprepare_observer.
2015-02-28 19:48:22 +01:00
Sergei Golubchik
7951bb1656 cleanup: remove unused variables 2015-02-28 19:48:22 +01:00
Nirbhay Choubey
75a27eeaf7 MDEV-4987: Sort by domain_id when list of GTIDs are output
Added logic to sort gtid list based on domain_id before
populating them in string. Added a test case.
2015-02-27 23:33:22 -05:00
Nirbhay Choubey
34d86ac9ff MDEV-6594: Use separate domain_id for Galera transactions 2015-02-27 22:33:41 -05:00
Nirbhay Choubey
0f8cb3c399 MDEV-7615: Remove --galera-sst-mode option from mysqldump
Removed 'galera-sst-mode' option from mysqldump and added logic
in wsrep_sst_mysqldump script to retrieve gtid_binlog_state from
donor node and send it to the joiner node.
2015-02-27 22:30:38 -05:00
Nirbhay Choubey
4c191de323 MDEV-7560: wsrep* tests depend on the version of galera library
Added an include file to check galera library version.
2015-02-27 22:16:37 -05:00
Nirbhay Choubey
16c446235e Changes in wsrep_guess_ip()
* Changed loopback detection to be done via ifa->ifa_flags
* Removed unused function wsrep_guess_address()
2015-02-27 19:16:27 -05:00
Alexander Barkov
72d7b12b9c Reducing duplicate code and simplifying well formed string copying
by adding a new class String_copier.

This is a pre-requisite patch for MDEV-6566 and MDEV-6572,
to avoid adding more similar code.
2015-02-27 16:26:12 +04:00
Alexander Barkov
2d01907c1d MDEV-7281 EVENT: CREATE OR REPLACE 2015-02-27 13:34:18 +04:00
Vicențiu Ciorbaru
77806da0da Fix incorrect parameter passing to create_tmp_table in create_result_table
Create_tmp_table was called incorrectly called in
select_materialized_with_stats::create_result_table, having keep_row_order
passed for the do_not_open parameter and keep_row_order always set to false.
2015-02-26 23:31:35 +02:00
Jan Lindström
d7c6f1191d Try to fix test warning. 2015-02-26 19:41:21 +02:00
Jan Lindström
f37b857f80 Fix test case. 2015-02-26 17:19:51 +02:00
Jan Lindström
018f932024 test 2015-02-26 12:09:35 +02:00
Jan Lindström
2eae6848d9 MDEV-7572: InnoDB: Assertion failure in log_init_crypt_key if
file_key_management_plugin is used

Fixed error handling and added disabling InnoDB redo log encryption
if encryption key management plugin is not there.
2015-02-26 10:17:23 +02:00
Sergei Petrunia
702aee6492 MDEV-6323: ‘explain_node’ may be used uninitialized in this function
- Remove the compiler warning, add assert statements.
- make select_describe() not call mysql_explain_union() for
  views that were "merged for INSERT".
2015-02-26 00:02:10 +03:00
Jan Lindström
2330107ca8 MDEV-7572: InnoDB: Assertion failure in log_init_crypt_key if
file_key_management_plugin is used

Fixed error handling and added disabling InnoDB redo log encryption
if encryption key management plugin is not there.
2015-02-25 13:26:57 +02:00
Sergei Golubchik
da181fee4e disable feedback plugin again 2015-02-24 16:26:18 +01:00
Jan Lindström
b2862912af Try to stabilize test case. Problem was that test compares number
of encryption/compression pages and that will happen if and only
if dirty pages are written to the disk.
2015-02-22 08:46:22 +02:00
Jan Lindström
1cc7befc14 MDEV-7109: Add support for INFORMATION_SCHEMA.INNODB_SEMAPHORE_WAITS
MDEV-7399: Add support for INFORMATION_SCHEMA.INNODB_MUTEXES
    MDEV-7618: Improve semaphore instrumentation

    Introduced two new information schema tables to monitor mutex waits
    and semaphore waits. Added a new configuration variable
    innodb_intrument_semaphores to add thread_id, file name and
    line of current holder of mutex/rw_lock.
2015-02-21 21:45:16 +02:00
Jan Lindström
9152b83973 Merged from 10.0-FusionIO:
Added support for compression method snappy for page compression.
2015-02-19 17:42:18 +02:00
Jan Lindström
bab1c686a4 Push forgotten file change to fix compiler errors. 2015-02-19 12:41:10 +02:00
Jan Lindström
36c1982a19 MDEV-7604: wsrep plugin lists its plugin_maturity as Unknown
Changed wsrep plugin from mysql_plugin to maria_plugin to
set up plugin_maturity to Stable.
2015-02-18 15:23:37 +02:00
Jan Lindström
4040bf18cf MDEV-7593: Default encryption key does not work correctly for page
encrypted tables

Introduced a new innodb_default_page_encryption_key configuration
variable to allow user to set the default key identifier.
2015-02-18 08:32:01 +02:00
Sergei Golubchik
11536f99f1 MDEV-7305 Difficulties building cracklib_password_check
put cracklib_password_check into a separate package.
build it conditionally on Debian/Ubuntu
2015-02-17 23:49:56 +01:00
Sergei Golubchik
87eb82d4d5 cleanup: remove old debian/ubuntu names from debian/* files
namely, remove the code to support:
etch, lenny, hardy, intrepid, jaunty, karmic, maverick, natty
2015-02-17 23:49:55 +01:00
Sergei Golubchik
a0e93bceb7 innodb/xtradb: update nonnull attributes to match the new semantics 2015-02-17 23:49:02 +01:00
Sergei Petrunia
4da7aa55f6 Add a testcase for EXPLAIN FORMAT=JSON for ROR-union index_merge. 2015-02-17 18:43:22 +03:00
Sergei Golubchik
3e2849d2a0 update result files 2015-02-15 22:14:34 +01:00