Commit graph

182098 commits

Author SHA1 Message Date
Jan Lindström
93b3a48436 MDEV-15672: encryption.innodb_encryption_filekeys - typo in I_S column name: ENCRYPTION_SHCEME
Fixed typo on select that is executed only when something unexpected
happens.
2018-04-13 12:50:03 +03:00
Jan Lindström
71ceed7523 MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Use block->page.offset for checking page number.
2018-04-13 09:45:29 +03:00
Jan Lindström
f638c37abe MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Use block->page.offset for checking page number.
2018-04-13 09:44:28 +03:00
Jan Lindström
3855943fe0 MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Use block->page.offset for checking page number.
2018-04-13 09:25:52 +03:00
Jan Lindström
82e968197a MDEV-15580: Assertion `!lex->explain' failed in lex_start(THD*):
Problem was that we did not delete explain information
when Galera must replay a query.

Could not find easily repeatable test case that would not
cause other problems.
2018-04-13 08:20:02 +03:00
Jan Lindström
fe20fe0d0a MDEV-15580: Assertion `!lex->explain' failed in lex_start(THD*):
Problem was that we did not delete explain information
when Galera must replay a query.

Could not find easily repeatable test case that would not
cause other problems.
2018-04-13 07:40:34 +03:00
Jan Lindström
e341da4711 MDEV-15580: Assertion `!lex->explain' failed in lex_start(THD*):
Problem was that we did not delete explain information
when Galera must replay a query.

Could not find easily repeatable test case that would not
cause other problems.
2018-04-13 07:35:55 +03:00
Sergei Petrunia
d13e3547e4 MDEV-14460: Memory leak with only SELECT statements
Cherry-pick this fix from the upstream:
commit 6ddedd8f1e0ddcbc24e8f9a005636c5463799ab7
Author: Sergei Petrunia <psergey@askmonty.org>
Date:   Tue Apr 10 11:43:01 2018 -0700

    [mysql-5.6][PR] Issue #802: MyRocks: Statement rollback doesnt work correctly for nes…

    Summary:
    …ted statements

    Variant #1: When the statement fails, we should roll back to the latest
    savepoint taken at the top level.
    Closes https://github.com/facebook/mysql-5.6/pull/804

    Differential Revision: D7509380

    Pulled By: hermanlee

    fbshipit-source-id: 9a6f414
2018-04-13 01:56:01 +03:00
Sergei Golubchik
479fb6c1e9 ./mtr --client-gdb
followup for 339b905579

don't use $opt_gdb for --client-gdb
2018-04-12 21:20:17 +02:00
Sergei Golubchik
1f6bd88c24 MDEV-15728 main.thread_id_overflow fails in ps-protocol
mark CONNECTION_ID() as returning *unsigned* number
2018-04-12 21:20:02 +02:00
Sergei Golubchik
41983fd3b1 MDEV-15788 versioning.partition, versioning.rpl fail on most windows builds in buildbot
fix versioning.partition failures:
* Make the test stable by setting timestamp to fixed values.
2018-04-12 21:20:02 +02:00
Jacob Mathew
12e2d03948 MDEV-15692: install_spider.sql can fail with some collations
The error occurs because of how the character set and collation are chosen for
stored procedure parameters that have a character data type.  If the character
set and collation are not explicitly stated in the declaration, the server
chooses the database character set and collation in effect at routine creation
time.

To fix the problem, I added explicit character set and collation attributes
for the stored procedure parameters in the install_spider.sql script.

Author:
  Jacob Mathew.

Reviewer:
  Kentoku Shiba.

Cherry-Picked:
  Commit ff0bf451db on bb-10.3-MDEV-15692
2018-04-12 12:14:12 -07:00
Jacob Mathew
09eb313375 MDEV-15692: install_spider.sql can fail with some collations
The error occurs because of how the character set and collation are chosen for
stored procedure parameters that have a character data type.  If the character
set and collation are not explicitly stated in the declaration, the server
chooses the database character set and collation in effect at routine creation
time.

To fix the problem, I added explicit character set and collation attributes
for the stored procedure parameters in the install_spider.sql script.

Author:
  Jacob Mathew.

Reviewer:
  Kentoku Shiba.

Merged From:
  bb-10.3-MDEV-15692
2018-04-12 11:57:29 -07:00
Vladislav Vaintroub
18e8d420b7 Feedback plugin - MSI installation checkbox switched to OFF again.
It was on for alpha stages of 10.3, and now we're past that.
2018-04-12 16:50:33 +01:00
Vladislav Vaintroub
c2dc72c0c3 MDEV-15779 - mariabackup incremental prepare fails on CIFS mount.
CIFS does not like O_DIRECT flag (it is set successfully, but pread would
fail).

The fix is not to use O_DIRECT, there is not need for it.
posix_fadvise() was used already that should prevent buffer cache
pollution on Linux.

As recommended by documentation of posix_fadvise(), we'll also fsync()
tablespaces after a batch of writes.
2018-04-12 12:09:32 +01:00
Vladislav Vaintroub
15071226a0 MDEV-15780 : Mariabackup with absolute paths in innodb_data_file_path
System tablespace can be specified with absolute path, if innodb_data_home_dir
is empty.

This was not handled well  by mariabackup

1. In backup phase, empty innodb_data_home_dir variable from server was
not recognized. full paths were stored in backup-my.ini, even if
it stored all files locally. thus prepare phase would not find the system
tablespace files.

2. In copy-back phase, copy would not be done to the absolute destination
path, as path would be stripped with trim_dotslash

This patch fixes the above defects.
2018-04-12 11:15:27 +01:00
Vicențiu Ciorbaru
65eefcdc60 Merge remote-tracking branch '10.2' into 10.3 2018-04-12 12:41:19 +03:00
Jan Lindström
9c42b9038d MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Problem was that if tablespace was encrypted we try to copy
also page 0 from read buffer to write buffer that are in
that case the same memory area.

fil_iterate
	When tablespace is encrypted or compressed its
        first page (i.e. page 0) is not encrypted or
	compressed and there is no need to copy buffer.
2018-04-12 11:20:47 +03:00
Jan Lindström
36c0116720 MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Problem was that if tablespace was encrypted we try to copy
also page 0 from read buffer to write buffer that are in
that case the same memory area.

fil_iterate
	When tablespace is encrypted or compressed its
        first page (i.e. page 0) is not encrypted or
	compressed and there is no need to copy buffer.
2018-04-12 11:19:27 +03:00
Jan Lindström
0ae13b51d7 MDEV-12632: Source and destination overlap in memcpy, encryption.innodb-discard-import-change fails in buildbot with valgrind
Problem was that if tablespace was encrypted we try to copy
also page 0 from read buffer to write buffer that are in
that case the same memory area.

fil_iterate
	When tablespace is encrypted or compressed its
        first page (i.e. page 0) is not encrypted or
	compressed and there is no need to copy buffer.
2018-04-12 11:00:48 +03:00
Jan Lindström
2f1f160979 MDEV-12903: encryption.innodb_encryption_discard_import fails in buildbot with FOUND vs NOT FOUND
Wait until rotation has ended and shutdown before grep to make sure
that dirty pages are on datafiles.
2018-04-12 08:39:19 +03:00
Jan Lindström
9518ddd1fb MDEV-12903: encryption.innodb_encryption_discard_import fails in buildbot with FOUND vs NOT FOUND
Wait until rotation has ended and shutdown before grep to make sure
that dirty pages are on datafiles.
2018-04-12 08:04:02 +03:00
Vicențiu Ciorbaru
93aded05ea Use same connection convention of specifying IPs
If we use hostnames, it will fail during name resolution on UNIX systems
2018-04-12 03:26:39 +03:00
Vicentiu Ciorbaru
990283b65c Fix perfschema.hostcache_ipv4_max_con
Also fix perfschema.hostcache_ipv6_max_con.
The test case makes use of a debug switch to execute some special code.
The code does hostname replacement. Every hostname sent during connect
phase becomes santa.claus.ipv4.example.com (or ipv6). This causes a
connection from root@localhost to fail, as root is not registered as
santa claus user. The failure is only apparent on Windows as Unix
systems make use of sockets, which bypass the name resolution check
entirely.
2018-04-12 02:39:28 +03:00
Vladislav Vaintroub
4c7a1a1b9e MDEV-15780 : mariabackup does not handle absolute names in for system tablespaces
Fix 10.2-specific bug - copy-back is not prepared to handle system
tablespaces with absolute path.
2018-04-11 23:25:45 +01:00
Vladislav Vaintroub
d98514690f Make mroonga respect -DWITHOUT_DYNAMIC_PLUGINS.
Return early if plugin is not built.
2018-04-11 15:45:30 +01:00
Jan Lindström
c6c679e947
Merge pull request #700 from codership/MDEV-15804
MDEV-15804 Fix and re-enable MTR test galera.pxc-421
2018-04-11 16:19:59 +03:00
Jan Lindström
8be2c72bd5
Merge pull request #699 from codership/MDEV-15808
MDEV-15808 Fix and re-enable test galera.galera_gra_log
2018-04-11 15:53:46 +03:00
Daniele Sciascia
4dc60dc3f1 MDEV-15804 Fix and re-enable MTR test galera.pxc-421
This patch makes two changes:

* Remove unnecessary `set SESSION wsrep_sync_wait=0`.
  Disabling `wsrep_sync_wait` caused the test to fail occasionally,
  due to subsequent `SELECT`s observing stale values.

* Remove redundant `--source include/galera_wait_ready.inc`,
  `galera_wait_ready.inc` is already included in the above
  `wait_until_connected_again.inc`
2018-04-11 14:24:39 +02:00
Jan Lindström
91245909a2 MDEV-12903: encryption.innodb_encryption_discard_import fails in buildbot with FOUND vs NOT FOUND
Wait until rotation has ended and shutdown before grep to make sure
that dirty pages are on datafiles.
2018-04-11 14:06:29 +03:00
Sergey Vojtovich
226ec99a3e MDEV-15510 - storage/oqgraph: Quench warnings with Boost 1.66
Moved Boost configuration definitions before first inclusion of Boost
headers to avoid re-definition.
2018-04-11 14:22:10 +04:00
Daniele Sciascia
73b3ace8b2 MDEV-15808 Fix and re-enable test galera.galera_gra_log
Test would occasionally fail as follows:

```
mysqltest: At line 20: query 'SELECT COUNT(*) = 0 FROM t1' failed:
1317: Query execution was interrupted

