Commit graph

4796 commits

Author SHA1 Message Date
Jan Lindström
648fb98eb6 MDEV-6348: mariadb crash signal 11
Analysis: sync array output function, should make sure that all
used pointers are valid before using them.

Merge revision 4225 from lp:maria/5.5.
2014-07-08 18:51:34 +03:00
Jan Lindström
43c851435f MDEV-6288: Innodb causes server crash after disk full,
then can't ALTER TABLE any more.

Fix for InnoDB storage engine.
2014-07-04 06:31:48 +03:00
Jan Lindström
6bd2f900b2 MDEV-6288: Innodb causes server crash after disk full, then can't
ALTER TABLE any more.
2014-07-03 14:55:03 +03:00
Kristian Nielsen
439f75f849 Fix test failures in rpl.rpl_checksum and rpl.rpl_gtid_errorlog.
These tests use search_pattern_in_file.inc to search the error log for
expected output. However, search_pattern_in_file.inc by default searched only
the first 50000 bytes, so if the error log grew too big the tests would fail.

This patch extends search_pattern_in_file.inc with an option to specify how
much of the file to search, and whether to search from the start of the file
or from the end. Then the rpl.rpl_checksum and rpl.rpl_gtid_errorlog test
cases are fixed to search the last 50000 bytes of the error log, which will
work no matter how large prior tests have made it.
2014-06-30 13:59:21 +02:00
Kristian Nielsen
370318f894 MDEV-6386: Assertion `thd->transaction.stmt.is_empty() || thd->in_sub_stmt || (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' fails with parallel replication
The direct cause of the assertion was missing error handling in
record_gtid(). If ha_commit_trans() fails for the statement commit, there was
missing code to catch the error and do ha_rollback_trans() in this case; this
caused close_thread_tables() to assert.

Normally, this error case is not hit, but in this case it was triggered due to
another bug: When a transaction T1 fails during parallel replication, the code
would signal following transactions that they could start to run without
properly marking the error condition. This caused subsequent transactions to
incorrectly start replicating, only to get an error later during their own
commit step. This was particularly serious if the subsequent transactions were
DDL or MyISAM updates, which cannot be rolled back and would leave replication
in an inconsistent state.

Fixed by 1) in case of error, only signal following transactions to continue
once the error has been properly marked and those transactions will know not
to start; and 2) implement proper error handling in record_gtid() in the case
that statement commit fails.
2014-06-27 13:34:29 +02:00
Sergei Golubchik
b9ddeeff24 MDEV-6401 SET ROLE returning ERROR 1959 Invalid role specification for valid role
Use user's ip address when verifying privileges for SET ROLE (just like check_access() does)
2014-06-27 09:32:55 +02:00
Kristian Nielsen
86362129a2 MDEV-6120: When slave stops with error, error message should indicate the failing GTID
If replication breaks in GTID mode, it is not trivial to determine the GTID of
the failing event group. This is a problem, as such GTID is needed eg. to
explicitly set @@gtid_slave_pos to skip to after that event group, or to
compare errors on different servers, etc.

Fix by ensuring that relevant slave errors logged to the error log include the
GTID of the event group containing the problem event.
2014-06-25 15:17:03 +02:00
Kristian Nielsen
00467e136e MDEV-5799: Error messages written upon LOST EVENTS incident are corrupted
This is MySQL Bug#59123. The message string stored in an INCIDENT event was
not zero-terminated. This caused any following checksum bytes (if enabled on
the master) to be output to the error log as trailing garbage when the message
was printed to the error log.

Backport the patch from MySQL 5.6:

  revno: 2876.228.200
  revision-id: zhenxing.he@sun.com-20110111051323-w2xnzvcjn46x6h6u
  committer: He Zhenxing <zhenxing.he@sun.com>
  timestamp: Tue 2011-01-11 13:13:23 +0800
  message:
    BUG#59123 rpl_stm_binlog_max_cache_size fails sporadically with found warnings

Also add a test case.
2014-06-25 13:08:30 +02:00
Kristian Nielsen
312219cc63 MDEV-6364: Migrate a slave from MySQL 5.6 to MariaDB 10 break replication
MySQL 5.6 implemented WL#344, which is about a MASTER_DELAY option to CHANGE
MASTER. But as part of this worklog, the format of the realy-log.info file was
changed. The new format is not understood by earlier versions, and nor by
MariaDB 10.0, so changing server to those versions would cause the slave to
abort with an error due to reading incorrect data out of relay-log.info.

Fix this by backporting from the WL#344 patch just the code that understands
the new relay-log.info format. We still write out the old format, and none of
the MASTER_DELAY feature is backported with this commit.
2014-06-24 14:43:08 +02:00
unknown
643738eec8 MDEV-6180: Error 1590 is not autoskippable
The INCIDENT_EVENT always caused slave error and abort, without checking
--slave-skip-errors.

Now, if error 1590, ER_SLAVE_INCIDENT is included in the --slave-skip-errors
list, incident events will be ignored.

This is a merge of this MySQL 5.6 patch:

revision-id: frazer@mysql.com-20110314170916-ypgin17otj3ucx95
committer: Frazer Clement <frazer@mysql.com>
timestamp: Mon 2011-03-14 17:09:16 +0000
message:
  Bug#11799671 NOT POSSIBLE TO SKIP INCIDENT ERRORS
2014-06-18 11:03:08 +02:00
unknown
b1886e2bff merge of MDEV-6047 2014-06-09 13:47:20 +03:00
unknown
4cd676cbd9 MDEV-6047: Make exists_to_in optimization ON by default 2014-06-09 13:42:21 +03:00
Sergei Golubchik
e27c338634 5.5.38 merge 2014-06-06 00:07:27 +02:00
Sergei Golubchik
59cea2e1bf MDEV-6258 MariaDB 10.0 performance schema timestamps relative to epoch
don't use the interval timer when absolute time values are needed
2014-06-05 09:03:55 +02:00
Alexander Barkov
284479c085 Merge 5.3->5.5 2014-06-04 21:53:15 +04:00
Sergey Vojtovich
23a5b2eb6d MDEV-6103 - Adding/removing non-materialized virtual column triggers
table recreation

Relaxed InnoDB/XtraDB checks to allow online add/drop of
non-materialized virtual columns.
2014-06-03 16:57:29 +04:00
Sergei Golubchik
5d16592d44 mysql-5.5.38 merge 2014-06-03 09:55:08 +02:00
Sergei Golubchik
a1975dd2c1 5.2 merge 2014-06-02 17:38:58 +02:00
Sergei Golubchik
2f9bfd7b12 5.1 merge 2014-06-02 17:33:08 +02:00
Alexander Barkov
ce84ba2f81 MDEV-6287 Bad warning level when inserting a DATETIME value into a TIME column 2014-06-02 12:33:17 +04:00
Sergei Golubchik
edf1fbd25b MDEV-6153 Trivial Lintian errors in MariaDB sources: spelling errors and wrong executable bits 2014-05-13 11:53:30 +02:00
Sergei Golubchik
d3e2e1243b 5.5 merge 2014-05-09 12:35:11 +02:00
Jan Lindström
124428a9e2 MDEV-4791: Assertion range_end >= range_start fails in log0online.c
on select from I_S.INNODB_CHANGED_PAGES

Analysis: limit_lsn_range_from_condition() incorrectly parses
start_lsn and/or end_lsn conditions.

Fix from SergeyP. Added some test cases.
2014-05-09 11:03:39 +03:00
Sergei Golubchik
60dd52e3a3 fix innodb.row_lock test to work in 10.0 2014-05-08 11:09:00 +02:00
Sergei Golubchik
c8ee83ee8a after merge test case fixes 2014-05-08 10:25:16 +02:00
Sergei Golubchik
914a2b38bf merge of "BUG# 13975227: ONLINE OPTIMIZE TABLE FOR INNODB TABLES"
revno: 5820
committer: Nisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>
branch nick: mysql-5.6-13975225
timestamp: Mon 2014-02-17 15:12:16 +0530
message:
  BUG# 13975227: ONLINE OPTIMIZE TABLE FOR INNODB TABLES
2014-05-07 22:36:25 +02:00
Sergei Golubchik
5ffe939a6c perfschema 5.6.17 2014-05-07 16:12:16 +02:00
Sergei Golubchik
f55a0a6ad2 after perfschema-mergetree merge - update tests and results 2014-05-07 10:21:58 +02:00
Sergei Golubchik
374f0751a2 null-merge from perfschema-5.6 merge tree
(only new files and small style changes are accepted)
2014-05-07 10:21:41 +02:00
Sergei Golubchik
04bce7b569 5.6.17 2014-05-07 10:04:30 +02:00
Sergei Golubchik
06d874ba90 perfschema 5.6.10 initial commit.
5.6 files
2014-05-06 23:22:16 +02:00
Sergei Golubchik
d74414399d perfschema 5.6.10 initial commit.
10.0 files
2014-05-06 23:20:50 +02:00
Sergei Golubchik
4a84ee1c25 after InnoDB/XtraDB 5.6.16 merge 2014-05-06 13:57:56 +02:00
Sergei Golubchik
f6524e4963 MDEV-4925 Wrong result - count(distinct), Using index for group-by (scanning)
added the test case
2014-05-12 12:56:13 +02:00
Sergei Golubchik
e2e5d07b28 MDEV-6184 10.0.11 merge
InnoDB 5.6.16
2014-05-06 09:57:39 +02:00
Sergei Golubchik
2f7f2de5cb update test results 2014-05-05 15:41:29 +02:00
Nisha Gopalakrishnan
5e881cc435 BUG#17994219: CREATE TABLE .. SELECT PRODUCES INVALID STRUCTURE,
BREAKS RBR

Analysis:
--------
A table created using a query of the format:
CREATE TABLE t1 AS SELECT REPEAT('A',1000) DIV 1 AS a;
breaks the Row Based Replication.

The query above creates a table having a field of datatype
'bigint' with a display width of 3000 which is beyond the
maximum acceptable value of 255.

In the RBR mode, CREATE TABLE SELECT statement is
replicated as a combination of CREATE TABLE statement
equivalent to one the returned by SHOW CREATE TABLE and
row events for rows inserted. When this CREATE TABLE event
is executed on the slave, an error is reported:
Display width out of range for column 'a' (max = 255)

The following is the output of 'SHOW CREATE TABLE t1':
CREATE TABLE t1(`a` bigint(3000) DEFAULT NULL)
                  ENGINE=InnoDB DEFAULT CHARSET=latin1;

The problem is due to the combination of two facts:

1) The above CREATE TABLE SELECT statement uses the display
   width of the result of DIV operation as the display width
   of the column created without validating the width for out
   of bound condition.
2) The DIV operation incorrectly returns the length of its first
   argument as the display width of its result; thus allowing
   creation of a table with an incorrect display width of 3000
   for the field.

Fix:
----
This fix changes the DIV operation implementation to correctly
evaluate the display width of its result. We check if DIV's
results estimated width crosses maximum width for integer
value (21) and if yes set it to this maximum value.

This patch also fixes fixes maximum display width evaluation
for DIV function when its first argument is in UCS2.
2014-04-28 16:28:09 +05:30
Sergei Golubchik
2797f0c534 fix XtraDB version to tell the truth 2014-04-28 12:11:35 +02:00
Elena Stepanova
cfc49f2f99 Change in the result file merged from 5.1 did not take into account
MariaDB-specific result replacement
2014-04-23 01:16:41 +04:00
Alexander Barkov
fbfa004327 MDEV-6170 Incorrect ordering with utf8_bin and utf8mb4_bin collations 2014-04-25 17:10:25 +04:00
unknown
aefddfe3ff Fix sporadic test failures in rpl_mariadb_slave_capability.test.
The problem is the async binlog checkpointing; this could on rare
occasions occur too late, causing SHOW BINLOG EVENTS to show the
wrong events and cause .result file difference.
2014-04-24 09:41:31 +02:00
Alexander Barkov
4c56dfe95b MDEV-5851 MySQL WL#5303 Romansh locale for DAYNAME, MONTHNAME, DATE_FORMAT 2014-04-24 10:30:13 +04:00
unknown
010971a761 MDEV-6156: Parallel replication incorrectly caches charset between worker threads
Replication caches the character sets used in a query, to be able to quickly
reuse them for the next query in the common case of them not having changed.

In parallel replication, this caching needs to be per-worker-thread. The
code was not modified to handle this correctly, so the caching in one worker
could cause another worker to run a query using the wrong character set,
causing replication corruption.
2014-04-23 16:06:06 +02:00
Alexander Barkov
f9e5f237f0 MDEV-6027 RLIKE: "." no longer matching new line
Added a new system variable:
default_regex_flags='DOTALL,DUPNAMES,EXTENDED,EXTRA,MULTILINE,UNGREEDY'
2014-04-23 10:57:25 +04:00
Alexander Barkov
5fc5195fc5 An after-fix for
MDEV-6134 SUBSTRING_INDEX returns wrong result for 8bit character sets when delimiter is not found

Recording the forgotten test results.
2014-04-21 11:29:50 +04:00
Sujatha Sivakumar
1b74f2e3da Bug#17942050:KILL OF TRUNCATE TABLE WILL LEAD TO BINARY LOG
WRITTEN WHILE ROWS REMAINS

Problem:
========
When truncate table fails while using transactional based
engines even though the operation errors out we still
continue and log it to binlog. Because of this master has
data but the truncate will be written to binary log which
will cause inconsistency.

Analysis:
========
Truncate table can happen either through drop and create of
table or by deleting rows. In the second case the existing
code is written in such a way that even if an error occurs
the truncate statement will always be binlogged. Which is not
correct.

Binlogging of TRUNCATE TABLE statement should check whether
truncate is executed "transactionally or not". If the table
is transaction based we log the TRUNCATE TABLE only on
successful completion.

If table is non transactional there are possibilities that on
error we could have partial changes done hence in such cases
we do log in spite of errors as some of the lines might have
been removed, so the statement has to be sent to slave.

Fix:
===
Using table handler whether truncate table is being executed
in transaction based mode or not is identified and statement
is binlogged accordingly.

mysql-test/suite/binlog/r/binlog_truncate_kill.result:
  Added test case to test the fix for Bug#17942050.
mysql-test/suite/binlog/t/binlog_truncate_kill.test:
  Added test case to test the fix for Bug#17942050.
sql/sql_truncate.cc:
  Check if truncation is successful or not and retun appropriate
  return values so that binlogging can be done based on that.
sql/sql_truncate.h:
  Added a new enum.
2014-04-15 15:17:25 +05:30
unknown
65f80d4052 Merge MDEV-6067 from 5.2 to 5.3. 2014-04-11 09:38:55 +02:00
unknown
a1ae8f9ba8 MDEV-6067: Partitioned table DML sometimes binlogged without XID event
Add test case.
2014-04-11 09:03:53 +02:00
unknown
2480b60bb7 MDEV-5938: Exec_master_log_pos not updated at log rotate in parallel replication
The code did not correctly handle the update of position for Rotate events in the
binlog/relaylog when using parallel replication.
2014-04-09 14:42:46 +02:00
Serge Kozlov
7f8fb4509e BUG#18506556. Added sync slave with master for clean-up 2014-04-04 10:42:25 +04:00