Commit graph

178864 commits

Author SHA1 Message Date
Oleksandr Byelkin
6b5c0effe4 MDEV-13436 PREPARE doesn't work as expected & throws errors but MySQL is working fine
Now we allow derived in the from clause of subqueries so set
flag which prevent optimisation of subqueries during view
creation before derived processing so subquery will be
correctly printed in the view .frm.
2017-09-11 09:51:51 +02:00
Igor Babaev
3a9ee22ba9 Fixed the bug mdev-13734.
If the method SELECT_LEX::mark_const_derived() is called for a select
that is used in the specification of a materialized derived table / view D
then method should not set the flag fill_me for D on when
the flag JOIN::with_two_phase_optimization is set on for this select.
2017-09-10 10:08:52 -07:00
Igor Babaev
61074d0426 Fixed the bug mdev-13710.
This patch corrects the code of the patch for mdev-13369 that
introduced the splitting technique when using materialized
derived tables / views with GROUP BY. The second actual parameters
of the call of the method JOIN::reoptimize() in the function
JOIN::push_splitting_cond_into_derived() was calculated incorrectly.
This could cause different failures for queries using derived tables
or views with GROUP BY when their FROM lists contained empty or
single-row tables.
2017-09-09 20:35:05 -07:00
Vladislav Vaintroub
65c94238f8 Merge branch 'bb-10.0-wlad' into 10.0 2017-09-09 10:55:47 +00:00
Igor Babaev
5e4aa1a2f8 Fixed the bug mdev-13709.
Currently condition pushdown into materialized views / derived tables
is not implemented yet (see mdev-12387) and grouping views are
optimized early when subqueries are converted to semi-joins in
convert_join_subqueries_to_semijoins(). If a subquery that is converted
to a semi-join uses a grouping view this view is optimized in two phases.
For such a view V only the first phase of optimization is done after
the conversion of subqueries of the outer join into semi-joins.
At the same time the reference of the view V appears in the join
expression of the outer join. In fixed code there was an attempt to push
conditions into this view and to optimize it after this. This triggered
the second phase of the optimization of the view and it was done
prematurely. The second phase of the optimization for the materialized
view is supposed to be called after the splitting condition is pushed
into the view in the call of JOIN::improve_chosen_plan for the outer
join.

The fix blocks the attempt to push conditions into splittable views
if they have been already partly optimized and the following
optimization for them.

The test case of the patch shows that the code for mdev-13369
basically supported the splitting technique for materialized views /
derived tables.

The patch also replaces the name of the state JOIN::OPTIMIZATION_IN_STAGE_2
for JOIN::OPTIMIZATION_PHASE_1_DONE and fixes a bug in
TABLE_LIST::fetch_number_of_rows()
2017-09-08 11:27:02 -07:00
Vladislav Vaintroub
a46679dcf7 Build improvements and cleanups.
- the probably ultimate fix for dependencies on VS
- remove some GET_TARGET_PROPERTY(LOCATION ...), they are deprecated in
cmake 3.9
- simplify signing targets on Windows.
- remove INSTALL_DEBUG_TARGET, we do not mix binaries from different builds
in the same package
2017-09-08 18:22:15 +00:00
Marko Mäkelä
fb14761d66 Merge 10.2 into bb-10.2-ext 2017-09-08 15:44:34 +03:00
Marko Mäkelä
2425f2aedb MDEV-13626 Merge InnoDB test cases from MySQL 5.7 (part 1) 2017-09-08 15:38:02 +03:00
Marko Mäkelä
672590afaf Adjust the imported innodb.alter_crash test for MariaDB
trx_undo_assign_undo(): Restore the fault injection.
2017-09-08 15:34:42 +03:00
Marko Mäkelä
13d4dfd02c MDEV-13626 Merge InnoDB test cases from MySQL 5.7 (part 1)
Import the test innodb.alter_crash
2017-09-08 15:33:03 +03:00
Marko Mäkelä
95f602698a Make a test more robust
The redo log is divided into 512-byte blocks. Sometimes, some of
the strings end up at a block boundary and will not be found.
Look for only one match.
2017-09-08 09:38:42 +03:00
Vladislav Vaintroub
18e17f134c Windows : Fix MTR's misuse of servers --console parameter 2017-09-08 08:33:41 +02:00
Vladislav Vaintroub
d471469bd2 MDEV-13466 Implement --export option for MariaDB Backup
full server recovery is performed .
We start "mysqld" with  --bootstrap
and pass bootstrap script consisting of several FLUSH TABLES FOR export/
UNLOCK TABLES
2017-09-07 22:54:06 +00:00
Marko Mäkelä
a82ed92a6a Merge 10.2 into bb-10.2-ext 2017-09-07 12:23:58 +03:00
Marko Mäkelä
d26fb96a9f Merge 10.1 into 10.2 2017-09-07 12:12:31 +03:00
Marko Mäkelä
112d721a74 Merge 10.0 into 10.1 2017-09-07 12:08:34 +03:00
Marko Mäkelä
d861822c4f MDEV-13253 After rebuilding redo logs, InnoDB can leak data from redo log buffer
recv_reset_logs(): Initialize the redo log buffer, so that no data
from the old redo log can be written to the new redo log.

