Commit graph

172908 commits

Author SHA1 Message Date
Monty
981b474753 Updated configure.pl to new plugin syntax
--with-plugin-name=xxxx
--with-plugins= now uses =AUTO instead of =1
2015-11-20 09:57:58 +02:00
Nirbhay Choubey
f47124c9ef Incorrect statements binlogged on slave with do_domain_ids=(...)
In domain ID based filtering, a flag is used to filter-out
the events that belong to a particular domain. This flag gets
set when IO thread receives a GTID_EVENT for the domain on
filter list and its reset at the last event in the GTID group.
The resetting, however, was wrongly done before the decision to
write/filter the event from relay log is made. As a result, the
last event in the group will always pass through the filter.
Fixed by deferring the reset logic. Also added a test case.
2015-11-18 02:11:20 -05:00
Alexey Botchkov
836275bb20 MDEV-4829 BEFORE INSERT triggers dont issue 1406 error.
Turn the 'abort_on_warning' on for assigning value to fields.
2015-11-17 22:09:42 +04:00
Monty
905613f825 Fixed wrong tests found by buildbot 2015-11-17 18:19:59 +02:00
Oleksandr Byelkin
19d99faf1e MDEV-8734 mysqlbinlog --start-position isn't bigint
fix it only for local operations.
2015-11-17 14:42:21 +01:00
Jan Lindström
c0216f1d02 MDEV-9099: Test encryption.innodb_encryption_discard_import fails on buildbot 2015-11-17 09:46:40 +02:00
Sergei Golubchik
3228ad33f0 MDEV-8973 Build failure on missing alloca.h
in *BSD family alloca() is in stdlib.h
2015-11-16 07:55:55 +01:00
Sergei Golubchik
0c5f36d579 MDEV-8969 groonga is compiled even with -DPLUGIN_MROONGA=NO
first add mroonga plugin (MYSQL_ADD_PLUGIN) then add dependent
targets (add_subdirectory(groonga))
2015-11-16 07:55:55 +01:00
Sergei Golubchik
12c32bd989 MDEV-8962 TokuDB tries to build on OS X, even when disabled in compile flag
first add tokudb plugin (MYSQL_ADD_PLUGIN) then add dependent
targets (ADD_SUBDIRECTORY(ft-index))
2015-11-16 07:55:55 +01:00
Sergei Golubchik
296338147c MDEV-8453 Alter table not returning engine errors
remove ~15 years old print_lock_error() function, use
handler::print_error() instead
2015-11-16 07:55:55 +01:00
Sergei Golubchik
daf3551cce add missing DBUG_RETURN-s 2015-11-16 07:55:55 +01:00
Sergei Golubchik
2e0ac16827 remove obsolete workaround
The workaround is not needed anymore - mariadb requires bison 2.x.

And removing all __attribute__ in sql_yacc.yy breaks
new DBUG_ENTER.
2015-11-16 07:55:55 +01:00
Sergei Golubchik
da957310d0 compiler warning (no return in non-void function) 2015-11-16 07:55:55 +01:00
Sergei Golubchik
29dd634a4c dbug: correct trace for DBUG_RETURN(func()); -- gcc only
when func1 calls func2 from DBUG_RETURN, dbug shows the trace as
| > func1
| < func1
| > func2
| < func2
because DBUG_LEAVE happens before func2(). Change that to invoke
DBUG_LEAVE when the local variable goes out of scope. This uses
gcc specific __attribute__((cleanup)).
2015-11-16 07:55:55 +01:00
Sergei Golubchik
8f60656fd5 MDEV-9039 Can't upgrade MariaDB to to 10.1.8 version from 10.0.21
Don't mark the SEQUENCE engine as XA-capable. The engine never
registers itself for any transaction, so it doesn't matter
whether it is XA-capable or not. The only effect of being
"XA-capable" is breaking the "number of XA-capable engines"
check of TC_LOG_MMAP.
2015-11-16 07:55:55 +01:00
Sergei Golubchik
a716433da3 MDEV-7298 plugins.cracklib_password_check test fails
remove the test that depended on the current cracklib dictionary
2015-11-16 07:55:55 +01:00
Sergei Golubchik
4165961d54 disable innodb on sol10-64
because buildbot config invokes BUILD/compile-solaris-amd64
with the --extra-args=--without-plugin-innodb argument, but
BUILD/compile-solaris-amd64 doesn't take arguments and doesn't
invoke configure.pl, so this extra-args is lost.
2015-11-16 07:55:55 +01:00
Oleksandr Byelkin
0dfa0eef59 MDEV-8957 [PATCH] Useless ssl_ctx_set_tmp_dh call in libmysql
Accepted patch of Georg: do not setup Differ-Hellman parameters on client.
2015-11-15 10:44:20 +01:00
Kristian Nielsen
d85490afab Merge branch 'bb-10.1-knielsen' into 10.1 2015-11-14 10:19:53 +01:00
Monty
1774230c24 Fixed regexp to fix buildbot failures 2015-11-13 19:47:31 +02:00
Kristian Nielsen
e46c8bbf62 Merge branch 'mdev7818-4' into bb-10.1-knielsen
Conflicts:
	sql/sql_parse.cc
