Commit graph

177380 commits

Author SHA1 Message Date
Vicențiu Ciorbaru
844a575946 MDEV-12449: Debian Packaging AWS key management plugin
* Update debian control file to include AWS key management plugin.
* Update dependencies in control file to include uuid.
* Include enable_encryption.preset with the aws-key-management plugin.
2017-05-08 21:42:41 +03:00
Sachin Setiya
d049a560bc Mdev-12319 Fix galera test failures 2017-05-08 21:19:26 +05:30
Jan Lindström
8773f14677 Disable defragmentation support for now. 2017-05-08 16:14:04 +03:00
Sergei Golubchik
d738722eee Merge branch '10.0' into 10.1 2017-05-08 14:58:49 +02:00
Jan Lindström
f0eb8f153d MDEV-12628: innodb.innodb_bug14147491 sporadically fails in buildbot due to wrong error number
Actual error number returned from the query depends what point
corrupted page is accessed, is it accessed when we read
one of the pages for result set or is it accessed during
background page read.
2017-05-08 14:03:49 +03:00
Jan Lindström
1e227d8880 MDEV-12627: innodb.innodb_bug14147491 does not do proper cleanup
Removed creation of unused backup file and unused variables.
2017-05-08 14:03:49 +03:00
Sergei Golubchik
1c418df722 Merge branch '5.5' into 10.0 2017-05-08 12:12:48 +02:00
Sergei Golubchik
d53eb85997 MDEV-12580 Wrong query result in join when using an index (Version > "10.2.3")
JOIN_TAB::remove_redundant_bnl_scan_conds() removes select_cond
from a JOIN_TAB if join cache is enabled, and tab->cache_select->cond
is the equal to tab->select_cond.

But after 8d99166c69 the code to initialize join cache was moved
to happen much later than JOIN_TAB::remove_redundant_bnl_scan_conds(),
and that code might, under certain conditions, revert to *not* using
join cache (set_join_cache_denial()).

If JOIN_TAB::remove_redundant_bnl_scan_conds() removes the WHERE
condition from the JOIN_TAB and later set_join_cache_denial() disables
join cache, we end up with no WHERE condition at all.

Fix: move JOIN_TAB::remove_redundant_bnl_scan_conds() to happen
after all possible set_join_cache_denial() calls.
2017-05-08 11:08:18 +02:00
Sergei Golubchik
d6d7e169fb MDEV-12669 Circular foreign keys cause a loop and OOM upon LOCK TABLE
table_already_fk_prelocked() was looking for a table in the wrong
list (not the complete list of prelocked tables, but only in its tail,
starting from the current table - which is always empty for the last
added table), so for circular FKs it kept adding same tables to the list
indefinitely.
2017-05-08 11:08:18 +02:00
Jan Lindström
e1efeaa550 MDEV-12628: innodb.innodb_bug14147491 sporadically fails in buildbot due to wrong error number
Actual error number returned from the query depends what point
corrupted page is accessed, is it accessed when we read
one of the pages for result set or is it accessed during
background page read.
2017-05-08 12:04:08 +03:00
Jan Lindström
57e667357a MDEV-12627: innodb.innodb_bug14147491 does not do proper cleanup
Removed creation of unused backup file and unused variables.
2017-05-08 11:23:02 +03:00
Sergei Petrunia
2b29c52ea8 Merge branch '10.2' of github.com:MariaDB/server into bb-10.2-mariarocks 2017-05-07 23:42:59 +00:00
Sergei Petrunia
a0aacb3443 Continuation of e13e1eea96
Missed doing a few updates to rocksdb.use_direct_reads_writes test.
2017-05-07 23:40:51 +00:00
Marko Mäkelä
3f5a8cbe12 MDEV-12253 post-push fix: buf_read_page_low() can return DB_ERROR
The function buf_read_page_low() invokes fil_io(), which can return
DB_ERROR when the requested page is out of bounds (such as when
restoring a buffer pool dump). The callers should be handling that.
2017-05-06 23:10:52 +03:00
Vicențiu Ciorbaru
8f05c848c5 MDEV-10541: Faking the version string only works with MariaDB-Clients
Our RPL_VERSION_HACK prefix caused MySQL clients to always report 5.5
major and minor versions, even if a specific fake version is passed via
my.cnf or command line parameters. When a specific version is requested,
don't employ the RPL_VERSION_HACK prefix within the server handshake
packet.
2017-05-06 22:06:25 +03:00
Marko Mäkelä
c22ef4df26 MDEV-12253 post-merge fix: Use accessors for dict_table_t::file_unreadable 2017-05-06 15:54:31 +03:00
Marko Mäkelä
6c91be54b1 MDEV-11520 Properly retry posix_fallocate() on EINTR
We only want to retry posix_fallocate() on EINTR as long as the system
is not being shut down. We do not want to retry on any other (hard) error.

