Commit graph

172090 commits

Author SHA1 Message Date
Igor Babaev
5c579482eb Adjusted test results after the fix for mdev-12429. 2017-04-07 16:25:02 -07:00
Oleksandr Byelkin
57a699b0a0 MDEV-8642: WHERE Clause not applied on View - Empty result set returned
An attempt to mark reference as dependent lead to transfering this property to
original view field and through it to other references of this field which
can't be dependent.
2017-04-05 20:46:19 +02:00
Marko Mäkelä
8e36216a06 Import two ALTER TABLE…ALGORITHM=INPLACE tests from MySQL 5.6.
Also, revert part of MDEV-7685 that added an InnoDB abort when
ALTER TABLE…ALGORITHM=INPLACE is reporting that it ran out of
file space.
2017-04-05 14:46:35 +03:00
Igor Babaev
b0395d8701 Fixed the bug mdev-12429 and its duplicates mdev-12145 and mdev-9886.
Also fixed a wrong result for a test case for mdev-7691
(the alternative one).
The test  cases for all these bug have materialized semi-joins used
inside dependent sub-queries.

The patch actually reverts the change inroduced by Monty in 2003.
It looks like this change is not valid anymore after the implementation
of semi-joins.
Adjusted output from EXPLAIN for many other test cases.
2017-04-04 10:04:52 -07:00
Vladislav Vaintroub
f2dc04abea Compiling, Windows . Avoid unnecessary rebuilds with MSVC.
To export symbols from the mysqld.exe, use lib.exe with /DEF, rather than
pre-link step when building mysqld.exe.

This helps to avoid relinking all plugins, if mysqld.exe was recompiled
but the list of its exports has not changed.

Also removed unnecessary DEPENDS in some ADD_CUSTOM_COMMAND (gen_lex_token,
gen_lex_hash etc). They confuse VS generator which tends to
recreate headers and do unnecessary recompilations.
2017-04-03 18:48:48 +00:00
Vladislav Vaintroub
ff6f4d7db1 Windows : Fix compiling with VS2013
We do not use it now, but there is still no reason to break compilation
for other users.
2017-04-03 15:18:46 +00:00
Marko Mäkelä
c51fc679f5 Merge 5.5 into 10.0 2017-03-24 18:19:15 +02:00
Marko Mäkelä
a821ef7605 MDEV-11802 innodb.innodb_bug14676111 fails on buildbot
The test was unnecessarily depending on InnoDB purge, which can
sometimes fail to proceed.

Let us rewrite the test to use BEGIN;INSERT;ROLLBACK to cause the
immediate removal of the desired records.
2017-03-24 18:01:56 +02:00
Sergei Golubchik
0d622bed4f Merge branch '5.5' into 10.0 2017-03-21 11:35:50 +01:00
Sergei Golubchik
577915def8 remove COPYING.LESSER
shouldn't have been added in the first place, MariaDB Server is GPLv2
2017-03-21 08:17:18 +01:00
Marko Mäkelä
4c35dce296 Clean up the test mentioned in MDEV-12052.
The test is not expected to crash. With a non-debug server,
Valgrind completes in reasonable time without any failure.

Also, it does not make sense to store and restore parameters
when the parameters are already being restored by a server restart.
2017-03-18 22:50:14 +02:00
Bharathy Satish
6fa5e08146 Bug #25717383: MYSQLDUMP MAY EXECUTE ANY ARBITRARY QUERY
While writing comments if database object names has a new
line character, then next line is considered a command, rather
than a comment.
This patch fixes the way comments are constructed in mysqldump.

(cherry picked from commit 1099f9d17b1c697c2760f86556f5bae7d202b444)
2017-03-18 10:12:04 +05:30
Vladislav Vaintroub
8efdf89e42 MDEV-12126 Correct German error message. 2017-03-17 20:07:39 +00:00
Sergei Golubchik
8971286a3c compiler warning 2017-03-16 14:03:17 +01:00
Monty
2d0c579a86 Wait for slave threads to start during startup
- Before this patch during startup all slave threads was started without
  any check that they had started properly.
- If one did a START SLAVE, STOP SLAVE or CHANGE MASTER as first command to the server
  there was a chance that server could access structures that where not
  properly  initialized which could lead to crashes in
  Log_event::read_log_event
- Fixed by waiting for slave threads to start up properly also during
  server startup, like we do with START SLAVE.
2017-03-16 14:21:33 +02:00
Monty
e7f55fde88 Removed wrong assert
The following is an updated commit message for the following commit
that was pushed before I had a chance to update the commit message:
c5e25c8b40

Fixed dead locks when doing stop slave while slave was starting.

- Added a separate lock for protecting start/stop/reset of a specific slave.
  This solves some possible dead locks when one calls stop slave while
  the slave is starting as the old run_locks was over used for other things.
- Set hash->records to 0 before calling free of all hash elements.
  This was set to stop concurrent threads to loop over hash elements and
  access members that was already freed.
  This was a problem especially in start_all_slaves/stop_all_slaves
  as the mutex protecting the hash was temporarily released while a slave
  was started/stopped.
