Commit graph

177049 commits

Author SHA1 Message Date
Vladislav Vaintroub
8bbeac0171 Fix AWS SDK build error on some buildbot builders.
Use older version of the SDK generally, because the newer ones break
with older cmake.

On Macs, use newer version, to fix mac specific the build error.
2017-04-20 13:39:02 +00:00
Daniel Black
9a91d743bb MDEV-12453: AWS SDK version failed to build on OSX
Update AWS SDK version from 1.0.8 to 1.0.100

Commit b64910ce27 (MDEV-12453)
enabled AWS_SDK to build correctly on buildbot.

Travis still had build faults like below despite many common elements
between the builds;

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstring:79:9: error: no member named 'strcoll' in the global namespace; did you mean 'strtoll'?
[ 24%] Building CXX object storage/rocksdb/CMakeFiles/rocksdblib.dir/rocksdb/db/internal_stats.cc.o
using ::strcoll;
      ~~^
/usr/include/stdlib.h:169:3: note: 'strtoll' declared here
         strtoll(const char *__str, char **__endptr, int __base);
         ^
2017-04-19 13:01:34 +02:00
Marko Mäkelä
571d4137bf Add IMPORT test for MDEV-12123 Page contains nonzero PAGE_MAX_TRX_ID 2017-04-19 08:17:41 +03:00
Marko Mäkelä
d0ef1aaf61 MDEV-12123 Page contains nonzero PAGE_MAX_TRX_ID
When MDEV-6076 repurposed the field PAGE_MAX_TRX_ID, it was assumed
that the field always was 0 in the clustered index of old data files.
This was not the case in IMPORT TABLESPACE (introduced in MySQL 5.6
and MariaDB 10.0), which is writing the transaction ID to all index
pages, including clustered index pages.

This means that on a data file that was at some point of its life
IMPORTed to an InnoDB instance, MariaDB 10.2.4 or later could interpret
the transaction ID as a persistent AUTO_INCREMENT value.

This also means that future changes that repurpose PAGE_MAX_TRX_ID
in the clustered index may cause trouble with files that were imported
at some point of their life.

There is a separate minor issue that InnoDB is writing PAGE_MAX_TRX_ID
to every secondary index page, even though it is only needed on leaf
pages. From now on we will write PAGE_MAX_TRX_ID as 0 to non-leaf pages,
just to be able to keep stricter debug assertions.

btr_root_raise_and_insert(): Reset the PAGE_MAX_TRX_ID field on non-root
pages of the clustered index, and on the no-longer-leaf root page of
secondary indexes.

AbstractCallback::is_root_page(): Remove. Use page_is_root() instead.

PageConverter::update_index_page(): Reset the PAGE_MAX_TRX_ID to 0
on other pages than the clustered index root page or secondary index
leaf pages.
2017-04-19 07:59:24 +03:00
Jacob Mathew
0b52b28b91 MDEV-10355 Weird error message upon CREATE TABLE with DEFAULT
Fixed handling of default values with cached temporal functions so that the
CREATE TABLE statement now succeeds.
Fixed virtual column session cleanup.
Fixed the error message.
Added quoting of date/time values in cases when this was omitted.
Added a test case in default.test.
Updated test result files.
2017-04-18 17:36:05 -07:00
Jacob Mathew
38af34bb21 MDEV-11117 CHECK constraint fails on intermediate step of ALTER
Fixed the bug by failing the statement with an error message that explains
that an auto-increment column may not be used in an expression for a
check constraint.
Added a test case in check_constraint.test.
Updated existing tests and results.
2017-04-17 15:32:44 -07:00
Marko Mäkelä
3a50fd9d2f Simplify page_is_comp(). 2017-04-17 03:20:38 +03:00
Marko Mäkelä
a039d6c3e6 Remove unused tokens from the InnoDB SQL parser.
PARS_INTEGER_TOKEN: Remove. The lexer returns only PARS_INT_TOKEN.