2015-11-13 15:32:55 +01:00
Kristian Nielsen
d5d87c98c0 Fix embedded server build after MDEV-7818 patch 2015-11-13 15:30:37 +01:00
Kristian Nielsen
8f2e05f41c Merge branch 'mdev7818-4' into 10.1
Conflicts:
	mysql-test/suite/perfschema/r/stage_mdl_global.result
	sql/rpl_rli.cc
	sql/sql_parse.cc
2015-11-13 14:24:40 +01:00
Elena Stepanova
1e63a81a3b Follow-up for a change MDEV-9040: fixed the 32-bit rdiff 2015-11-13 15:07:45 +02:00
Kristian Nielsen
ba02550166 MDEV-7818: Deadlock occurring with parallel replication and FTWRL
Problem is that FLUSH TABLES WITH READ LOCK first blocks threads from
starting new commits, then waits for running commits to complete. But
in-order parallel replication needs commits to happen in a particular
order, so this can easily deadlock.

To fix this problem, this patch introduces a way to temporarily pause
the parallel replication worker threads. Before starting FTWRL, we let
all worker threads complete in-progress transactions, and then
wait. Then we proceed to take the global read lock. Once the lock is
obtained, we unpause the worker threads. Now commits are blocked from
starting by the global read lock, so the deadlock will no longer occur.
2015-11-13 14:02:15 +01:00
Kristian Nielsen
6d96fab7dd MDEV-7818: Deadlock occurring with parallel replication and FTWRL
Preparation patch, moving the GCO wait into a separate function, in
preparation for adding a separate wait phase for FLUSH TABLES WITH
READ LOCK.
2015-11-13 14:02:14 +01:00
Kristian Nielsen
75dc267101 Change Seconds_behind_master to be updated only at commit in parallel replication
Before, the Seconds_behind_master was updated already when an event
was queued for a worker thread to execute later. This might lead users
to interpret a low value as the slave being almost up to date with the
master, while in reality there might still be lots and lots of events
still queued up waiting to be applied by the slave.

See https://lists.launchpad.net/maria-developers/msg08958.html for
more detailed discussions.
2015-11-13 10:24:53 +01:00
Elena Stepanova
2828c2be55 MDEV-9124 mysqldump does not dump data if table name is same as view earlier on
While querying INFORMATION SCHEMA, check for a table's engine
only used table name, but not schema name; so, if there were different
rows with the same table name, a wrong one could be retrieved.
The result of the check affected the decision whether the contents
of the table should be dumped, and whether a DELAYED option can be used.
Fixed by adding a clause for table_schema to the query.
2015-11-13 03:23:22 +02:00
Vladislav Vaintroub
a430df3aba Fix compile error on Windows
Using __attribute__  needs my_attribute.h include
2015-11-10 17:47:39 +01:00
Monty
3f24cf2dbd Don't delete non existing .TMD and .OLD files for Aria internal temporary tables
(Simple speedup)
2015-11-10 13:47:28 +02:00
Monty
65151e0cd1 Change stage_copying_to_tmp_table to stage_creating_tmp_table like in MySQL.
(We where using stage_copying_to_tmp_table twice)
2015-11-10 13:46:57 +02:00
Monty
2f63e2e2a0 MDEV-8426 mysqlbinlog: "Corrupted replication event was detected.
Not printing the value" with binlog-row-image=minimal"