- Because of change to hash->records during hash_reset(),
  any_slave_sql_running() will return 1 during shutdown as one can't
  loop over master_info_index->master_info_hash while hash_reset() of it
  is in progress.
  This also fixes a potential old bug in any_slave_sql_running() where
  during shutdown and ~Master_info_index(), my_hash_free() we could
  potentially try to access elements that was already freed.
2017-03-16 14:21:32 +02:00
Sergei Golubchik
2c2bd8c155 MDEV-12261 build failure without P_S
restore mysql_file_delete_with_symlink() but let it use
new my_handler_delete_with_symlink() mysys helper.
2017-03-15 17:48:30 +01:00
Varun Gupta
adbe1c5fe9 MDEV-6486: Assertion `!table || (!table->read_set || bitmap_is_set(table->read_set, field_index))'
failed with SELECT SQ, TEXT field

The functon find_all_keys does call Item_subselect::walk, which calls walk() for the subquery
The issue is that when a field is represented by Item_outer_ref(Item_direct_ref(Item_copy_string( ...))).
Item_copy_string does have a pointer to an Item_field in Item_copy::item but does not implement Item::walk method, so we are not
able to set the bitmap for that field. This is the reason why the assert fails.

Fixed by adding the walk method to Item_copy class.
2017-03-14 17:31:29 +05:30
Ramil Kalimullin
87e37ee06b BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
Changed MYSQL_OPT_SSL_MODE to be the same as in 5.6 (ABI compatibility).

(cherry picked from commit 47bb4eb5df1629b5d5e30aebfa9d7a6d74388a5d)
2017-03-14 16:02:09 +05:30
Vladislav Vaintroub
3990e55fef Windows : Fix packaging when building with VS2017 2017-03-13 23:31:03 +00:00
Vicențiu Ciorbaru
06f1f1aa6e Make ELOOP be considered a File Not Found error when it comes from handlerton
Fix symlink-aria && symlink-myisam to account for this possibility.
2017-03-14 00:25:26 +02:00
Sergei Golubchik
c99d71a29c MDEV-12231 MariaDB fails to restart after 10.0.30-1.el7 update
force SELinux policies to be built in mysql_release RPM packages
2017-03-12 10:30:57 +01:00
Marko Mäkelä
032678ad18 MDEV-12091 Shutdown fails to wait for rollback of recovered transactions to finish
In the 10.1 InnoDB Plugin, a call os_event_free(buf_flush_event) was
misplaced. The event could be signalled by rollback of resurrected
transactions while shutdown was in progress. This bug was caught
by cmake -DWITH_ASAN testing. This call was only present in the
10.1 InnoDB Plugin, not in other versions, or in XtraDB.

That said, the bug affects all InnoDB versions. Shutdown assumes the
cessation of any page-dirtying activity, including the activity of
the background rollback thread. InnoDB only waited for the background
rollback to finish as part of a slow shutdown (innodb_fast_shutdown=0).
The default is a clean shutdown (innodb_fast_shutdown=1). In a scenario
where InnoDB is killed, restarted, and shut down soon enough, the data
files could become corrupted.

logs_empty_and_mark_files_at_shutdown(): Wait for the
rollback to finish, except if innodb_fast_shutdown=2
(crash-like shutdown) was requested.

trx_rollback_or_clean_recovered(): Before choosing the next
recovered transaction to roll back, terminate early if non-slow
shutdown was initiated. Roll back everything on slow shutdown
(innodb_fast_shutdown=0).

srv_innodb_monitor_mutex: Declare as static, because the mutex
is only used within one module.

After each call to os_event_free(), ensure that the freed event
is not reachable via global variables, by setting the relevant
variables to NULL.
2017-03-10 18:54:29 +02:00
Ramil Kalimullin
060b1eadf4 BUG#25575605: SETTING --SSL-MODE=REQUIRED SENDS CREDENTIALS BEFORE VERIFYING SSL CONNECTION
MYSQL_OPT_SSL_MODE option introduced.
It is set in case of --ssl-mode=REQUIRED and permits only SSL connection.

(cherry picked from commit 3b2d28578c526f347f5cfe763681eff365731f99)
2017-03-10 14:11:26 +05:30
Vicențiu Ciorbaru
1d47bd61d5 Remove leftover merge conflict marker 2017-03-09 16:52:57 +02:00
Sergei Petrunia
2abc313c37 Use correct function name in DEBUG_ENTER 2017-03-09 12:34:06 +03:00
Marko Mäkelä
1b2b209519 Use correct integer format with printf-like functions. 2017-03-09 11:28:07 +02:00
Marko Mäkelä
8805fe0d5c Use %pure-parser instead of the deprecated %pure_parser. 2017-03-09 11:27:24 +02:00
Marko Mäkelä
2158de8865 Remove unused variables. 2017-03-09 11:26:36 +02:00
Daniel Bartholomew
9fe92a9770 bump the VERSION 2017-03-08 11:13:34 -05:00
Marko Mäkelä
e1e04c3d68 Correct a merge error. 2017-03-08 14:40:02 +02:00
Vladislav Vaintroub
65ef8ec8aa MDEV-12207 Include windows compatibility manifest into executable to make GetVersionEx work correctly 2017-03-08 11:20:03 +00:00
Vicențiu Ciorbaru
fc0a6dd57f Merge branch '5.5' into 10.0 2017-03-08 12:21:13 +02:00
Vicențiu Ciorbaru
f65c9f825d mysql_client_test_nonblock fails when compiled with clang
mysql_client uses some inline assembly code to switch thread stacks.
This works, however tools that perform backtrace get confused to fix
this we write a specific constant to signify bottom of stack. This
constant is needed when compiling with CLang as well.
2017-03-08 11:56:09 +02:00
Marko Mäkelä
74fe0e03d5 Remove unused declarations. 2017-03-08 11:46:34 +02:00
Marko Mäkelä
47396ddea9 Merge 5.5 into 10.0
Also, implement MDEV-11027 a little differently from 5.5:

recv_sys_t::report(ib_time_t): Determine whether progress should
be reported.

recv_apply_hashed_log_recs(): Rename the parameter to last_batch.
2017-03-08 11:40:43 +02:00
Marko Mäkelä
6860a4b556 MDEV-12206 Query_cache::send_result_to_client() may corrupt THD::query_plan_flags
This is essentially a backport of the 10.0
commit 203f4d4193
that fixes a bug and silences a GCC 6.3.0 warning
about a left shift of a signed integer.

Missing parenthesis in a macro definition caused wrong operation
in the Query_cache::send_result_to_client() statement
   thd->query_plan_flags= (thd->query_plan_flags & ~QPLAN_QC_NO) | QPLAN_QC;

This would expand to
   thd->query_plan_flags= (thd->query_plan_flags & ~1) << 6 | 1 << 5;

which would shift the flags by 6 and clear an unrelated flag, instead
of clearing the flag (1 << 6).
2017-03-08 10:31:06 +02:00
Marko Mäkelä
9c47beb8bd MDEV-11027 InnoDB log recovery is too noisy
Provide more useful progress reporting of crash recovery.

recv_sys_t::progress_time: The time of the last report.

recv_scan_print_counter: Remove.

log_group_read_log_seg(): After after each I/O request,
report progress if needed.

recv_apply_hashed_log_recs(): At the start of each batch,
if there are pages to be recovered, issue a message.
2017-03-08 10:07:50 +02:00
Marko Mäkelä
1fd3cc8c1f Fix a compiler warning. 2017-03-08 10:06:34 +02:00
Marko Mäkelä
17a1b194e2 Fix some GCC 6.3.0 warnings in MyISAM and Maria.
The C++ standard does not allow references to be NULL.
Assign the return value of THD::alloc() to a pointer,
not to a reference.
2017-03-08 10:03:35 +02:00
Vicențiu Ciorbaru
c4f3e64c23 Merge branch 'bb-10.0-vicentiu' into 10.0 2017-03-06 21:50:42 +02:00
Alexey Botchkov
30cac41c2f MDEV-11084 server_audit does not work with mysql_community 5.7.16.
Server audit plugin version updated.
2017-03-06 23:07:59 +04:00
Vicențiu Ciorbaru
dc1c9e69d0 Make tokudb report ENOENT when renaming table to nonexistant DB 2017-03-06 19:25:22 +02:00
Vicențiu Ciorbaru
3da916246f Revert "Add extra HA_ERR message that Percona introduced within TokuDB 5.6.35-80"
This reverts commit fa59ac5055.
2017-03-06 19:17:15 +02:00
Vicențiu Ciorbaru
9741017b1f Disable 2 tokudb tests
dir_per_db_rename_to_nenexisting_schema: mysqltest fails with no output
percona_kill_idle_trx_tokudb: MariaDB doesn't support kill_idle_trx var
for all SE.
2017-03-05 15:18:26 +02:00
Vicențiu Ciorbaru
7bf914e157 rpl_extra_col_slave_tokudb changes result set
Probably the result is due to a bug fixed on their server. Restoring old
behaviour for now.
2017-03-05 15:18:26 +02:00
Vicențiu Ciorbaru
97041acf7f Fix tokudb.gap_lock_error test
TokuDB testsuite makes use of includes not found in our default 10.0.
Cherry pick them from Percona Server's include directory.
2017-03-05 15:18:26 +02:00
Elena Stepanova
4c3b732d9f Updated list of unstable tests for 10.0.30 release 2017-03-05 12:26:32 +02:00
Varun Gupta
43903745e5 MDEV-11078: NULL NOT IN (non-empty subquery) should never return results
Disabling the cond guards during the creation of Tricond Item for
constant and NULL left expression items
2017-03-05 10:58:05 +05:30
Vicențiu Ciorbaru
1cac281ebe Merge branch 'merge-pcre' into 10.0 2017-03-05 02:44:39 +02:00