Commit graph

175362 commits

Author SHA1 Message Date
Igor Babaev
f4d6f26a4f Fixed bug mdev-11315.
There were no implementations for the virtual functions
exclusive_dependence_on_table_processor and
exclusive_dependence_on_table_processor. As a result
the procedure pushdown_cond_for_derived erroneously
detected some conditions with outer references as pushable
into materialized view / derived table.
2016-11-22 17:19:29 -08:00
Oleksandr Byelkin
779d416a99 MDEV-10724 Assertion `vcol_table == 0 || vcol_table == table' failed in fill_record(THD*, TABLE*, List<Item>&, List<Item>&, bool, bool)
Attempt to insert in several tables now checked just by table map.
2016-11-22 13:53:17 +01:00
Nirbhay Choubey
4a27ab23cb MDEV-10792: Assertion `thd->mdl_context.is_lock_owner ..
.. (MDL_key::TABLE, table->db, table->table_name, MDL_SHARED)'
failed in mysql_rm_table_no_locks

Reset error flag after temporary table has been
successfully dropped.
2016-11-21 17:14:14 -05:00
Nirbhay Choubey
ebe061900b MDEV-10442: "Address already in use" on restart
SST processes should inherit mysqld's process group.
2016-11-21 16:20:10 -05:00
Nirbhay Choubey
44ccb8f29e MDEV-10432: Post-fix after merging PR#205 2016-11-21 15:38:33 -05:00
Bernard Spil
cf1b0c1ace Implement native/base process checks for FreeBSD
- Make rsync process checks OS-dependent
  - Use (BSD) netstat on FreeBSD (not lsof)
2016-11-21 15:38:33 -05:00
Bernard Spil
f16ead51fb POSIX-ify wsrep scripts
- Replace #!/bin/bash with #!/bin/sh
  - Split username:password using POSIX compat %% and ##
  - Don't use array for FILTERS
  - Replace == tests with POSIX-compat =
2016-11-21 15:38:33 -05:00
Igor Babaev
665045f985 Fixed bug mdev-11081.
The idea of this fix was taken from the patch by Roy Lyseng
for mysql-5.6 bug iBug#14740889: "Wrong result for aggregate
functions when executing query through cursor".

Here's Roy's comment for his patch:
"
The problem was that a grouped query did not behave properly when
executed using a cursor. On further inspection, the query used one
intermediate temporary table for the grouping.
Then, Select_materialize::send_result_set_metadata created a temporary
table for storing the query result. Notice that get_unit_column_types()
is used to retrieve column meta-data for the query. The items contained
in this list are later modified so that their result_field points to
the row buffer of the materialized temporary table for the cursor.
But prior to this, these result_field objects have been prepared for
use in the grouping operation, by JOIN::make_tmp_tables_info(), hence
the grouping operation operates on wrong column buffers.

The problem is solved by using the list JOIN::fields when copying data
to the materialized table. This list is set by JOIN::make_tmp_tables_info()
and points to the columns of the last intermediate temporary table of
the executed query. For a UNION, it points to the temporary table
that is the result of the UNION query.

Notice that we have to assign a value to ::fields early in JOIN::optimize()
in case the optimization shortcuts due to a const plan detection.

A more optimal solution might be to avoid creating the final temporary
table when the query result is already stored in a temporary table.
"
The patch does not contain a test case, but the description of the
problem corresponds exactly what could be observed in the test
case for mdev-11081.
2016-11-21 10:33:39 -08:00
Kristian Nielsen
022aeda4c0 Attempt to fix strange rpm dependency issue following prior patch 2016-11-21 08:24:10 +01:00
Sergei Petrunia
58532f36d0 Update the testcase for MDEV-10330
Instead of restart_mysqld.inc, truncate the P_S tables that are used
by the test. We don't want to query some irrelevant data.
2016-11-21 02:32:48 +03:00
Kristian Nielsen
f77bd5faf5 Fix use of require in mysql-test-run.
The motivation for this is that Perl is moving towards not having
current directory ./ in @INC by default. This is causing
mysql-test-run.pl to fail in latest Debian Unstable:

  https://lists.debian.org/debian-devel-announce/2016/08/msg00013.html

However, we have `use "lib"`, there is no need for current directory
in @INC, except for a gross hack. In mtr_cases.pm, there is a
`require "mtr_misc.pl"`, which hides mtr_misc.pl away in mtr_cases
namespace. And things only work because mysql-test-run.pl loads it
with a different name, `require "lib/mtr_misc.pl"`! (Perl will
`require` only once for each unique filename).

