Commit graph

175303 commits

Author SHA1 Message Date
Nirbhay Choubey
7241258c1f MDEV-9416: MariaDB galera got signal 11 when altering table add unique index
When a BF thread attempts to abort a victim thread's transaction,
the victim thread is not locked and thus its not safe to rely on
its data structures like htons registered for the trx.

So, instead of getting the registered htons from victim, innodb's
hton can be looked up directly from installed_htons[] and used to
abort the transaction. (Same technique is used in older versions)
2016-11-07 11:53:57 -05:00
Nirbhay Choubey
6bb6f30ff9 MDEV-9312: storage engine not enforced during galera cluster replication
Perform a post initialization of plugin-related variables
of wsrep threads after their global counterparts have been
initialized.
2016-11-07 11:53:56 -05:00
Nirbhay Choubey
7c38a94435 MDEV-10041: Server crashes sporadically during bootstrap while running wsrep tests
The crash is caused due to a race condition where wsrep
startup threads invoke ha_maria::implicit_commit() method
while maria_hton is partially initialized. The fix is to
skip this method if plugins are uninitialized.
2016-11-07 11:53:56 -05:00
Sergey Vojtovich
458648e5da Fixed test suite name 2016-11-07 13:27:33 +04:00
Jan Lindström
ea24480c4e Merge pull request #255 from rasmushoj/MDEV-9820
MDEV-9820 Added server variable compression_default, which if 1/ON sets compres…
2016-11-07 10:25:49 +02:00
Elena Stepanova
f5719fcf8c Temporarily disable innodb.innodb_trx_weight test due to MDEV-11185 2016-11-07 03:20:04 +03:00
Elena Stepanova
72c9de13fd MDEV-10986 sphinx.union-5539 and sphinx.sphinx fail in buildbot and outside
Do not include the suite into the default list until the tests are stable
2016-11-07 01:52:07 +03:00
Vladislav Vaintroub
2d25d09a8b Merge pull request #253 from grooverdan/10.2-MDEV-11195-numa-build
MDEV-11195: Correct enablement of NUMA in innodb/xtradb
2016-11-04 17:19:02 +01:00
Rasmus Johansson
bba224dd53 Added server variable compression_default, which if 1/ON sets compression on for all new InnoDB/XtraDB tables by default by setting PAGE_COMPRESSED=1 2016-11-04 13:33:37 +02:00
Kristian Nielsen
7afcc7d1a2 Re-generate .rdiff file in attempt to fix a test failure.
The .rdiff applied ok locally with my copy of patch, but failed with
"misordered hunks" on a test host. Maybe that host has a more strict
version of `patch`.
2016-11-03 17:34:24 +01:00
Oleksandr Byelkin
99d07aa9bd Fixed print format. 2016-11-03 16:56:18 +01:00
Sergey Vojtovich
91511216fc Scalability bottleneck in ha_innodb::general_fetch
With "WL#6047 - Do not allocate trx id for read-only transactions"
m_prebuilt->trx->id is always 0 for read-only transactions. This makes
it useless as an index for fuzzy counters.

Use server thread id instead similarly to MySQL.
2016-11-03 19:25:30 +04:00
Kristian Nielsen
b002509b67 MDEV-11065: Compressed binary log. Merge code into current 10.2.
Conflicts:
	sql/share/errmsg-utf8.txt
2016-11-03 14:48:51 +01:00
Kristian Nielsen
56a041cde6 MDEV-11065: Compressed binary log. Fix BINLOG statement.
BINLOG statement output by mysqlbinlog actually has the base64 of the
non-compressed event. So remove my previous incorrect review change,
which allowed compressed event types for BINLOG statement.

Also add a couple test cases for this, running mysqlbinlog | mysql.
2016-11-03 13:37:15 +01:00
Sergey Vojtovich
d665e79c5b MDEV-7660 - MySQL WL#6671 "Improve scalability by not using thr_lock.c locks
for InnoDB tables"