This bug has very little impact before MariaDB 10.2. The
innodb_log_encrypt option that was introduced in MariaDB 10.1
increases the impact. If the redo log used to be encrypted, and
it is being resized and encryption disabled, then previously
encrypted data could end up being written to the new redo log
in clear text. This resulted in encryption.innodb_encrypt_log
test failures in MariaDB 10.2.
2017-09-07 12:01:07 +03:00
Marko Mäkelä
ee844f6c34 Make the SEARCH_ABORT logic actually work
The SEARCH_ABORT logic was not working as intended
(tests were not being aborted).
2017-09-07 11:59:26 +03:00
Marko Mäkelä
3ec8268b4a Follow-up to MDEV-13103: Do not add __attribute__((nonnull))
In XtraDB, buf_block_get_frame() can return NULL, and this value
can be passed to buf_page_print(). Do not declare the parameter
as nonnull.
2017-09-07 11:58:21 +03:00
Marko Mäkelä
3c45aa5895 Fix a typo to silence -Wimplicit-fallthrough 2017-09-06 19:32:56 +03:00
Marko Mäkelä
70db1e3b8a Merge 10.1 into 10.2 2017-09-06 19:28:51 +03:00
Marko Mäkelä
c59a52b7ba Fix nondeterministic failure of innodb.table_flags
The files ibtmp1 and ib_buffer_pool are sometimes created, sometimes not.
Remove them if they exist.
2017-09-06 19:10:12 +03:00
Marko Mäkelä
b429e8cada Mariabackup: Detach the threads at exit 2017-09-06 19:10:12 +03:00
Oleksandr Byelkin
2b387855df MDEV-13523: Group By in a View, called within a Stored Routine causes Error Code 1356 when a non-root user runs the routine for a second time
it is actually test suite for second code chunk fix in MDEV-13439
2017-09-06 17:20:31 +02:00
Marko Mäkelä
7008d46164 Follow-up to MDEV-13227: Shorten the test
The bug only affects ROW_FORMAT=DYNAMIC tables.
It is reproducible already with 2 records in the table.