Fix this by only using `require` in main program, and referencing
functions with :: scope from other namespaces. For multi-use in
different namespaces, proper `use` modules should be used.

Signed-off-by: Kristian Nielsen <knielsen@knielsen-hq.org>
2016-11-20 14:52:49 +02:00
Otto Kekäläinen
d49cffa124 Deb: provide the libmysqlclient shim packages that exist in Debian/Ubuntu
This way all 3rd party apps configured to build against any MySQL or
MariaDB version will pick up the libmariadb3-dev package instead.
2016-11-20 10:51:39 +02:00
Otto Kekäläinen
dcfe6cb834 Deb: make libmariadb3 to provide the libmariadbclient.so.18 link
In Debian many existing applications in Debian/Ubuntu have been built
while libmariadbclient-dev or libmariadbclient-dev-compat was installed.

To satisfy installation dependencies, the package name libmariadbclient18
must be provided, and at runtime a shared library must by the name
libmariadbclient.so.18.

Provide these to remain backwards compatible.
2016-11-20 10:51:14 +02:00
Otto Kekäläinen
2bcc16c17b Deb: rename client library packages to reflect its contents
The new library name libmariadb3 matches the libmariadb.so.3 filename.
Packages that want to build against MariaDB Connector C have as
build-dependency libmariadb-dev and as run-time dependency libmariadb3.

Make the package provide libmariadbclient18 for backwards compatibility,
though compatibility is not always assured. There library did change
to a whole new generation after all, even though ABI compatibility has
been a design goal.

Also do the equivalent change for the -dev package. Packages that
explicitly want to use the MariaDB Connector C should mark it as
their build-depends.

Also provide an empty libmariadbclient18 metapackage to facilitate
upgrades from old MariaDB installs, just like there is an empty
libmysqlclient18 package. Create more of these in the future as needed.
2016-11-20 10:49:12 +02:00
Otto Kekäläinen
54bd67a4ed Deb: provide the default-mysql-* packages that exist in Debian/Ubuntu
Since Debian 9 (Stretch) and Ubuntu 16.10 (Yakkety) the following
packages have existed:
* virtual-mysql-client
* virtual-mysql-client-core
* virtual-mysql-server
* virtual-mysql-server-core
* virtual-libmysqlclient-dev

They are metapackages that in Debian depend on MariaDB and in
Ubuntu currently on MySQL. We need to provide them and point
them to MariaDB so that systems that have the mariadb.org
repositories enabled automatically get everything MariaDB
and not MySQL.

This change makes the packaging provide the four first ones,
and later commits will fix the client library issues.
2016-11-20 10:49:12 +02:00
Otto Kekäläinen
df8ba7a3a7 Deb: install GSSAPI and Cracklib config files 2016-11-20 10:49:12 +02:00
Otto Kekäläinen
68535b5649 Deb: correct comment about socket auth in Spider/Mroong maintainer scripts 2016-11-20 10:49:11 +02:00
Sergei Petrunia
039bab2290 Undo the unfinished patch for MDEV-8359:
Patch b8b1b928ff was pushed by mistake
2016-11-20 00:26:40 +03:00
Alexander Barkov
e0fc6dc8bd Merge pull request #244 from hholzgra/hartmut-MDEV-726
MDEV-726 - CREATE and ALTER SERVER need to lowercase host name
2016-11-19 12:59:22 +04:00
Otto Kekäläinen
45049864b4 Deb: install libmysqld.so and libmysqld.so.19 in correct packages
The versioned so-file belongs to the run-time package and the unversioned
symlink shall be in the development package.
2016-11-18 22:12:50 +02:00
Sergei Petrunia
a4dc9561ee MDEV-10330: main.show_explain_ps fails sporadically in buildbot
The reason is that selecting from events_waits_history_long creates
a race condition: it can happen that SHOW EXPLAIN thread was kicked
off CPU exactly after posting a SHOW EXPLAIN request and then it wont
need to wait.

It doesn't seem to make sense to add more waits to stabilize the testcase.
Let's instead make a check that SHOW EXPLAIN statement has a
"stage/sql/show explain" stage.
2016-11-18 22:46:54 +03:00
Sergei Petrunia
d66e1119d3 Merge branch '10.2' of github.com:MariaDB/server into 10.2 2016-11-18 22:33:25 +03:00
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
Sergei Petrunia
dace5f9a2f Merge branch '10.2' of github.com:MariaDB/server into 10.2 2016-11-16 19:51:22 +03: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