Merged Rows_log_event::print_verbose_one_row() and log_event_print_value()
with MySQL 5.7
Added flush after writing of Table_map_log_event() to fix wrong order of
lines in output. This causes a lot of changes in some test results.
2015-11-10 13:46:57 +02:00
Monty
78771189e7 Ignore MySQL 5.7 log events not relevant for MariaDB
- XA
- Transaction_context_event (used by MysQL group replication)
- View change event (used by MysQL group replication)
2015-11-10 13:46:57 +02:00
Monty
78ffeaa988 Fix that one can run rpl_binlog_errors with --debug 2015-11-10 13:46:57 +02:00
Monty
05ed9fec03 Use MEM_CHECK_DEFINED to check if blocks contain uninitialized data
Fixed failure in tests when running optimized code
- Some assert() was using code that had to be executed
Fixed copying of some uninitialized data (fixed valgrind warning)
2015-11-10 13:46:57 +02:00
Monty
e3868ee072 Don't store vcol bitmaps in TABLE if table doesn't have virtual fields.
(Makes TABLE a bit smaller)
2015-11-10 13:46:57 +02:00
Monty
93d1e5ce0b table->write_set was changed if binary logging was used, which caused the
changes in query execution plans.
Fixed by introducing table->rpl_write_set which holds which columns should
be stored in the binary log.

Other things:
- Removed some not needed references to read_set and write_set to make
  code really changing read_set and write_set easier to read
  (in opt_range.cc)
- Added error handling of failed unpack_current_row()
- Added missing call to mark_columns_needed_for_insert() for DELAYED INSERT
- Removed not used functions in_read_set() and in_write_set()
- In rpl_record.cc, removed not used variable error
2015-11-10 13:46:56 +02:00
Monty
cb4737cb4e Fixed compiler warning 2015-11-10 13:46:56 +02:00
Monty
7cd2095cde Sage cleanup in heap storage engine
Removed old not needed code withing #if
Changed 0x%lx to %p
2015-11-10 13:46:56 +02:00
Nirbhay Choubey
7ec6558503 MDEV-9021: MYSQLD SEGFAULTS WHEN BUILT USING --WITH-MAX-INDEXES=128
The bitmap implementation defines two template Bitmap classes. One
optimized for 64-bit (default) wide bitmaps while the other is used for
all other widths.

In order to optimize the computations, Bitmap<64> class has defined its
own member functions for bitmap operations, the other one, however,
relies on mysys' bitmap implementation (mysys/my_bitmap.c).

Issue 1:
In case of non 64-bit Bitmap class, intersect() wrongly reset the
received bitmap while initialising a new local bitmap structure
(bitmap_init() clears the bitmap buffer) thus, the received bitmap was
getting cleared.

Fixed by initializing the local bitmap structure by using a temporary
buffer and later copying the received bitmap to the initialised bitmap
structure.

Issue 2:
The non 64-bit Bitmap class had the Iterator missing which caused
compilation failure.

Also added a cmake variable to hold the MAX_INDEXES value when supplied
from the command prompt. (eg. cmake .. -DMAX_INDEXES=128U). Checks have
been put in place to trigger build failure if MAX_INDEXES value is
greater than 128.

Test modifications:
* Introduced include/have_max_indexes_[64|128].inc to facilitate
skipping of tests for which the output differs with different
MAX_INDEXES.

* Introduced include/max_indexes.inc which would get modified by cmake
to reflect the MAX_INDEXES value used to build the server. This file
simply sets an mtr variable '$max_indexes' to show the MAX_INDEXES
value, which will then be consumed by the above introduced include file.