PARS_FIXBINARY_LIT, PARS_BLOB_LIT: Remove. These are never returned
by the lexer. In sym_tab_add_bound_lit(), use PARS_STR_LIT.
2017-04-17 03:20:34 +03:00
Marko Mäkelä
e5eef05140 Minor code cleanup.
dict_index_is_sec_or_ibuf(): Use a single arithmetic expression.

rtr_split_page_move_rec_list(): Remove a redundant condition on
dict_index_is_sec_or_ibuf(). This function is always invoked on
a spatial index, which also is a secondary index.
2017-04-17 03:20:34 +03:00
Marko Mäkelä
bb81828938 Use page_is_leaf() where applicable. 2017-04-17 03:20:34 +03:00
Marko Mäkelä
3849f8b2bb Fixup for MDEV-11995.
Adjust a test result. When a too long index prefix is truncated,
a note instead of a warning or error will be issued.
2017-04-17 03:18:21 +03:00
Daniel Black
eecce3d7c8 Travis: Test more suites, latest OSX
Remove clang-3.8 which doesn't have a repository on apt.llvm.org any
more.

For OSX, xcode8.3 is explicitly specified.

/usr/local/Cellar is used as a cache repository to save brew install
time on OSX (and /usr/local was too big).

Debian autobake.sh is moved to a matrix include.

Other branches of the matrix build test other test suites.
An Ubuntu galera is downloaded and used in the test suite.

TYPE=RelWithDebInfo used with the test to provide backtraces with line
numbers when crashes occur.

Build of PLUGIN_AWS_KEY_MANAGEMENT enabled in build.

Code supporting TYPE=Debug and -DWITH_ASAN=ON included by not enabled
due to large numbers of errors.

Running more tests in parallel (6) as container based builds seem to
support them. The test case timeout has been set to 2 minutes as large
stalls will put test cases over 50 minute interval.

ccache enabled where possible. Linux clang builds don't use them as the
minimum CMake version isn't there.
2017-04-10 22:36:21 -04:00
=Ian Gilfillan
c7319cf3d5 10.2 man pages 2017-04-09 14:24:39 -04:00
Vladislav Vaintroub
8c9cd26c06 Rocksdb - disable tests that fail regularly on buildbot (MDEV-12474) 2017-04-07 17:00:51 +00:00
Oleksandr Byelkin
d9484a2f60 MDEV-12395: DROP PARTITION does not work as expected when table has DEFAULT LIST partition
Data loss in case of partituon removing is documented => do not try to prevent it
2017-04-07 18:26:55 +02:00
Oleksandr Byelkin
27f6b11a97 MDEV-12379: Server crashes in TABLE_LIST::is_with_table on SHOW CREATE VIEW
In case of error on opening VIEW (absent table for example) it is still possible to print its definition but some variable is not set (table_list->derived->derived) so it is better do not try to test it when there is safer alternative (table_list itself).
2017-04-07 17:56:21 +02:00
Vladislav Vaintroub
a33653eedb MDEV-12473 - fix rocksdb linking error
link rocksdb with librt, for clock_gettime()
2017-04-07 15:09:28 +00:00
Marko Mäkelä
85da56bf2d Remove the unused variable trx_t::support_xa.
Also, merge some test changes from MySQL 5.7.10, for deprecating
innodb_support_xa.
2017-04-07 13:33:59 +03:00
Sergei Golubchik
84d9d286cf use log-error in mtr, don't let mysqld to write to stderr
because on Windows it cannot properly append to the file,
doesn't use CreateFile(..., FILE_APPEND_DATA, ...)

this fixes main.shutdown failures on Windows
2017-04-07 09:55:54 +02:00
Sergei Golubchik
cd79be82d1 cleanup: unused method LOGGER::flush_logs 2017-04-07 09:55:54 +02:00
Sergei Golubchik
06ee58a7dd ASAN error in rpl.mysql-wsrep#110-2
Annotate_rows_log_event again. When a new annotate event comes,
the server applies it first (which backs up thd->query_string),
then frees the old annotate event, if any. Normally there isn't.