```

This was due to a `CREATE TABLE` applied concurrently that would
occasionally cause the `SELECT` to be BF aborted, due to MDL
conflict.

The `SELECT` is executed while `wsrep_on=OFF`. The change makes sure
it is executed only after wsrep is enabled again.
2018-04-11 09:14:35 +02:00
Marko Mäkelä
dd127799bc MDEV-15832 With innodb_fast_shutdown=3, skip the rollback of connected transactions
row_undo_step(): If innodb_fast_shutdown=3 has been requested,
abort the rollback of any non-DDL transactions. Starting with
MDEV-12323, we aborted the rollback of recovered transactions. The
transactions would be rolled back on subsequent server startup.

trx_roll_report_progress(): Renamed from trx_roll_must_shutdown(),
now that the shutdown check has been moved to the only caller.

trx_commit_low(): Allow mtr=NULL for transactions that are aborted
on rollback.

trx_rollback_finish(): Clean up aborted transactions to avoid
assertion failures and memory leaks on shutdown. This code was
previously in trx_rollback_active().

trx_rollback_to_savepoint_low(), trx_rollback_for_mysql_low():
Remove some redundant assertions.
2018-04-11 05:39:36 +03:00
Igor Babaev
740fc2ae08 Fixed mdev-15765 BETWEEN not working in certain cases
The implementations of the convert_to_basic_const_item() virtual
function for the Item_cache classes should call cache_value() when
value_cached == NULL.
2018-04-10 18:07:29 -07:00
Vladislav Vaintroub
8334aced00 MDEV-14380 Reduce possibility to timing-induced error in test
Also, shorten the test so it usually runs 2 seconds, not 3.
2018-04-10 16:17:15 +01:00
Vicențiu Ciorbaru
45e6d0aebf Merge branch '10.1' into 10.2 2018-04-10 17:43:18 +03:00
Vicențiu Ciorbaru
2e91eb7547 Fix warnings in InnoDB & XtraDB post MDEV-14705
There was a missing argument to service_manager_extend_timeout call
and the signness of arguments did not match.
2018-04-10 17:34:56 +03:00
Alexander Barkov
9e9ea4f64a MDEV-15821 Row format replication from LONGBLOB COMPRESSED to LONGBLOB does not work 2018-04-10 15:34:20 +04:00
Sergei Golubchik
9bd3af97df MDEV-15413 Unexpected errors upon CREATE TABLE .. WITH SYSTEM VERSIONING AS SELECT ...
numerous fixes for CREATE ... SELECT with system versioning:
In CREATE ... SELECT the table is created based on the result set,
field properties do not count. That is
* field invisibility is *not* copied over
* AS ROW START/END is *not* copied over
* the history is *not* copied over
* system row_start/row_end fields can *not* be created from the SELECT part
2018-04-10 13:12:36 +02:00
Aleksey Midenkov
72dd813f7e MDEV-15427 IB: TRX_ID based operations inside transaction generate history
[closes tempesta-tech#472]
2018-04-10 13:12:36 +02:00
Sergei Golubchik
a4251d6f18 MDEV-15391 Server crashes in JOIN::fix_all_splittings_in_plan or Assertion `join->best_read < double(1.79...e+308L)' failed
vers_setup_conds() used to AND all conditions on row_start/row_end
columns and store it either in the WHERE clause or in the ON
clause for some table. In some cases this caused ON clause
to have conditions for tables that aren't part of that ON's join.