Thanks to Jocelyn Fournier for quickly noticing the mistake in my
previous commit.
2017-05-06 15:50:09 +03:00
Marko Mäkelä
14c6f00a9f Merge 10.1 into 10.2
Also, include fixes by Vladislav Vaintroub to the
aws_key_management plugin. The AWS C++ SDK specifically depends on
OPENSSL_LIBRARIES, not generic SSL_LIBRARIES (such as YaSSL).
2017-05-06 14:36:46 +03:00
Marko Mäkelä
baad0f3484 MDEV-11520 post-fix: Retry posix_fallocate() on EINTR in fil_ibd_create()
Earlier versions of MariaDB only use posix_fallocate() when extending
data files, not when initially creating the files,
2017-05-06 14:33:14 +03:00
=Ian Gilfillan
07cb4646c6 MDEV-12704: Document --add-drop-trigger option in mysqldump man page 2017-05-06 10:32:35 +04:00
Vladislav Vaintroub
c7d85db1c4 Fix AWS key managemennt compile error on Linux 2017-05-06 01:55:45 +02:00
Vladislav Vaintroub
13752faa4d Fix compilation of aws_key_management plugin 2017-05-05 16:37:00 +00:00
Monty
fc25437aff MDEV-10104 Table lock race condition with replication
Problem was two race condtion in Aria page cache:
- find_block() didn't inform free_block() that it had released requests
- free_block() didn't handle pinned blocks, which could happen if
  free_block() was called as part of flush. This is fixed by not freeing
  blocks that are pinned.  This is safe as when maria_close() is called
  when last thread is using a table, there can be no pinned blocks. For
  other flush calls it's safe to ignore pinned blocks.
2017-05-05 18:25:35 +03:00
Monty
e3521ab904 Fixed some bugs in fork_big.pl which caused some tests to die early
- Changed to 'strict'
- Fixed scope of variables
- Made timing smaller for of repair, check, flush and alter to get them to
  trigger earlier
2017-05-05 18:25:35 +03:00
Oleksandr Byelkin
cf31db184e Fix test to be windows file system tollerant. 2017-05-05 16:43:25 +02:00
Marko Mäkelä
bc5c1d9970 MDEV-12635 innodb.log_file_size fails when run with Valgrind
In MariaDB Server before 10.2, InnoDB will not be shut down properly
if startup fails. So, Valgrind failures are to be expected.
Disable the test under Valgrind. In 10.2, it should pass with Valgrind.
2017-05-05 14:04:18 +03:00
Oleksandr Byelkin
a3e0a952f7 MDEV-12485: fixed test 2017-05-05 12:09:07 +02:00
Oleksandr Byelkin
82811f7966 MDEV-12485 foreign key on delete cascade stale entries with query cache enabled
During merge of innodb code QC invalidation was removed from innodb part but not added to server part.
We decided to keep it in innodb to keep server/engine interface the same.
2017-05-05 10:13:42 +02:00
Marko Mäkelä
e946297d8f Remove an unused variable. 2017-05-05 11:06:46 +03:00
Marko Mäkelä
f9cc391863 Merge 10.1 into 10.2
This only merges MDEV-12253, adapting it to MDEV-12602 which is already
present in 10.2 but not yet in the 10.1 revision that is being merged.

TODO: Error handling in crash recovery needs to be improved.
If a page cannot be decrypted (or read), we should cleanly abort
the startup. If innodb_force_recovery is specified, we should
ignore the problematic page and apply redo log to other pages.
Currently, the test encryption.innodb-redo-badkey randomly fails
like this (the last messages are from cmake -DWITH_ASAN):