But with sub-statements (e.g. triggers) new annotate event comes
before the first one is freed, so the second event backs up
thd->query_string that was set by the first annotate event. Then
the first event is freed, together with its query string. And then
the second event restores thd->query_string to this freed memory.

Fix: free old annotate event before applying the new one.
2017-04-07 09:55:54 +02:00
Sergei Golubchik
30ed99cb82 ASAN errors in many rpl tests
Annotate_rows_log_event should always restore thd->query_string
if it was backed up. Even if the backed up value is NULL.
2017-04-07 09:55:54 +02:00
Sergei Golubchik
82196f0131 MDEV-11995 ALTER TABLE proceeds despite reporting ER_TOO_LONG_KEY error
automatic shortening of a too-long non-unique key should
be not a warning, but a note. It's a normal optimization,
doesn't affect correctness, and should never be converted to
an error, no matter how strict sql_mode is.
2017-04-07 09:55:54 +02:00
Vladislav Vaintroub
30cbbfbf77 MDEV-12452 postfix - use C style cast, not reinterpret_cast
to fix build on Win64
2017-04-07 06:09:25 +00:00
Vladislav Vaintroub
73c57e2be7 Fix building aws_key_management on Linux
in MYSQL_ADD_PLUGIN, do not add TARGET_LINK_LIBRARIES twice for the LINK_LIBRARIES parameter
It is usually harmless to add libraries twice.

However, aws_key_management uses -Wl,-whole-archive to workaround linker issues on Linux
If libraries are added twice with whole-archive, linking will fail complaining about duplicate symbols
2017-04-06 23:11:57 +00:00
Vladislav Vaintroub
b64910ce27 MDEV-12452 MDEV-12453 : Fix building rocksdb and aws_key_management on macOS
use  CMAKE_CXX_STANDARD to set C++11 flags  with CMake 3.1+ (apples flags are somehow different from standard clang)
port htonbe16/32/64 macros for rocksdb
use reinterpret_cast<size_t> to cast macOS's pthread_t (pointer type) to  size_t , for rocksdb
2017-04-06 18:40:12 -04:00
Igor Babaev
428a922cd0 Fixed the bug mdev-12440.
When a CTE referring to another CTE from the same with clause
was used twice then the server could not find the second CTE and
reported a bogus error message.
This happened because for any unit that was created as a clone of
a CTE specification the pointer to the WITH clause that owned this CTE
was not set.
2017-04-06 12:08:58 -07:00
Daniel Black
1759e91986 travis: osx - specify allowed_failures accurately 2017-04-06 11:26:34 -04:00
Daniel Black
08359bc570 travis: OSX - 2 minute test case timeout 2017-04-06 11:26:34 -04:00
Daniel Black
3bfb0b3bbd Travis: Add OSX to tests (but allow failure) 2017-04-06 11:26:34 -04:00
Daniel Black
46e2442f6f MDEV-6262: travis coverity support 2017-04-06 11:26:34 -04:00
Daniel Black
fce645745b Travis: remove tokudb when building with clang 2017-04-06 11:26:34 -04:00
Daniel Black
e130ee552a Travis: remove Mroonga for clang
Mroonga generated far too many warnings (and hence output) for Travis's
sensibilities on output log file size. So we just remove the storage
engine.

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-04-06 11:26:34 -04:00
Daniel Black
837fa86cf0 Travis: add ccache for clang
Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-04-06 11:26:34 -04:00
Daniel Black
cfd9a75c23 travis: disable main.mysqlhotcopy_myisam in container builds 2017-04-06 11:26:34 -04:00
Daniel Black
eb04ee5c9d Travis: llvm, additional packages and container
Additionally use clang as a compiler, versions 3.8, 3.9 and 4.0

Additionally use gcc/g++-7

Add additional packages used by build now that they are whitelisted.
      - libsnappy-dev       - innodb compression
      - liblzma-dev         - innodb compression
      - libzmq-dev          - used my Mgoonga
      - libdistro-info-perl - used by autobake-debian

