Commit graph

170835 commits

Author SHA1 Message Date
Sergei Golubchik
50ef006633 Merge branch '10.0' into bb-10.0-serg 2015-08-05 09:45:36 +02:00
Sergei Golubchik
928edb5a91 Merge branch '5.5' into 10.0
5.5 without InnoDB/XtraDB changes
2015-08-05 09:45:17 +02:00
Sergei Golubchik
1610c4285a Merge branch 'bb-10.0-jan' into 10.0
5.5 with our InnoDB changes
2015-08-05 00:02:46 +02:00
Sergei Golubchik
fa51f70dc6 correct the NULL-pointer test 2015-08-04 23:42:44 +02:00
Sergei Golubchik
006ffca56e after-merge fixes 2015-08-04 23:40:25 +02:00
Kristian Nielsen
d6d54584ee Merge fix of embedded server build. 2015-08-04 15:38:03 +02:00
Kristian Nielsen
5ca061e65f Fix embedded server build 2015-08-04 15:35:04 +02:00
Kristian Nielsen
e8e2ef470c Merge MDEV-8302 into 10.0 2015-08-04 11:53:14 +02:00
Kristian Nielsen
9b9c5e890c MDEV-8302: Duplicate key with parallel replication
This bug is essentially another variant of MDEV-7458.

If a transaction conflict caused a deadlock kill of T2 in record_gtid()
during commit, the code would do a rollback _before_ running
rgi->unmark_start_commit(). This creates a race where following transactions
could start too early (before T2 has completed its transaction retry). This
in turn could lead to replication failure, if there was a conflict that
caused eg. duplicate key error or similar.