Don't use thr_lock.c locks for InnoDB tables. Below is list of changes that
were needed to implement this:
- HANDLER OPEN acquireis MDL_SHARED_READ instead of MDL_SHARED
- HANDLER READ calls external_lock() even if SE is not going to be locked by
  THR_LOCK
- InnoDB lock wait timeouts are now honored which are much shorter by default
  than server lock wait timeouts (1 year vs 50 seconds)
- with @@autocommit= 1 LOCK TABLES disables autocommit implicitely, though
  user still sees @@autocommt= 1
- the above starts implicit transaction
- transactions started by LOCK TABLES are now rolled back on disconnect
  (previously everything was committed due to autocommit)
- transactions started by LOCK TABLES are now rolled back by ROLLBACK
  (previously everything was committed due to autocommit)
- it is now impossible to change BINLOG_FORMAT under LOCK TABLES (at least
  to statement) due to running transaction
- LOCK TABLES WRITE is additionally handled by MDL
- ...in contrast LOCK TABLES READ protection against DML is pure InnoDB
- combining transactional and non-transactional tables under LOCK TABLES
  may cause rolled back changes in transactional table and "committed"
  changes in non-transactional table
- user may disable innodb_table_locks, which will cause LOCK TABLES to be
  noop basically

Removed tests for BUG#45143 and BUG#55930 which cover InnoDB + THR_LOCK. To
operate properly these tests require code flow to go through THR_LOCK debug
sync points, which is not the case after this patch. These tests are removed
by WL#6671 as well. An alternative is to port them to different storage engine.
2016-11-03 16:35:15 +04:00
Kristian Nielsen
3c0ff6153f MDEV-11065: Compressed binary log
.result file update for --embedded test run.
2016-11-03 12:03:52 +01:00
Oleksandr Byelkin
e2d6912609 MDEV-9114: Bulk operations (Array binding)
(+ default values)
2016-11-02 15:07:52 +01:00
Darshan M N
c6713f651f Bug#23631471 BUF_BLOCK_ALIGN() MAKES INCORRECT ASSUMPTIONS ABOUT CHUNK SIZE
Issue:
======
Currently the approach we take to find the chunk corresponding to a given
pointer uses srv_buf_pool_chunk_unit based on the assumption that
srv_buf_pool_chunk_unit is the total size of all pages in a buffer pool
chunk. We first step back by srv_buf_pool_chunk_unit bytes and use
std::map::upper_bound() to find the first chunk in the map whose key >= the
resulting pointer.

However, the real size of a chunk (and thus, the total size of its pages)
may differ from the value configured with innodb_buffer_pool_chunk_size
due to rounding up to the OS page size. So, in some cases the above logic
gives us the wrong chunk.

Fix:
====
We find out the chunk corresponding to the give pointer without using
srv_buf_pool_chunk_unit. This is done by using std::map::upper_bound()
to find the next chunk in the map which appears right after the pointer and
decrementing the iterator, which would give us the chunk the pointer
belongs to.

Contribution by Alexey Kopytov.

