Commit graph

172311 commits

Author SHA1 Message Date
Jan Lindström
a80753594a MDEV-8591: Database page corruption on disk or a failed space, Assertion failure in file buf0buf.cc line 2856 on querying a table using wrong default encryption key
Improved error messaging to show based on original page before
encryption is page maybe encrypted or just corrupted.
2015-08-14 15:49:56 +03:00
Alexander Barkov
7145ca477c Recording range_mrr_icp.result (forgotten in the patch for MDEV-8613) 2015-08-14 11:11:39 +04:00
Alexander Barkov
e99bc0d1e2 Removing unused String_copier::copy_fix.
Fixing misleading comments in String_copiers::well_formed_copy().
2015-08-14 09:23:03 +04:00
Alexander Barkov
0750b2df37 MDEV-8613 Full table scan for WHERE indexed_varchar_column <=> 'bad-character' 2015-08-13 16:41:02 +04:00
Alexander Barkov
60985e5375 MDEV-8610 "WHERE CONTAINS(indexed_geometry_column,1)" causes full table scan 2015-08-13 14:25:51 +04:00
Alexander Barkov
9d884fd3d3 MDEV-8599 "WHERE varchar_field LIKE temporal_const" does not use range optimizer 2015-08-12 17:28:45 +04:00
Alexander Barkov
6e091dc7ff Splitting a static function get_func_mm_tree() into virtual
methods in Item_bool_func descendants, which gives some advantages:
- Removing the "bool inv" parameter, as its now available through "this"
  for Item_func_between and Item_func_in, and is not needed for the other
  Item_func_xxx.
- Removing casts
- Making a step to data types plugings
2015-08-12 14:43:17 +04:00
Alexander Barkov
9a64262db2 Removing RANGE_OPT_PARA::cond
Its initialization in Item_func_xxx::get_mm_tree() is redundant:
the pointer to the current function is passed to get_mm_tree() anyway.
2015-08-12 10:52:12 +04:00
Alexander Barkov
86a3613d4e MDEV-8441 Bad SHOW CREATE TABLE output for a table with a virtual column 2015-08-10 11:46:41 +04:00
Nirbhay Choubey
840aefc6a3 MDEV-8590: Fix embedded build failure 2015-08-09 14:16:50 -04:00
Nirbhay Choubey
cd1a11ace3 MDEV-7205 : Galera cluster & sql_log_bin = off don't work
While sql_bin_log=1(0) is meant to control binary logging for the
current session so that the updates to do(not) get logged into the
binary log to be replicated to the async MariaDB slave. The same
should not affect galera replication.

That is, the updates should always get replicated to other galera
nodes regardless of sql_bin_log's value.

Fixed by making sure that the updates are written to binlog cache
irrespective of sql_bin_log.

Added test cases.
2015-08-08 15:04:15 -04:00
Jan Lindström
46ad86f6a3 MDEV-8582: innodb_force_primary_key option does not force PK or unique key
Analysis: Handler used table flag HA_REQUIRE_PRIMARY_KEY but a bug on
sql_table.cc function mysql_prepare_create_table internally marked
secondary key with NOT NULL colums as unique key and did not then
fail on requirement that table should have primary key or unique key.
2015-08-08 19:32:40 +03:00
Jan Lindström
3307eaab68 MDEV-8582: innodb_force_primary_key option does not force PK or unique key
Analysis: Handler table flag HA_REQUIRE_PRIMARY_KEY alone is not enough
to force primary or unique key, if table has at least one NOT NULL
column and secondary key for that column.

Fix: Add additional check that table really has primary key or
unique key for InnoDB terms.
2015-08-08 10:39:01 +03:00
Jan Lindström
05bcb088bf MDEV-8583: Empty lines in encryption logging
Removed extra line break.
2015-08-08 10:09:45 +03:00
Jan Lindström
18b0176a05 MDEV-8410: Changing file-key-management to example-key-management causes crash and no real error
MDEV-8409: Changing file-key-management-encryption-algorithm causes crash and no real info why