2017-05-05 10:19:40 140037071685504 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1635994
2017-05-05 10:19:40 140037071685504 [ERROR] InnoDB: Missing MLOG_FILE_NAME or MLOG_FILE_DELETE before MLOG_CHECKPOINT for tablespace 1
2017-05-05 10:19:40 140037071685504 [ERROR] InnoDB: Plugin initialization aborted at srv0start.cc[2201] with error Data structure corruption
2017-05-05 10:19:41 140037071685504 [Note] InnoDB: Starting shutdown...
i=================================================================
==5226==ERROR: AddressSanitizer: attempting free on address which was not malloc()-ed: 0x612000018588 in thread T0
    #0 0x736750 in operator delete(void*) (/mariadb/server/build/sql/mysqld+0x736750)
    #1 0x1e4833f in LatchCounter::~LatchCounter() /mariadb/server/storage/innobase/include/sync0types.h:599:4
    #2 0x1e480b8 in LatchMeta<LatchCounter>::~LatchMeta() /mariadb/server/storage/innobase/include/sync0types.h:786:17
    #3 0x1e35509 in sync_latch_meta_destroy() /mariadb/server/storage/innobase/sync/sync0debug.cc:1622:3
    #4 0x1e35314 in sync_check_close() /mariadb/server/storage/innobase/sync/sync0debug.cc:1839:2
    #5 0x1dfdc18 in innodb_shutdown() /mariadb/server/storage/innobase/srv/srv0start.cc:2888:2
    #6 0x197e5e6 in innobase_init(void*) /mariadb/server/storage/innobase/handler/ha_innodb.cc:4475:3
2017-05-05 10:38:53 +03:00
Alexander Barkov
db0917f68f MDEV-12696 Crash with LOAD XML and non-updatable VIEW column 2017-05-05 11:05:55 +04:00
Igor Babaev
15f9931f6d Fixed the bug mdev-12673.
This patch corrects the fix for the bug mdev-10693.
It is critical for the function get_best_combination() not to call
create_ref_for_key() for constant tables.
This bug could manifest itself only in multi-table subqueries where
one of the tables is accessed by a constant primary key.
2017-05-04 22:45:32 -07:00
Oleksandr Byelkin
96247be1a0 MDEV-10431: Please implement mysqldump --add-drop-trigger from MySQL 5.6
Port of mysql changeset by Georgi Kodinov <Georgi.Kodinov@Oracle.com>:

    Bug #34325 : --add-drop-trigger option for mysqldump

    Implemented the --add-drop-trigger option to prepend each
    CREATE TRIGGER in the dump file with DROP TRIGGER.
    The option is off by default. Added a test case.