RB: 13347
Reviewed-by: Debarun Banerjee <debarun.banerjee@oracle.com>
2016-11-02 12:29:41 +04:00
Sergey Vojtovich
ce1011669b MDEV-11175 - \H option does not replace localhost with a host name
Let \H issue host name when connected to localhost via TCP/IP.
2016-11-02 12:19:37 +04:00
Daniel Black
58ac8dd255 MDEV-11195: Simplify enablement of NUMA in innodb/xtradb
Move common parts of {innodb,xtradb}/CmakeLists.txt to the macro.
2016-11-02 14:37:43 +11:00
Otto Kekäläinen
23cb94f04c Merge pull request #251 from ottok/ok-debpkg-10.2
MDEV-6284 - Partially merge downstream Debian/Ubuntu packaging into upstream MariaDB
2016-11-01 13:39:09 +02:00
Daniel Black
ab0e5031e4 MDEV-11195: Correct enablement of NUMA in innodb/xtradb
No -DHAVE_LIBNUMA=1 was passed to the source compile (and the
global include/my_config.h wasn't used).

This also is Linux only so corrected the cmake macro.

Fixed indenting in cmake macro.

Removed NUMA defination from include/my_config.h as its only
in the storage engine.

Thanks Elena Stepanova and Vladislav Vaintroub for the detailed
list of bugs/questions.

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-11-01 11:09:47 +11:00
Sergey Vojtovich
71e11bce34 MDEV-8791 - AIX: Unresolved Symbols during linking
Clean-up nolock.h: it doesn't serve any purpose anymore. Appropriate code moved
to x86-gcc.h and my_atomic.h.

If gcc sync bultins were detected, we want to make use of them independently of
__GNUC__ definition. E.g. XLC simulates those, but doesn't define __GNUC__.

HS/Spider: According to AIX manual alloca() returns char*, which cannot be
casted to any type with static_cast. Use explicit cast instead.

MDL: Removed namemangling pragma, which didn't let MariaDB build with XLC.

WSREP: _int64 seem to be conflicting name with XLC, replaced with _integer64.

CONNECT: RTLD_NOLOAD is GNU extention. Removed rather meaningless check if
library is loaded. Multiple dlopen()'s of the same library are permitted,
and it never gets closed anyway. Except for error, which was a bug: it may
close library, which can still be referenced by other subsystems.

InnoDB: __ppc_get_timebase() is GNU extention. Only use it when __GLIBC__ is
defined.

Based on contribution by flynn1973.
2016-10-31 12:18:23 +04:00
Kristian Nielsen
40ad946683 MDEV-11187: Server does not compile on labrador 2016-10-31 07:35:02 +01:00
vinchen
0e380c3bfe two fix:
1.Avoid overflowing buffers in case of corrupt events
2.Check the compressed algorithm.
2016-10-29 21:59:20 +08:00
Otto Kekäläinen
c912d05fab MDEV-6284: Install systemd files (almost) the Debian way
The control file contents must be correct from the start and cannot
be modified at build time by CMake. Also all static Debian package
analyzers will fail to see all manipulations by CMake later on.

It is best to do all manipulations like these in autobake-deb.sh.
2016-10-29 03:50:11 +03:00
Otto Kekäläinen
7316b14144 Deb: use deb-sys-maint user credentials to configure MariaDB plugins
On systems with unix socket authentication root could run these
without any special maintenance accounts.
2016-10-29 03:50:07 +03:00
Otto Kekäläinen
02a6f61a8a Deb: delete runnable files we don't want to have in the test data package 2016-10-29 02:17:14 +03:00
Otto Kekäläinen
bfda961c86 Deb: omit source building step when running from autobake-deb.sh
This will increase the speed of the build by a minute or two.
2016-10-29 01:30:50 +03:00
Otto Kekäläinen
0668e6ba49 Travis-CI: skip building mariadb-test packages to speed up build
The build must stay under the Travis-CI 50 minute limit. Currently
they often exceed, and the huge test suite is the single most long
step in moving/packaging files, so remove it on Travis-CI automatically.
2016-10-27 18:42:17 +03:00
Otto Kekäläinen
7f570bef1e Deb: fix commit 1369696 and change autobake strategy to Debian Sid first 2016-10-27 18:42:17 +03:00
Otto Kekäläinen
affa6e3d6d MDEV-6284: Break/replace MySQL 5.7 packages to allow upgrade
Also sort control file slightly to be easier to compare to downstream
control file and include gdb for automatic backtraces if the test suite
fails.

Delete duplicate man page installation.

Make mariadb-test breaks/replaces mariadb-server-5.5
as /usr/lib/mysql/plugin/adt_null.so changed package.
2016-10-27 18:42:17 +03:00
Otto Kekäläinen
8c32d95920 MDEV-6284: Activate quilt patches again: test table expection needed
Buildbot tries to create database 'test' so we need to have these
Debian-only exceptions enabled and patch our own source at build time.
2016-10-27 18:42:17 +03:00
Otto Kekäläinen
4b7004dfce Travis-CI: build less verbose, log must stay under 4MB limit 2016-10-27 18:42:17 +03:00
Otto Kekäläinen
19cffe69c2 MDEV-6284: Revert commit af03ba84 partially for systemd
This version of Debian packaging does not yet install systemd scripts,
so revert that part to the CMakeLists.txt based hack.
2016-10-27 18:42:17 +03:00
Otto Kekäläinen
f63799d068 MDEV-6284: Clean up crufs (dirs files, duplicate entries etc) 2016-10-27 18:42:17 +03:00
Otto Kekäläinen
235db2c77b MDEV-6284: wrap-and-sort 2016-10-27 18:42:16 +03:00
Otto Kekäläinen
b2dffcbfea MDEV-6284: Fix issues detected by Lintian 2016-10-27 18:42:16 +03:00
Otto Kekäläinen
1877a8cdb4 MDEV-6284: Remove CMakeLists.txt hack that mangled the server install file
For Debian the rules file is the main makefile and assuming that a upstream
makefile will mangle the Debian packaging files creates false alerts
from static analysis tools and other problems.
2016-10-27 18:42:16 +03:00
Otto Kekäläinen
d495bf4280 MDEV-6284: Spliy Mroonga, Spider and TokuDB into their own packages
Also each package has it's own maintainer scripts to install and
uninstall them.
2016-10-27 18:42:16 +03:00
Otto Kekäläinen
e58e7b5052 MDEV-6284: Rename plugin packages to match new Debian convention 2016-10-27 18:42:16 +03:00
Otto Kekäläinen
0a1dbe8426 MDEV-6284: Split mariadb-test-data out of mariadb-test 2016-10-27 18:42:16 +03:00
Otto Kekäläinen
1494a96bf4 MDEV-6284: Make mariadb-test package versionless
There is no need for a separate mariadb-test metapackage and a versioned
mariadb-test-* package. Simply make it versionless and make it depend on
the client and server packages that stem from same source version.
2016-10-27 18:42:16 +03:00
Otto Kekäläinen
73f1c655ad MDEV-6284: Import most of downstream Debian packaging
These changes update the contents and behaviour of current packages
to match the current packaging in Debian official repos.

Keep mtr test scope small.

Updating maintainer scripts also required regenerating the translations.

Rules based on modern dh_* buildtools.

Update control file with new Debian conventions:
- Provide virtual-mysql-* virtual packages
- Recommends perl modules instead of Depends
2016-10-27 18:42:16 +03:00
Otto Kekäläinen
a59655a347 MDEV-6284: Remove Debian policy breaking and empty RELEASE_* variables 2016-10-27 18:42:15 +03:00
Otto Kekäläinen
148422ef61 MDEV-6284: Bump compat level and define native Debian format
Compat level needs to match the debhelper version in Debian.
Debian wheezy has 9, so there is no need to stay on ancient level 5.
2016-10-27 18:42:15 +03:00
Otto Kekäläinen
be78eec30a MDEV-6284: Rename .files -> .install 2016-10-27 18:42:15 +03:00
Alexander Barkov
39d2c7b18d Removing LEX::interval_list, as it's not used since parser cleanups
made in 227510e039.
We now use lex->last_field->interval_list directly instead.
2016-10-27 06:37:21 +04:00
Jan Lindström
0c15d1a6ff Set new scheduling algorithm VATS for lock waits as a default. 2016-10-25 12:21:54 +03:00
Alexey Botchkov
201c1e0f29 MDEV-9143 JSON_xxx functions.
Item_bool fixed to behave smarter with NOT operation.
2016-10-25 10:09:33 +04:00