Fixed to put a table's condition always in the ON clause of the
corresponding table.

Removed unnecessary ... `OR row_end IS NULL` clause, it's not needed
in the ON clause.

Simplified handling on PS and SP.
2018-04-10 13:12:36 +02:00
Sergei Golubchik
1a86fc5f14 MDEV-15378 Valid query causes invalid view definition due to syntax limitation in FOR SYSTEM_TIME
fix parsing of the AS OF clause
2018-04-10 13:12:36 +02:00
Eugene Kosov
bb56a06d26 MDEV-15062 Information Schema COLUMNS Table does not show system versioning information
get_schema_column_record(): print 'WITHOUT SYSTEM VERSIONING` in 'EXTRA'
for such fields
2018-04-10 13:12:36 +02:00
Sergei Golubchik
339b905579 ./mtr --gdb='b mysql_parse;r'
--gdb now accepts an argument, it will be passed to gdb as a command.
multiple commands can be separated by a (non-standard and not escapable)
delimiter - semicolon (;).

Old usage with a bare --gdb continues to work too, of course.
2018-04-10 13:12:36 +02:00
Sergei Golubchik
041e9de6f8 wording: don't prohibit 2018-04-10 13:12:36 +02:00
Aleksey Midenkov
689f83d0ce MDEV-14790 System versioning for system tables does not work as expected
disallow system versioning for tables in mysql database
2018-04-10 13:12:36 +02:00
Sergei Golubchik
dba43f4bec fix comparison of row_start/row_end 2018-04-10 13:12:36 +02:00
Sergei Golubchik
08a901cc0b cleanup: remove XString::operator== and !=
use named methods instead.
2018-04-10 13:12:36 +02:00
Sergei Golubchik
0dcb47cae9 change lex_string_eq to return what it says
the function xxx_eq(a,b) returns true if two elements
are equal and false if they are not.
2018-04-10 13:12:36 +02:00
Sergei Golubchik
479bd5a6fe improve strmake_buf() to detect wrong usage reliably
strmake_buf() macro should only be used with char[] arrays,
and never with char* pointers. To distinguish between the two
we create a new variable of the same type and initialize it
using array initializer, this causes compilation failure
with pointers. The variable is unused and will be removed by the
compiler. It's enough to do this check only with gcc, so
it doesn't have to be portable.
2018-04-10 13:12:36 +02:00