Commit graph

171974 commits

Author SHA1 Message Date
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
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
Vicențiu Ciorbaru
dfd7749120 8.40 2017-03-05 02:27:59 +02:00
Vicențiu Ciorbaru
895b253963 Merge remote-tracking branch 'connect/10.0' into 10.0 2017-03-05 02:22:40 +02:00
Vicențiu Ciorbaru
fa59ac5055 Add extra HA_ERR message that Percona introduced within TokuDB 5.6.35-80 2017-03-05 02:01:49 +02:00
Vicențiu Ciorbaru
b7a3bce06e Merge branch 'merge-tokudb-5.6' into 10.0 2017-03-05 02:01:21 +02:00
Vicențiu Ciorbaru
d71df7e1db 5.6.35-80.0 2017-03-05 01:31:32 +02:00
Vicențiu Ciorbaru
5139c4b688 Update xtradb version to match the merged one 2017-03-05 01:06:01 +02:00
Vicențiu Ciorbaru
5d0c123007 Add missing sys_var test for innodb_stats_include_delete_marked 2017-03-05 01:00:21 +02:00
Vicențiu Ciorbaru
83da1a1e57 Merge branch 'merge-xtradb-5.6' into 10.0 2017-03-05 00:59:57 +02:00
Vicențiu Ciorbaru
8d69ce7b82 5.6.35-80.0 2017-03-04 20:50:02 +02:00
Vicențiu Ciorbaru
f4806772d3 Add missing DBUG_RETURN 2017-03-03 20:16:16 +02:00
Vicențiu Ciorbaru
606a4a4847 Post MDEV-11902 Fix test failures in maria and myisam storage engines
my_readline can fail due to missing file. Make my_readline report this
condition separately so that we can catch it and report an appropriate
error message to the user.
2017-03-03 20:12:48 +02:00
Marko Mäkelä
29c776cfd1 MDEV-11520: Retry posix_fallocate() after EINTR.
The function posix_fallocate() as well as the Linux system call
fallocate() can return EINTR when the operation was interrupted
by a signal. In that case, keep retrying the operation, except
if InnoDB shutdown has been initiated.
2017-03-03 12:03:33 +02:00
Marko Mäkelä
6b8173b6e9 MDEV-11520: Retry posix_fallocate() after EINTR.
The function posix_fallocate() as well as the Linux system call
fallocate() can return EINTR when the operation was interrupted
by a signal. In that case, keep retrying the operation, except
if InnoDB shutdown has been initiated.
2017-03-03 11:47:31 +02:00
Vicențiu Ciorbaru
1acfa942ed Merge branch '5.5' into 10.0 2017-03-03 01:37:54 +02:00
Daniel Black
d04d835f64 MDEV-11610: support-files/mysql-log-rotate.sh not binlog either
For the same reason as removing binlog rotation on Debian.
2017-03-02 15:16:21 +04:00
Daniel Black
156cf86def MDEV-11610: Alter Debian log rotate to not rotate binary/relay logs
Rotating binary/relay logs can cause interuption to the processing
on the server. Binary and relay logs have their own mechanism already
for not getting out of control (expire_logs_days).

By no longer rotating binary and relay logs log rotation is limited to
the following logs:
* error log
* general log
* slow query log

Writing these to the binary log would cause any logrotation on the
slave to occur twice, once due to this and another due to the log-
rotate script on the slave. Now --local is passed to mysqladmin to
prevent this duplication.
2017-03-02 15:16:06 +04:00
Daniel Black
0af8b565f2 MDEV-11610: mysqladmin flush-X-log options
Add the following options to mysqladmin

+  flush-binary-log        Flush binary log
+  flush-engine-log        Flush engine log(s)
+  flush-error-log         Flush error log
+  flush-general-log       Flush general log
+  flush-relay-log         Flush relay log
+  flush-user-resources    Flush user resources
2017-03-02 15:16:00 +04:00
Olivier Bertrand
b2956b2ab4 Update version number and date
modified:   storage/connect/ha_connect.cc

Add conditional SE exception support
  modified:   storage/connect/json.cpp
  modified:   storage/connect/plgdbutl.cpp

Change %p in %x in some sprintf functions.
This to avoid some compiler warnings.
  modified:   storage/connect/tabwmi.cpp
  modified:   storage/connect/tabxml.cpp
  modified:   storage/connect/value.h

Add JavaWrappers.jar to the class path
  modified:   storage/connect/jdbconn.cpp

Fix wrong declare (char *buf[256]; --> char  buf[256];)
  modified:   storage/connect/xindex.cpp