Keep testing with ROW_FORMAT=REDUNDANT just in case.
2017-09-06 16:13:20 +03:00
Marko Mäkelä
a793b7fd8b Follow-up to MDEV-13227: Do not run unnecessary test combinations
The bug only affected innodb_page_size=64k. There is no point
running the test with smaller page sizes.
2017-09-06 15:57:42 +03:00
Marko Mäkelä
cd694d76ce Merge 10.0 into 10.1 2017-09-06 15:32:56 +03:00
Marko Mäkelä
6b45355e6b MDEV-13103 Assertion `flags & BUF_PAGE_PRINT_NO_CRASH' failed in buf_page_print
buf_page_print(): Remove the parameter 'flags',
and when a server abort is intended, perform that in the caller.

In this way, page corruption reports due to different reasons
can be distinguished better.

This is non-functional code refactoring that does not fix any
page corruption issues. The change is only made to avoid falsely
grouping together unrelated causes of page corruption.
2017-09-06 14:01:15 +03:00
Varun Gupta
80c90887fe MDEV-13585: RocksDB plugin fails to build on macOS because of unknown type timer_t etc.
Rdb_io_watchdog can not be built on  OS X. Disable it.
2017-09-05 23:00:59 +05:30
Sergei Petrunia
4ae200a97a Update test results for rocksdb.bulk_load_rev_cf_and_data 2017-09-05 18:28:05 +03:00
Olivier Bertrand
7e65bdba7b - Update version number
modified:   storage/connect/ha_connect.cc

- Regard columns with binary charset as string (was binary)
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/tabmysql.cpp
  modified:   storage/connect/tabutil.cpp

- Support length 0 for CHAR and VARCHAR
  modified:   storage/connect/ha_connect.cc
  modified:   storage/connect/reldef.cpp
  modified:   storage/connect/value.cpp

- Add ACCEPT option for void columns in discovery
  modified:   storage/connect/tabjson.cpp

- Update some tests because of above change
  modified:   storage/connect/mysql-test/connect/r/json_java_2.result
  modified:   storage/connect/mysql-test/connect/r/json_java_3.result
  modified:   storage/connect/mysql-test/connect/r/json_mongo_c.result
  modified:   storage/connect/mysql-test/connect/r/mongo_c.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_2.result
  modified:   storage/connect/mysql-test/connect/r/mongo_java_3.result
  modified:   storage/connect/mysql-test/connect/r/odbc_oracle.result
  modified:   storage/connect/mysql-test/connect/r/updelx.result
  modified:   storage/connect/mysql-test/connect/t/mongo_test.inc
2017-09-04 22:32:02 +02:00
andrelkin
8592ff9e8d MDEV-12731
Was reported as 'rpl.rpl_gtid_stop_start fails with Valgrind in buildbot and outside'.
The 'Conditional jump or move depends on uninitialized value' valgrind complaint is valid
and means THD::m_current_stage_key that is not initialized indeed by constructor.

Fixed with its initialization added to the initializer list of
THD::THD.  Double checked with mysql to have found a similar fixes for
the very same issue which was discovered after P_S merge to Maria
(60589aeee where the member is introduced) had been done.
2017-09-04 18:54:03 +03:00
Andrei Elkin
641baa5d03 Post-push for MDEV-13437
A new $MYSQLD_LAST_CMD evaluation was too late in case --manual-gdb.
Now it is done before the server restart type branches which is safe
and the args value has been fully computed by the new point of
evaluation.
2017-09-04 18:42:30 +03:00
Oleksandr Byelkin
17589989ee MDEV-10972: Insert from select / view / union -- repeatable crash in 10.1, 10.2 Linux/Mac/Windows
save thd->select_number between parsing and executions (in case it was not complete executed due to errors (for example epsent table))
2017-09-04 16:45:02 +02:00
Marko Mäkelä
0500899904 MDEV-13705 10.0.32 does not compile on architectures without 64-bit atomics
This is a backport of the following:

MDEV-13009 10.1.24 does not compile on architectures without 64-bit atomics

Add a missing #include "sync0types.h" that was removed in MDEV-12674.
2017-09-04 09:46:47 +03:00
Julien Del-Piccolo
720928782f Fix bash expansion issue in wsrep_sst_rsync (#443)
* Fix bash expansion issue in wsrep_sst_rsync. https://github.com/docker-library/mariadb/issues/126

* Fix permissions
2017-09-03 11:33:27 +04:00
Olivier Bertrand
703ce16a11 - Add more trace to tbl_thread.test (to debug failure)
modified:   storage/connect/mysql-test/connect/r/tbl_thread.result
  modified:   storage/connect/mysql-test/connect/t/tbl_thread.test
2017-09-02 16:01:31 +02:00
Olivier Bertrand
7ccce51b09 Disable MONGO modified: storage/connect/CMakeLists.txt 2017-09-02 14:57:49 +02:00
Olivier Bertrand
01d86c74af - Fix MongoDB C Driver adding for CMAKE.
Requires MongoDB C Driver version 1.7 now available
  modified:   storage/connect/CMakeLists.txt
2017-09-02 10:59:39 +02:00
Marko Mäkelä
9f580bbc0e Merge 10.2 into bb-10.2-ext 2017-09-01 22:15:12 +03:00
Marko Mäkelä
1136c8d366 Follow-up to MDEV-13570 Assertion failure !srv_read_only_mode in --innodb-read-only shutdown when buf_resize_thread is active
logs_empty_and_mark_files_at_shutdown(): Actually skip the debug assertion
when the buf_resize_thread is active. The previous fix skipped the
debug assertion failure when buf_dump_thread is active. Both these
threads are created also in innodb_read_only mode. Depending on how
fast these threads react to the shutdown signal, the debug assertion
could be triggered.

There is no impact on non-debug servers, and very little impact on
debug servers either, because in innodb_read_only shutdown, no InnoDB
files will need to be written.
2017-09-01 22:07:43 +03:00
Marko Mäkelä
7f99381288 Fix compiler warnings
metadata_lock_info_duration[]: Remove the unused variable.

Add some comments /* fall through */ to silence -Wimplicit-fallthrough
2017-09-01 15:40:49 +03:00
Marko Mäkelä
2f3968d98f After-merge fixes for Galera test results 2017-09-01 11:29:11 +03:00
Marko Mäkelä
05cc028f56 Merge 10.2 into bb-10.2-ext 2017-09-01 11:24:36 +03:00
Marko Mäkelä
b660584b10 After-merge fix for a Galera test result 2017-09-01 11:23:45 +03:00
Marko Mäkelä
6749d39a95 Merge 10.2 into bb-10.2-ext 2017-09-01 08:47:55 +03:00
Marko Mäkelä
1b41a54fc9 Fix test for MDEV-13674: Deprecate innodb_use_mtflush and innodb_mtflush_threads 2017-09-01 08:38:19 +03:00
Marko Mäkelä
5660c061fa Merge 10.1 into 10.2 2017-08-31 18:06:11 +03:00
Marko Mäkelä
be45f083e6 Merge 10.0 into 10.1 2017-08-31 18:04:44 +03:00
Vladislav Vaintroub
6be93c3b8a MDEV-13693 : Fix parameter passing to my_error.
char* parameter is expected by the message ER_KEY_COLUMN_DOES_NOT_EXITS,
thus pass char*, rather than LEX_STRING.
2017-08-31 14:57:56 +00:00