2017-05-04 14:33:33 +02:00
Vladislav Vaintroub
ba824b66c1 MDEV-12597 Do not print warning about inconsistent slow-log variables
The new 10.2 has log-slow-admin-statements ON but log-slow-queries OFF,
thus  there is no reason for a warning about it(the change was "by design")
2017-05-04 09:10:55 +00:00
Igor Babaev
ce8ee7d90b Fixed the bug mdev-11990.
The usage of windows functions when all tables were optimized away
by min/max optimization were not supported. As result a result,
the queries that used window functions with min/max aggregation
over the whole table returned wrong result sets.
The patch fixed this problem.
2017-05-03 13:50:35 -07:00
Sergei Golubchik
a7c5fd6b4e restore dependencies, removed in f2dc04abea
otherwise make didn't know it needs to regenerate lex_hash.h
when gen_lex_hash (that is sql_yacc.h, that is sql_yacc.yy) changes.
2017-05-03 15:49:19 +02:00
Daniel Black
52463ccff7 MDEV-12469: rocksdb having large numberic storage errors on ppc64 (BE)
(from: http://buildbot.askmonty.org/buildbot/builders/p8-rhel6-bintar/builds/820/steps/test/logs/stdio)

Errors like the following indicate a potential endian storage issue:

rocksdb.rocksdb_range                    w1 [ fail ]
        Test ended at 2017-04-27 18:56:11

CURRENT_TEST: rocksdb.rocksdb_range
--- /home/buildbot/maria-slave/p8-rhel6-bintar/build/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range.result	2017-04-27 17:41:27.740050347 -0400
+++ /home/buildbot/maria-slave/p8-rhel6-bintar/build/storage/rocksdb/mysql-test/rocksdb/r/rocksdb_range.reject	2017-04-27 18:56:11.230050346 -0400
@@ -25,15 +25,15 @@
 select * from t2 force index (a) where a=0;
 pk	a	b
 0	0	0
-1	0	1
-2	0	2
-3	0	3
-4	0	4
-5	0	5
-6	0	6
-7	0	7
-8	0	8
-9	0	9
+16777216	0	1
+33554432	0	2
+50331648	0	3
+67108864	0	4
+83886080	0	5
+100663296	0	6
+117440512	0	7
+134217728	0	8
+150994944	0	9
 # The rest are for code coverage:
 explain
 select * from t2 force index (a) where a=2;
@@ -41,23 +41,23 @@
 1	SIMPLE	t2	ref	a	a	4	const	#
 select * from t2 force index (a) where a=2;
 pk	a	b
-20	2	20
-21	2	21
-22	2	22
-23	2	23
-24	2	24
-25	2	25
-26	2	26
-27	2	27
-28	2	28
-29	2	29
+335544320	2	20
+352321536	2	21
+369098752	2	22
+385875968	2	23
+402653184	2	24
+419430400	2	25
+436207616	2	26
+452984832	2	27
+469762048	2	28
+486539264	2	29
 explain
 select * from t2 force index (a) where a=3 and pk=33;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t2	const	a	a	8	const,const	#
 select * from t2 force index (a) where a=3 and pk=33;
 pk	a	b
-33	3	33
+553648128	3	33
 select * from t2 force index (a) where a=99 and pk=99;
 pk	a	b
 select * from t2 force index (a) where a=0 and pk=0;
...

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-05-03 10:27:24 +04:00
Daniel Bartholomew
14fca28ea4 bump the VERSION 2017-05-02 19:11:21 -04:00
Daniel Bartholomew
bc6426e44d bump the VERSION 2017-05-02 19:10:01 -04:00
Sergei Petrunia
b48f2a097d MDEV-12663 : rocksdb.compact_deletes times out and causes other tests to fail
Temporarily disable rocksdb.compact_deletes.
2017-05-02 13:55:08 +00:00
Sergei Petrunia
07d329a758 Continuation of the previous cset: rename sysvar's test, too.
use_direct_writes was renamed to use_direct_io_for_flush_and_compaction
2017-05-02 09:36:16 -04:00
Jan Lindström
63e4be267b Merge pull request #362 from grooverdan/10.1-MDEV-XXXX-mysqltest-replace-regex-vars
MDEV-12522: mysqltest replace regex +  sys_vars.sysvars_wsrep test to be version independent
2017-05-02 16:31:24 +03:00
Jan Lindström
2d457843d6 Merge pull request #375 from grooverdan/10.1-galera_new_cluster--help
MDEV-12646: wsrep_new_cluster: Add -h and --help options
2017-05-02 16:29:40 +03:00
Jan Lindström
6b8225ffe6 Merge pull request #371 from grooverdan/10.1-wsrep-this_not_null
Remove compile warning - "this" canot be null
2017-05-02 16:28:25 +03:00
Alexey Botchkov
a60bdcba64 MDEV-12462 SPATIAL index fails to work with CONTAINS.
Flags are wrongly set for MBR_CONTAINS/MBR_WITHIN functions.
2017-05-02 16:24:42 +04:00
Alexey Botchkov
3ea9d3e59e MDEV-12363 Assertion `0' failed in Type_handler_string_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*).
maybe_null wasn't properly set for Item_json_func_keys.
2017-05-02 15:47:43 +04:00
Alexey Botchkov
4a484e7a20 MDEV-12351 Assertion `cur_step->type & JSON_PATH_KEY' failed in
json_find_path.

        The ..[0] path can be treated wrong on second json_find_path
        call.
2017-05-02 15:16:01 +04:00
Alexey Botchkov
42ad4f2821 MDEV-12364 Server crashes in __memcpy_sse2_unaligned / String::copy on
JSON_SEARCH with variables.

        Wrong index for the tmp_paths array in
        Item_func_json_search::val_str.
2017-05-02 14:28:57 +04:00
Jan Lindström
acce1f37c2 MDEV-12624: encryption.innodb_encryption_tables fails in buildbot with timeout
This regression was caused by MDEV-12467 encryption.create_or_replace
hangs during DROP TABLE, where if table->is_stopping() (i.e. when
tablespace is dropped) background key rotation thread calls
fil_crypt_complete_rotate_space to release space and stop rotation.
However, that function does not decrease number of rotating
threads if table->is_stopping() is true.
2017-05-02 08:09:16 +03:00
Jacob Mathew
7afcee4cf6 MDEV-8954 unnecessary fetch of entire table
Merged fix into 10.2.
2017-05-01 16:04:47 -07:00