Commit graph

175335 commits

Author SHA1 Message Date
Oleksandr Byelkin
b162068456 Fixed embedded prepared statements. 2016-11-18 18:29:03 +01:00
Sergey Vojtovich
84fd0bc43c Update libmariadb 2016-11-17 23:38:08 +04:00
Sergey Vojtovich
e1caf318b9 Mark spider tests big
Due to high memory reqirements spider tests fail often on automated testing
VM's due to rather limited resource allocation.

For example with 10.2 spider needs at least 200M * 8 mysqld instances = 1.6Gb
RAM per mtr instance. With --parallel=4 it needs 6.4Gb, while appropriate hosts
have just 3Gb.
2016-11-17 17:36:06 +04:00
Daniel Black
7072ca1f58 MDEV-5725: mysqld embedded libraries into libmariadbd19 Deb package
libmariadbd19 was intended to be added as the package that
included the libmysqld shared library. This was missing
from the debian control file.

The libmariadbd-dev package requires libmariadbd19 to provide
the shared library.

The shared libraries for embedded mysql will go into the libmariadbd18
package rather than the libmariadbd-dev development package.

/usr/bin/mariadb_config is a executable that assists embedded developers
to use the correctly correct header and library files during their
development.

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-11-17 12:37:21 +02:00
Daniel Black
2387c91b8a MDEV-5725: Don't install private mysql header files
Previously private/*.h where included in the package. These represent internal
mysqld structures that aren't guarenteed to provide a stable ABI.

There aren't intended to be used by embedded mysqld applications so
they have been removed.

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2016-11-17 12:37:21 +02:00
Igor Babaev
691214ae30 Fixed bug mdev-11103.
The class Item_func_nop_all missed an implementation
of the virtual method get_copy.
As a result if the condition that can be pushed into
into a materialized view / derived table contained
an ANY subselect then the pushdown condition was built
incorrectly.
2016-11-16 22:16:20 -08:00
Igor Babaev
ebe5a38e16 Correction for the patch for mdev-11102. 2016-11-16 15:06:19 -08:00
Igor Babaev
1655160ddc Fixed bug mdev-11102.
Do not push conditions from where into materialized inner tables
of outer joins: this is not valid.
2016-11-16 14:32:04 -08:00
Sergey Vojtovich
ded4cd12c3 Added missing INNODB_COMPRESSION_DEFAULT 2016-11-16 20:25:55 +04:00
Jan Lindström
0838fd00e7 MDEV-11185: innodb.innodb_trx_weight fails in buildbot
Problem was that test assumes locks to be granted on first-come-first-served (FCFS)
policy. However, in 10.2 we use by default Variance-Aware-Transaction-Scheduling
(VATS) algorithm. Test failure fixed by setting lock wait policy to FCFS.
2016-11-16 12:07:12 +02:00
Alexey Botchkov
0d85124da4 func_json.test failing on Windows fixed. 2016-11-16 12:47:46 +04:00
Igor Babaev
0b869814dc Made the result output deterministic. 2016-11-15 09:25:33 -08:00
Igor Babaev
68e7d92c4c Fixed bug mdev-11072.
In a general case the conditions with outer fields cannot
be pushed into materialized views / derived tables.
However if the outer field in the condition refers to a
single row table then the condition may be pushable.
In this case a special care should be taken for outer
fields when pushing the condition into a materialized view /
derived table.
2016-11-15 09:25:31 -08:00
Alexey Botchkov
ebe5ebba16 MDEV-9143 JSON_xxx functions.
The rest of mysql/json functions implemented.
        CAST AS JSON implemented.
2016-11-15 17:04:31 +04:00
Sergey Vojtovich
1122c1f0c2 InnoDB cleanups
- added missing backslash
- removed duplicate definition of UT_LOW_PRIORITY_CPU/UT_RESUME_PRIORITY_CPU
- removed duplicate UT_RESUME_PRIORITY_CPU call
2016-11-15 14:56:29 +04:00
Igor Babaev
8283d7f70e Added the test case from mdev-11259. 2016-11-13 14:56:30 -08:00
Igor Babaev
92bcb906a0 Fixed bug mdev-11278.
If a recursive CTE referred to a materialized view/derived table then
the query that used this CTE returned a bogus error message.
2016-11-13 14:56:29 -08:00
Otto Kekäläinen
f2219c8d3f Deb: add gdb as a build dependency for stack traces on test suite failures
If mysqld crashed during the test suite run and gdb is available,
a stack trace will be printed automatically.
2016-11-10 18:26:46 +02:00
Otto Kekäläinen
e820dec1f9 Deb: List package contents as part of the build log 2016-11-10 18:26:46 +02:00
Otto Kekäläinen
d50ca3535e Deb: clean up, strip legacy and simplify autobake-deb.sh 2016-11-10 18:26:46 +02:00
Jan Lindström
8c03823974 MDEV-11250: mtflush threads stall on shutdown
Code calling mtflush threads to exit was too late.
2016-11-10 09:42:49 +02:00
Jan Lindström
ada3d7581b MDEV-10692: InnoDB: Failing assertion: lock->trx->lock.wait_lock == lock
When we enter here wait_lock could be already gone i.e. NULL, that
should be allowed.
2016-11-09 15:17:55 +02:00
Jan Lindström
8e5f532dc2 MDEV-10692: InnoDB: Failing assertion: lock->trx->lock.wait_lock == lock
This is not a fix, this is instrumentation to find the bug.
2016-11-09 13:32:43 +02:00
Alexander Barkov
0259b3cbbe MDEV-11255 LDML: allow defining 2-level UCA collations 2016-11-08 20:57:19 +04:00
Hartmut Holzgraefe
90c5b2f505 MDEV-10982 - Show real version number in 'ready for connections' message 2016-11-08 16:10:18 +04:00
Sergei Golubchik
f8b4015459 init plugin psi keys before LOCK_plugin 2016-11-07 22:45:46 -05:00
Nirbhay Choubey
491f42d50d Fix/disable some failing galera tests. 2016-11-07 11:53:59 -05:00
Nirbhay Choubey
9b6bd3f179 MDEV-11149: wsrep_replicate_mysaim: DML fails when binlog checksum enabled
During total-order replication, Query_log_event's checksum_alg
should be explicitly set to the current binlog_checksum as it
is not set for DML queries.
Note: wsrep_replicate_myisam enables replication of DMLs on
MyISAM tables using TOI.
2016-11-07 11:53:59 -05:00
Francisco Biete
db95beb365 MDEV-9903 - 10.2 : Check and run rsync daemon only in the needed IP
See https://github.com/MariaDB/server/pull/235
I submit this code under the BSD-new license.
2016-11-07 11:53:58 -05:00
Nirbhay Choubey
d5e6d8379d Update test results in galera, galera_3nodes suites. 2016-11-07 11:53:58 -05:00
Nirbhay Choubey
9ddbf2c361 MDEV-10944: GALERA log-slave-updates FAIL after upgrading from 10.1.17 to 10.1.18
thd->variables.option_bits need to be restored after
plugin_thdvar_init() during post initialization of
wsrep threads.
2016-11-07 11:53:58 -05:00
Nirbhay Choubey
9d89c182bc MDEV-9312: storage engine not enforced during galera cluster replication
Postfix: The pre-initialization of wsrep threads is not needed
for mysqldump sst method.
2016-11-07 11:53:57 -05:00
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