Analysis: Both bugs has two different error cases. Firstly, at startup
when server reads latest checkpoint but requested key_version,
key management plugin or encryption algorithm or method is not found
leading corrupted log entry. Secondly, similarly when reading system
tablespace if requested key_version, key management plugin or encryption
algorithm or method is not found leading buffer pool page corruption.

Fix: Firsly, when reading checkpoint at startup check if the log record
may be encrypted and if we find that it could be encrypted, print error
message and do not start server. Secondly, if page is buffer pool seems
corrupted but we find out that there is crypt_info, print additional
error message before asserting.
2015-08-08 09:56:07 +03:00
Sergei Petrunia
3025c42605 Make ANALYZE FORMAT=JSON show execution time for filesort element. 2015-08-07 17:41:35 +03:00
Kristian Nielsen
afd59b575a Merge branch 'mdev8302-3' into 10.1 2015-08-04 15:47:30 +02:00
Kristian Nielsen
5ca061e65f Fix embedded server build 2015-08-04 15:35:04 +02:00
Kristian Nielsen
dbd205797b Merge MDEV-8302 into 10.1 2015-08-04 12:39:22 +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
Sergey Vojtovich
35a019837e MDEV-5096 - Wrong error message on attempt to kill somebody else's query ID
Attempting to kill query owned by different user now returns better error:
"You are not owner of query N" instead of "You are not owner of thread N".
2015-07-24 20:59:50 +04:00
Sergei Golubchik
d517886482 Merge branch 'bb-10.1-serg' into 10.1 2015-07-23 15:48:26 +02:00
Sergei Golubchik
26f249f6db compilation failures on Windows 2015-07-23 10:55:24 +02:00
Sergei Golubchik
0ae8bae98f fix for 32-bit tests 2015-07-22 18:46:36 +02:00
Jan Lindström
53623d932a MDEV-8522: InnoDB: Assertion failure in file fil0fil.cc line 475
Analysis: In fil_crypt_space_needs_rotation we first make sure that
tablespace is found and then separately that it is normal tablespace.
Thus, tablespace could be dropped between these two functions calls.

Fix: If space is not found from fil_system return tablespace type
ULINT_UNDEFINED and naturally do not continue rotating space.
2015-07-22 08:42:52 +03:00
Jan Lindström
62b5a56191 MDEV-8501: encryption.create_or_replace fails in buildbot on P8 builders
Analysis: There is race between drop table and encryption threads that
could cause encryption thread to enter mutex that has been already
released.

Fix: When destroying crypt_data first enter the mutex and set crypt data
unavailable, then release the memory and clean up the data. This should
make the race more unprobable. Additionally, added big_test for
create_or_replace as it could fail testcase timeout
if you have slow I/O (tested that testcase passes with --mem).
2015-07-21 12:51:14 +03:00
Sergei Golubchik
3ff9634b43 MDEV-8508 mroonga fails embedded tests in 10.1
as a workaround until the bug is fixed
don't run mroonga tests in --embedded mode by default
2015-07-20 20:28:32 +02:00
Sergei Golubchik
3d4c69d224 compiler warning
WARN_DEPRECATED_NO_REPLACEMENT(NULL, ...) was causing a warning,
because it expanded into NULL->variables.errmsgs[...]
2015-07-20 19:47:46 +02:00
Sergei Golubchik
82c6b259a5 Merge https://github.com/Kentoku/MariaDB/tree/10.1 into 10.1 2015-07-20 19:07:59 +02:00
Sergei Golubchik
e35fd20910 Null-merge branch 'github/10.0-galera' into 10.1
because the actual merge was already done in
dced5146bd
as a patch
2015-07-20 18:14:31 +02:00
Nirbhay Choubey
6d3bd6588e MDEV-8492: Windows builds fail on current 10.1
In non-wsrep builds, wsrep_running_threads should be defined to (0).
2015-07-19 21:33:12 -04:00
Elena Stepanova
c57edf3b9a MDEV-8500 sys_vars.sysvars_innodb '32bit,xtradb' fails
The version in sysvars_innodb,32bit,xtradb.rdiff was not updated
2015-07-20 00:28:22 +03:00
Kristian Nielsen
7046788448 Fix build failures. 2015-07-19 10:31:24 +02:00
Kristian Nielsen
13dbb6fa9e Merge MDEV-8496 into 10.1 2015-07-19 09:30:36 +02:00
Kristian Nielsen
44c4b2304b MDEV-8496: gtid_ignore_duplicates treats gtid_seq_no as 32-bit
--gtid-ignore-duplicates was comparing sequence numbers as 32-bit, so
after 2**32 transactions things would start to fail.
2015-07-19 09:28:22 +02:00
Elena Stepanova
d258f5ff04 MDEV-8495 encryption.innodb_first_page fails sporadically in buildbot
The test did not wait until the server shuts down
2015-07-17 19:20:50 +03:00
Monty
0ad00c66d2 Fix for MySQL bug #77448 Inconsistent handling of RAND() in WHERE and HAVING
Problem was that for queries of type:

select rand() r, rand()  p, rand() = rand() from a having r = p

The optimizer thought that r = p was same as rand() = rand() and this would always be true.

The problem was that when testing if two expressions are equal, we didn't take into account no determinstic functions.

The fix is to not compare non deterministic functions as equal.
2015-07-16 10:36:58 +03:00
Monty
872a953b22 MDEV-8469 Add RESET MASTER TO x to allow specification of binlog file nr
Other things:
- Avoid calling init_and_set_log_file_name() when opening binary log.
- Remove newlines early when reading from index file.
- Ensure that reset_logs() will work even if thd is 0 (Can happen on startup)
- Added thd to sart_slave_threads() for better error handling.
2015-07-16 10:36:58 +03:00
Nirbhay Choubey
df0498fd76 Update sys_vars.sys_vars_wsrep result. 2015-07-14 21:38:17 -04:00
Nirbhay Choubey
ee9bdcf79a Binlog SE doesn't implement abort_transaction(), so skip warning. 2015-07-14 17:33:22 -04:00
Nirbhay Choubey
e204116734 Check supress_my_ok before sending Ok packet (logic lost during merge). 2015-07-14 17:21:35 -04:00
Nirbhay Choubey
0e2ce3b745 Allow binlog row image column marking even for wsrep binlog emulation. 2015-07-14 17:16:28 -04:00
Nirbhay Choubey
dd4d81ddfd Update read_pos after reading from the cache. 2015-07-14 16:58:38 -04:00
Nirbhay Choubey
dced5146bd Merge branch '10.0-galera' into 10.1 2015-07-14 16:05:29 -04:00
Alexander Barkov
75931feabe MDEV-8362 dash '-' is not recognized in charset armscii8 on select where query 2015-07-14 12:00:05 +04:00
Alexander Barkov
657f8a8d60 MDEV-8456 Dead code in Item_cond::fix_fields() and Item_func_between::fix_fields() 2015-07-13 13:16:14 +04:00
Nirbhay Choubey
6771b818a3 MDEV-8383 : "GRANT role TO user" does not replicate
Enable replication of GRANT/REVOKE ROLE commands across
galera nodes.
2015-07-10 19:06:42 -04:00
Monty
f195f93903 Cleanups, fixed warnings from valgrind, fixed failing tests (because on changes in WSREP initialization) 2015-07-10 12:49:05 +03:00
Monty
24881437b7 Fixed bug found by bar where we didn't properely check length of last argument for BETWEEN
This should not have caused any notable errors in most cases.

After fix, we are not using keys to solve MIN/MAX if the string used for comparision is longer thant the column-
2015-07-10 09:18:17 +03:00
Monty
9bb8b74e99 Merge branch '10.1' of github.com:MariaDB/server into 10.1
Conflicts:
	sql/item_subselect.cc

Fixed also typo in comment
2015-07-09 14:47:32 +03:00