2017-03-02 12:12:53 +01:00
Daniel Black
33c1f20d8e MDEV-11610: Add --local to mysqladmin 2017-03-02 15:09:24 +04:00
Daniel Black
659047b820 MDEV-11386: Advance Toochain library cache workaround (temporary)
Due to the way Advance Toolchain before 10.0-3 and 8.0-8 is
packaged, shared libraries installed after the library cache
advance-toolchain-atX.Y-runtime package aren't updated in
/opt/atX.Y/etc/ld.so.cache. This results in mysqld,
configured with RUNPATH set to /opt/atX.Y/lib64, resulting
in the Advance Toolchain loader being used and if libraries
such as jemalloc, libssl or any other library that mysqld uses
is installed after Advance Toolchain, these libraries aren't in
the cache and therefore won't be found in the RPM postinstall
when mysqld is executed by mysql_install_db.

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-03-02 14:04:08 +04:00
Sergey Vojtovich
71f53bf72d MDEV-11221 - main.events_restart failed in bb
This is an addition to original fix. Buildbot revealed another sporadic failure
in perfschema.threads_mysql test. Tests relies on data stored in
performance_schema.threads, while performing waits on
information_schema.processlist. These tables are not updated synchronously.

Fixed by performing waits on performance_schema.threads instead.
2017-03-02 12:35:31 +04:00
Sergey Vojtovich
c1c5b7a8d2 Fixed missing DBUG_RETURN 2017-03-01 11:41:48 +04:00
Sergey Vojtovich
e9ad4bdb42 MDEV-11221 - main.events_restart failed in bb
Applied lost in a merge revision 7f38a07:

MDEV-10043 - main.events_restart fails sporadically in buildbot (crashes upon
             shutdown)

There was race condition between shutdown thread and event worker threads.

Shutdown thread waits for thread_count to become 0 in close_connections(). It
may happen so that event worker thread was started but didn't increment
thread_count by this time. In this case shutdown thread may miss wait for this
working thread and continue deinitialization. Worker thread in turn may continue
execution and crash on deinitialized data.

Fixed by incrementing thread_count before thread is actually created like it is
done for connection threads.

Also let event scheduler not to inc/dec running threads counter for symmetry
with other "service" threads.
2017-03-01 11:35:24 +04:00
Oleksandr Byelkin
75f6067e89 MDEV-9635: Server crashes in part_of_refkey or assertion `!created && key_to_save < (int)s->keys' failed in TABLE::use_index(int) or with join_cache_level>2
Do not try to create index where ref is for hash join.
2017-02-28 20:52:26 +01:00
Sergei Golubchik
cc413ce9a3 MDEV-11753 Link failure on missing -L${LIBLZ4_LIBRARY_DIR}
On FreeBSD liblz4 is installed in /usr/local/lib.
Groonga uses pkg_check_modules to check for liblz4 (that is, pkg-config),
and then it used to set for libgroonga.a

  link_directories({$LIBLZ4_LIBRARY_DIRS})
  target_link_libraries(... ${LIBLZ4_LIBRARIES})

Now groonga is a static library, linked into ha_mroonga.so. CMake won't
link dynamic liblz4.so into libgroonga.a, instead it'll pass it as a
dependency and will link it into ha_mroonga.so. Fine so far. But it will
not pass link_directories from the static library as a dependency,
so ha_mroonga.so won't find liblz4.so

As suggested on cmake mailing list (e.g.
here: http://public.kitware.com/pipermail/cmake/2011-November/047468.html)
we switch to use the full path to liblz4.so, instead of the -l/-L pair.
2017-02-28 16:19:44 +01:00
Sergei Golubchik
370cf70136 MDEV-11757 KEY_BLOCK_SIZE strangeness when UNCOMPRESSing COMPRESSed InnoDB tables
in ALTER TABLE ... DROP KEY, ADD KEY, don't forget to compare old
and new keys' block sizes. If they differ - the key definition has changed.
2017-02-28 16:19:44 +01:00
Monty
6a12c05347 Fixed wrong arguments to sql_print_error() 2017-02-28 16:10:47 +01:00
Monty
84ed5e1d5f Fixed hang doing FLUSH TABLES WITH READ LOCK and parallel replication
The problem was that waiting for pause_for_ftwrl was done before
event_group was completed. This caused rpl_pause_for_ftwrl() to wait
forever during FLUSH TABLES WITH READ LOCK.
Now we only wait for FLUSH TABLES WITH READ LOCK when we are changing
to a new event group.
2017-02-28 16:10:47 +01:00
Monty
f3c65ce951 Add protection to not access is_open() without LOCK_log mutex
Protection added to reopen_file() and new_file_impl().

Without this we could get an assert in fn_format() as name == 0,
because the file was closed and name reset, atthe same time
new_file_impl() was called.
2017-02-28 16:10:47 +01:00
Monty
b624b41abb Don't allow one to kill START SLAVE while the slaves IO_THREAD or SQL_THREAD
is starting.

This is needed as if we kill the START SLAVE thread too early during
shutdown then the IO_THREAD or SQL_THREAD will not have time to properly
initlize it's replication or THD structures and clean_up() will try to
delete master_info structures that are still in use.
2017-02-28 16:10:47 +01:00