Change to a container build as they tend to have more ram

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-04-06 11:26:34 -04:00
Vladislav Vaintroub
d235782fca Merge branch '10.1' into 10.2 2017-04-06 09:51:35 +00:00
Vladislav Vaintroub
b666732182 Do not link client plugins to mysqld
they might not be able to load after this.
2017-04-06 09:50:27 +00:00
Marko Mäkelä
1494147cf6 Merge 10.1 into 10.2 2017-04-06 09:52:25 +03:00
Marko Mäkelä
25d69ea012 MDEV-12198 innodb_defragment=1 crashes server on OPTIMIZE TABLE when FULLTEXT index exists
ha_innobase::defragment_table(): Skip corrupted indexes and
FULLTEXT INDEX. In InnoDB, FULLTEXT INDEX is implemented with
auxiliary tables. We will not defragment them on OPTIMIZE TABLE.
2017-04-06 08:56:25 +03:00
Marko Mäkelä
8d4871a953 Merge 10.0 into 10.1 2017-04-06 08:53:59 +03:00
Oleksandr Byelkin
57a699b0a0 MDEV-8642: WHERE Clause not applied on View - Empty result set returned
An attempt to mark reference as dependent lead to transfering this property to
original view field and through it to other references of this field which
can't be dependent.
2017-04-05 20:46:19 +02:00
Daniel Bartholomew
d528fd72f2 bump the VERSION 2017-04-05 14:43:24 -04:00
Marko Mäkelä
8423294acf Make InnoDB doublewrite buffer creation more robust.
buf_dblwr_create(): Remove a bogus check for the buffer pool size.
Theoretically, there is no problem if the doublewrite buffer is
larger than the buffer pool. It could only cause trouble on crash
recovery, and on recovery the doublewrite buffer is read to a buffer
that is allocated outside of the buffer pool. Moreover, this check
was only performed when the database was initialized for the first
time.

On a normal startup, buf_dblwr_init() would not enforce any
rule on the innodb_buffer_pool_size.

Furthermore, in case of an error, commit the mini-transaction in order
to avoid an assertion failure on shutdown. Yes, this will leave the
doublewrite buffer in a corrupted stage, but the doublewrite buffer
should only be initialized when the data files are being initialized
from the scratch in the first place.
2017-04-05 16:24:44 +03:00
Marko Mäkelä
35e582c917 Adjust tests for the removal of kill_and_restart_mysqld.inc. 2017-04-05 16:00:35 +03:00
Marko Mäkelä
8e36216a06 Import two ALTER TABLE…ALGORITHM=INPLACE tests from MySQL 5.6.
Also, revert part of MDEV-7685 that added an InnoDB abort when
ALTER TABLE…ALGORITHM=INPLACE is reporting that it ran out of
file space.
2017-04-05 14:46:35 +03:00
Jan Lindström
cd494f4cef fix warning "ignoring return value" of fwrite.
Merge pull request https://github.com/MariaDB/server/pull/343

contributed by Eric Herman.
2017-04-05 14:45:17 +03:00
Marko Mäkelä
0d34dd7cfb MDEV-11840 InnoDB: "Cannot open <ib_buffer_pool file>" should not be an error
buf_load(): When the file cannot be opened for reading, issue a note,
not an error message.
2017-04-05 10:16:11 +03:00
Jan Lindström
64a37f6cab Merge pull request #352 from grooverdan/10.1-xtradb-fil_crypt_rotate_page
xtradb: fil_crypt_rotate_page, space_id should be compared to TRX_SYS_SPACE
2017-04-05 09:43:36 +03:00
Daniel Black
a7bb9e8fdb xtradb: fil_crypt_rotate_page, space_id should be compared to TRX_SYS_SPACE not space
like 9a218f4fb8 fil_crypt_rotate_page
 - space_id should be compared to TRX_SYS_SPACE not space

Signed-off-by: Daniel Black <daniel.black@au.ibm.com>
2017-04-05 16:29:08 +10:00