The fix is to remove these rollbacks (in Query_log_event::do_apply_event()
and Xid_log_event::do_apply_event(). They seem out-of-place; code in
log_event.cc generally does not roll back on error, this is handled higher
up.

In addition, because of the extreme difficulty of reproducing bugs like
MDEV-7458 and MDEV-8302, this patch adds some extra precations to try to
detect (in debug builds) or prevent (in release builds) similar bugs.
ha_rollback_trans() will now call unmark_start_commit() if needed (and
assert in debug build when a caller does rollback without unmark first).

We also add an extra check for thd->killed() so that we avoid doing
mark_start_commit() if we already have a pending deadlock kill.

And we add a missing unmark_start_commit() call in the error case, found by
the above assertion.
2015-08-04 11:40:19 +02:00
Mithun C Y
c20911dbe0 Merge branch 'mysql-5.1' into mysql-5.5 2015-08-04 12:28:56 +05:30
Mithun C Y
c28626d0af Bug #21096444: MYSQL IS TRYING TO PERFORM A CONSISTENT READ BUT THE READ VIEW IS NOT ASSIGNED!
Issue: A select for update subquery in having clause
resulted deadlock and its transaction was rolled back
by innodb. val_XXX interfaces do not handle errors and
it do not propogate errors to its caller. sub_select
did not see this error when it called
evaluate_join_record and later made a call to innodb.
As transaction is rolled back innodb asserted.

Fix: Now evaluate_join_record checks if there is any
error reported and then return the same to its caller.
2015-08-04 11:45:02 +05:30
Jan Lindström
d71b584069 Fix merge error. 2015-08-04 08:33:31 +03:00
Jan Lindström
9a5787db51 Merge commit '96badb16afcf' into 10.0
Conflicts:
	client/mysql_upgrade.c
	mysql-test/r/func_misc.result
	mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
	mysql-test/suite/innodb/r/innodb-fk.result
	mysql-test/t/subselect_sj_mat.test
	sql/item.cc
	sql/item_func.cc
	sql/log.cc
	sql/log_event.cc
	sql/rpl_utility.cc
	sql/slave.cc
	sql/sql_class.cc
	sql/sql_class.h
	sql/sql_select.cc
	storage/innobase/dict/dict0crea.c
	storage/innobase/dict/dict0dict.c
	storage/innobase/handler/ha_innodb.cc
	storage/xtradb/dict/dict0crea.c
	storage/xtradb/dict/dict0dict.c
	storage/xtradb/handler/ha_innodb.cc
	vio/viosslfactories.c
2015-08-03 23:09:43 +03:00
Sergei Petrunia
b74795b00c MDEV-7040: Crash in field_conv, memcpy_field_possible, part#2
The problem was with Materialized_cursor and temporary table it uses.
Temorary table's fields had Field::orig_table pointing to the tables
that were used in the query that produced data for the cursor.
When "FETCH INTO sp_var" statement is executed, those original tables
were already closed.  However, copying from Materialized_cursor's table
into SP variable may cause field_conv() to be invoked which calls
field->type() which may access field->orig_table (for certain field types).

Fixed by setting Materialized_cursor->table->field[i]->orig_table to point
to Materialized_cursor->table.  (this is how it is done for regular base
tables)
2015-08-03 21:02:27 +03:00
Sergei Petrunia
cb925491d4 Merge branch 'tmp' into 10.0 2015-08-03 20:47:43 +03:00
Sergei Petrunia
193faa57e5 MDEV-8554: Server crashes in base_list_iterator::next_fast ...
THD::>save_prep_leaf_list was set to true by multi-table update
statements with mergeable selects and never reset.

Make every statement reset it at start.
2015-08-03 20:46:00 +03:00
Sergei Petrunia
877de3af28 MDEV-8554: Server crashes in base_list_iterator::next_fast ...
THD::>save_prep_leaf_list was set to true by multi-table update
statements with mergeable selects and never reset.

Make every statement reset it at start.
2015-08-03 20:42:08 +03:00
Sergei Golubchik
0785b2d55d Merge 'https://github.com/Buggynours/MariaDB 10.0' into 10.0 2015-08-03 17:10:20 +02:00
Sergei Golubchik
58a73e70e2 remove generated CONNECT files 2015-08-03 16:48:19 +02:00
Sergei Golubchik
0a99293db3 Merge branch 'merge-perfschema-5.6' into 10.0
5.6.26
2015-08-03 16:34:59 +02:00
Sergei Golubchik
ab7b672983 Merge branch 'merge-innodb-5.6' into 10.0
5.6.26
2015-08-03 16:23:58 +02:00
Sergei Golubchik
4f479fb13f Merge branch 'merge-xtradb-5.6' into 10.0
XtraDB 5.6.25-73.1
2015-08-03 14:03:46 +02:00
Sergei Golubchik
167c540048 5.6.26 2015-08-03 13:05:40 +02:00
Sergei Golubchik
56544122c7 5.6.26 2015-08-03 13:03:47 +02:00
Sreeharsha Ramanavarapu
91a427be93 Merge branch 'mysql-5.1' into mysql-5.5 2015-08-03 10:10:41 +05:30
Sreeharsha Ramanavarapu
9372c9ebd2 Bug #20909518: HANDLE_FATAL_SIGNAL (SIG=11) IN
FIND_USED_PARTITIONS | SQL/OPT_RANGE.CC:3884

Post-push fix.
2015-08-03 10:08:46 +05:30
Sreeharsha Ramanavarapu
b2df544886 Merge branch 'mysql-5.1' into mysql-5.5 2015-08-03 08:17:27 +05:30
Sreeharsha Ramanavarapu
8006ad8053 Bug #20909518: HANDLE_FATAL_SIGNAL (SIG=11) IN
FIND_USED_PARTITIONS | SQL/OPT_RANGE.CC:3884

Issue:
-----
During partition pruning, first we identify the partition
in which row can reside and then identify the subpartition.
If we find a partition but not the subpartion then we hit
a debug assert. While finding the subpartition we check
the current thread's error status in part_val_int()
function after some operation. In this case the thread's
error status is already set to an error (multiple rows
returned) so the function returns no partition found and
results in incorrect behavior.

SOLUTION:
---------
Currently any error encountered in part_val_int is
considered a "partition not found" type error. Instead of
an assert, a check needs to be done and a valid error
returned.
2015-08-03 08:15:59 +05:30
Sergei Golubchik
772c3f3702 .gitattributes: pcre/testdata/greppatN4 -text 2015-08-01 17:48:41 +02:00
Sergei Golubchik
a0107d9c1d MDEV-8296 MSVS 2013 & WiX 3.9
removed unused directory
2015-08-01 17:48:41 +02:00
Sergei Golubchik
9cb8cff312 MDEV-8296 MSVS 2013 & WiX 3.9
Support for VS2013 and WiX 3.9

(patch by Andrey Kuznetsov)
2015-08-01 17:48:41 +02:00
Sergei Golubchik
17a4a39c15 Merge branch 'merge-xtradb-5.5' into 5.5
5.5.44-37.3
2015-08-01 15:08:33 +02:00
Sergei Golubchik
0b3eb4559b 5.6.25-73.1 2015-08-01 15:04:20 +02:00
Sergei Golubchik
1b0c81c917 5.5.44-37.3 2015-08-01 15:02:14 +02:00
Sergei Golubchik
6300f2f274 Merge tag 'mysql-5.5.45' into 5.5 2015-08-01 14:56:18 +02:00
Sergei Golubchik
96badb16af MDEV-7821 Server crashes in Item_func_group_concat::fix_fields on 2nd execution of PS
Correct fix for this bug.

The problem was that Item_func_group_concat() was calling
setup_order(), passing args as the second argument,
ref_pointer_array. While ref_pointer_array should have free
space at the end, as setup_order() can append elements to it.

In this particular case args[] elements were overwritten when
setup_order() was pushing new elements into ref_pointer_array.
2015-07-31 22:09:46 +02:00
Sergei Golubchik
409709ec7e compilation error on windows 2015-07-31 20:33:10 +02:00
Sergei Golubchik
79deefc4d7 MDEV-8340 Add "mysqlbinlog --binlog-row-event-max-size" support for MariaDB 5.5
Cherry-pick from 10.0:

  commit 126523d190
  Author: Sergei Golubchik <serg@mariadb.org>
  Date:   Mon Feb 23 20:53:41 2015 +0100

  MDEV-6703 Add "mysqlbinlog --binlog-row-event-max-size" support
2015-07-31 17:17:33 +02:00
Sergei Golubchik
4d5772c578 MDEV-7810 Wrong result on execution of a query as a PS (both 1st and further executions)
Alternative fix that doesn't cause view.test crash in --ps:
Remember when Item_ref was fixed right in the constructor
and did not have a full Item_ref::fix_fields() call. Later
in PS/SP, after Item_ref::cleanup, we use this knowledge
to avoid doing full fix_fields() for items that were never
supposed to be fix_field'ed.

Simplify the test case.
2015-07-31 17:17:33 +02:00
Sergei Golubchik
2721d69f79 MDEV-8352 Increase Diffie-Helman modulus to 2048-bits 2015-07-31 17:17:33 +02:00
Sergey Vojtovich
bfe2689cf6 MDEV-8379 - SUSE mariadb patches
Let mysql_upgrade return zero exit status when installation is up to date.
2015-07-31 14:29:04 +04:00
Jan Lindström
360e597c3c Make sure name buffer has string end marker on correct place. 2015-07-31 12:07:23 +03:00
Sergey Vojtovich
1ad294e064 MDEV-7821 - Server crashes in Item_func_group_concat::fix_fields on 2nd
execution of PS

GROUP_CONCAT() with ORDER BY column position may crash server on PS reexecution.

The problem was that arguments array of GROUP_CONCAT() was adjusted to point to
temporary elements (resolved ORDER BY fields) during first execution.

This patch expands rev. 08763096cb to restore original arguments array as well.
2015-07-31 13:05:10 +04:00
Jan Lindström
fa765a4525 MDEV-6697: Improve foreign keys warnings/errors
There is several different ways to incorrectly define
foreign key constraint. In many cases earlier MariaDB
versions the error messages produced by these cases
are not very clear and helpful. This patch improves
the warning messages produced by foreign key parsing.
2015-07-31 08:59:13 +03:00
Jan Lindström
e05cd97b8a MDEV-8524: Improve error messaging when there is duplicate key or foreign key names
Added better error message that will be printed when foreign key
constraint name in create table is not unique in database.
2015-07-31 08:59:13 +03:00
Olivier Bertrand
8ab46a5129 Merge branch 'ob-10.0' into 10.0 2015-07-30 13:27:56 +02:00
Olivier Bertrand
7962add6c4 Fix MDEV-8561 removing a wrong patch
modified:   storage/connect/tabodbc.cpp
2015-07-30 13:15:54 +02:00
Sergei Petrunia
c4456b99b3 MDEV-7971: Assertion `name != __null' failed in ACL_internal_schema_registry::lookup...
[Attempt #] Make the code that handles "Prepare" phase for multi-table
UPDATE statements handle non-merged semijoins. It can encounter them when
a prepared statement is executed for the second time.
2015-07-30 14:02:44 +03:00
Thirunarayanan Balathandayuthapani
18b2c77780 Merge branch 'mysql-5.1' into mysql-5.5 2015-07-29 18:27:39 +05:30
Thirunarayanan Balathandayuthapani
641ab6f368 Bug #20796566 ERROR: INSERT BUFFER INSERT FAIL CANNOT
INSERT INDEX RECORD

Problem:
=======

IBUF_BITMAP_FREE bit in ibuf bitmap array is used to indicate the free
space available in leaf page. IBUF_BITMAP_FREE bit indicates free
space more than actual existing free space for the leaf page.

Solution:
=========

Ibuf_bitmap_array is not updated for the secondary index leaf page when
insert operation is done by updating a delete marked existing
record in the index.

Reviewed-by: Jimmy Yang <jimmy.yang@oracle.com>
RB: 9544
2015-07-29 18:24:20 +05:30