* Some tests (portions), dependent on MAX_INDEXES value, have been moved
to separate test files.
2015-11-09 09:28:00 -05:00
Daniel Black
d6b430c91b MDEV-8995: systemd - 16K open-files-limit by default 2015-11-07 13:40:44 +11:00
Nirbhay Choubey
99283ba455 MDEV-8974: boostrap systemd service for galera is confusing
Fix the conditions for systemd scripts with '@' in path.
2015-11-06 20:02:45 -05:00
Elena Stepanova
125cf485b1 Fixed engine test results in accordance with changes made in scope of
commit 6b20342651
2015-11-06 17:52:57 +02:00
Sergei Petrunia
4e421687c2 Merge pull request #112 from openquery/MDEV-8981
MDEV-8981: Analyze stmt - cycles can overflow
2015-11-06 16:35:00 +03:00
Sergey Vojtovich
b80cc31ab4 MDEV-9082 - Debian: mysql_install_db is called on upgrade
A comment in debian/mariadb-server-10.1.postinst says: "can safely run on
upgrades with existing databases". While this is true there're a few reasons not
to do that:
- it increases installation time (it has to run rather heavy mysqld multiple times)
- as well as it increases mysqld downtime
- it may fail if database has some plugin specific configs (see MDEV-8437)
- there should be no need to run this script on upgrade: they should be handled
  by mysql_upgrade to
- RPM postin doesn't call it if database directory exists

Also postinst is not supposed to create database directories: let
mysql_install_db do that intead.
2015-11-06 12:11:06 +04:00
Sergey Vojtovich
7f5e005d16 MDEV-9080 - Debian: incorrect empty password check in postinst
There was code that was supposed to "catch upgrades from previous versions where
the root password wasn't set". But it is wrong in many regards:
- it is supposed to be executed against running server, but at this point server
  should be down, which makes this code no-op
- if the above is fixed, root password will be requested twice (initial root
  password request + this one)
- it asks for a password only once, while "initial root password request" asks
  twice (password + password verification)
- it may give false positive if unix socket based authentication is in effect

Removed this code since it didn't work for quite a while (at least since
mysql-5.1) and nobody cared about it.
2015-11-06 12:11:06 +04:00
Sergey Vojtovich
60ad339840 MDEV-8437 - plugin variables conflict with bootstrap
There is no strong need to change password column: the only side effect is
that 4.0 -> 10.1 upgrades may get root/debian-sys-maint passwords stored in old
format. This should be perfectly acceptable, since all password at this point
are stored in old format.
2015-11-06 12:11:06 +04:00
Sergey Vojtovich
8e40f9b713 MDEV-8437 - plugin variables conflict with bootstrap
Removed redundant attempt to create mysql.plugin table:
- original code was supposed to INSTALL some plugins:
  INSERT INTO plugin VALUES ('innodb', 'ha_innodb.so'),
    ('federated', 'ha_federated.so'), ('blackhole', 'ha_blackhole.so'),
    ('archive', 'ha_archive.so');
- original code was supposed to fail if mysql.plugin exists:
  The query sequence is supposed to be aborted if the CREATE TABLE fails due
  to an already existent table in which case the admin might already have
  chosen to remove one or more plugins.
- mysql.plugin must've been created by preceeding mysql_install_db anyway
2015-11-06 12:11:05 +04:00
Nirbhay Choubey
5079d69d48 MDEV-8975: 10.1 Fails To Join Existing Galera Cluster
During the process of guessing the IP address, if bind-address
is INADDR_ANY, mysqld should proceed with address specified via
wsrep_node_address or use one from network interfaces.

Patch contributed by darkain (pull#115).
2015-11-05 21:52:19 -05:00
Jan Lindström
25f8738112 MDEV-9040: 10.1.8 fails after upgrade from 10.0.21
Analysis: Lengths which are not UNIV_SQL_NULL, but bigger than the following
number indicate that a field contains a reference to an externally
stored part of the field in the tablespace. The length field then
contains the sum of the following flag and the locally stored len.

This was incorrectly set to

define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE_MAX)

When it should be

define UNIV_EXTERN_STORAGE_FIELD (UNIV_SQL_NULL - UNIV_PAGE_SIZE_DEF)

Additionally, we need to disable support for > 16K page size for
row compressed tables because a compressed page directory entry
reserves 14 bits for the start offset and 2 bits for flags.
This limits the uncompressed page size to 16k. To support
larger pages page directory entry needs to be larger.
2015-11-05 10:30:48 +02:00