Commit graph

179544 commits

Author SHA1 Message Date
Marko Mäkelä
5421e3aee7 MDEV-15249 Crash in MVCC read after IMPORT TABLESPACE
PageConverter::adjust_cluster_record(): Instead of writing
the invalid value DB_ROLL_PTR=0, write a value that indicates
a fresh insert, that is, prevents the DB_ROLL_PTR from being
dereferenced in any circumstances.

It can be argued that IMPORT TABLESPACE should actually
update the dict_index_t::trx_id to prevent older transactions
from accessing the table, similar to what I did on table
rebuild in MySQL 5.6.6 in
03f81a55f2
2018-02-08 12:59:32 +02:00
Oleksandr Byelkin
b6455479e5 MDEV-15230: column_json breaks cyrillic in 10.1.31
Use unsigned comparison.
2018-02-07 18:14:45 +01:00
Monty
5c057b3fef Disabled galera_ist_progress at it always fails in 10.2 2018-02-07 17:25:46 +02:00
Vicențiu Ciorbaru
5a7b6db671 Merge remote-tracking branch 'connect/10.2' into 10.2 2018-02-07 15:19:53 +02:00
Vicențiu Ciorbaru
1c2a2d3c9d Update Connector/C 2018-02-07 15:19:45 +02:00
Vicentiu Ciorbaru
adbf6caad6 debian/control Include myrocks_hotbackup into mariadb-plugin-rocksdb 2018-02-07 13:08:19 +00:00
Vicentiu Ciorbaru
cbe566dc42 Add myrocks_hotbackup part of rocksdb plugin in cmake 2018-02-07 13:08:19 +00:00
Vicentiu Ciorbaru
699123fdc3 Fix rocksdb compiler version identification with GCC
GCC 7 with only dumpversion flag returns the major version only.
dumpfullversion flag makes it work with both new and old gcc.
2018-02-07 13:07:34 +00:00
Daniel Black
d743b61f89 MDEV-14567: CRYPTO_set_mem_functions fails in FIPS mode
If the CRYPTO_set_mem_functions fails just return success
from check_openssl_compatibility. The only case where
CRYPTO_set_mem_functions fails is the allow_customize==0 (aka FIPS
mode). The check_openssl_compatibility isn't able to complete unless
this function returns success.

ref: https://github.com/openssl/openssl/blob/OpenSSL_1_1_0g/crypto/mem.c#L34
2018-02-07 11:45:01 +01:00
Marko Mäkelä
10590dd39c MDEV-15199 Referential integrity broken in ON DELETE CASCADE
MDEV-14222 Unnecessary 'cascade' memory allocation for every updated row
when there is no FOREIGN KEY

This reverts the MySQL 5.7.2 change
377774689b
which introduced these problems. MariaDB 10.2.2 inherited these problems
in commit 2e814d4702.

The FOREIGN KEY CASCADE and SET NULL operations implemented as
procedural recursion are consuming more than 8 kilobytes of stack
(9 stack frames) per iteration in a non-debug GNU/Linux AMD64 build.
This is why we need to limit the maximum recursion depth to 15 steps
instead of the 255 that it used to be in MySQL 5.7 and MariaDB 10.2.

A corresponding change was made in MySQL 5.7.21 in
7b26dc98a6
2018-02-07 10:39:12 +02:00
Marko Mäkelä
5d7e9fd46c InnoDB UPDATE cleanup
row_upd_store_v_row(): Declare static

row_upd_clust_rec_by_insert(), row_upd_del_mark_clust_rec():
Pass the parameter 'foreign' only #ifdef WITH_WSREP
2018-02-07 10:39:12 +02:00
Marko Mäkelä
b68dac88b3 MDEV-15219 FOREIGN KEY CASCADE or SET NULL operations will not resume after lock wait
This corruption was introduced in MDEV-13331. It would have been caught
by the MySQL 5.7 test innodb.update-cascade which MariaDB was missing
until now.

row_ins_check_foreign_constraint(): Never replace err == DB_LOCK_WAIT
with other values than DB_LOCK_WAIT_TIMEOUT.
2018-02-07 10:39:12 +02:00
Marko Mäkelä
1789e0ff03 Remove useless debug instrumentation row_print_geometry_data 2018-02-07 10:39:12 +02:00
Marko Mäkelä
5815c8ee85 Remove useless code
srv_mbr_print(): Remove. Geometry fields are already being output
in raw form, and we do not need bogus MBR output for non-spatial
indexes.
2018-02-07 10:39:12 +02:00
Marko Mäkelä
4cec63af44 Foreign key code cleanup
row_ins_cascade_calc_update_vec(): Remove the output parameter
fts_col_affected, and instead return whether any fulltext index
is affected by the cascade operation.

row_ins_foreign_check_on_constraint(): Narrow the scope of some
variables.

ib_dec_in_dtor: Remove.
2018-02-07 10:39:12 +02:00
Igor Babaev
2ef41622e2 Fixed mdev-15162 Query with CTE hangs if assignment operator (:=) is used
If setting user variable was used in the specification of a recursive CTE
then Item_func_set_user_var::fix_fields() went into an infinite loop.
2018-02-06 12:12:19 -08:00
Daniel Bartholomew
b253a0c3a9 bump the VERSION 2018-02-06 12:44:43 -05:00
Igor Babaev
bdb87c4965 Fixed mdev-15119 CTE, referencing another CTE, that is declared after,
does not return error

Corrected the code of st_select_lex::find_table_def_in_with_clauses() for
a proper identification of CTE references used in embedded CTEs.
2018-02-06 08:32:49 -08:00
Igor Babaev
90885985b6 Fixed mdev-15120 CTE table should not belong to database, that is in use
When identifying a table name the following should be taken into account:
a CTE name cannot be qualified with a database name, otherwise the table
name is considered as the name of a non-CTE table.
2018-02-06 08:26:50 -08:00
Sergei Golubchik
b4fbb4183b remove bash-ish from SST scripts
replace with awk (yuck!), avoiding gensub (which wasn't recognized)
2018-02-06 14:52:01 +01:00
Sergei Golubchik
00855a62ab cleanup: my_off_t mmaped_length -> size_t
all mmap-related functions take size_t lengh.
mmaped_length was casted to size_t *every single time*
2018-02-06 14:51:56 +01:00
Sergei Golubchik
d429f60770 compilation error on windows
conversion from 'my_off_t' to '::size_t', possible loss of data
2018-02-06 14:51:50 +01:00
Sergei Golubchik
775a8a0e4b compilation error on windows
get_rec_bits() must return uchar, it's result is often
assigned to uchar. And len is always less than 8.
2018-02-06 14:51:44 +01:00
Sergei Golubchik
c98c616e7f no separate 10.2 fix for MDEV-14743 at this point in time
this fixes the crash of main.fulltest
2018-02-06 14:51:39 +01:00
Sergei Golubchik
2eb00d1eba fix Item_window_func::print() not to crash before fix_fields()
because dbug_print_item() can be invoked any time in gdb,
also before fix_fields.

this fixes a crash of main.win in debug builds
2018-02-06 14:51:31 +01:00
Sergei Golubchik
c4930a820a don't set derived->merged until derived is really irreversibly merged
it was set before big if() that could decide not to merge and
go with materialization.

this fixes a crash in main.view test
2018-02-06 14:51:23 +01:00
Sergei Golubchik
4771ae4b22 Merge branch 'github/10.1' into 10.2 2018-02-06 14:50:50 +01:00
Sergei Golubchik
0c25e58db6 correctly detect unsupported compiler flags
in gcc `-Wno-unsupported-something` will not be an error or even a warning,
so cmake will think the flag is supported. But if there's any other
warning during compilation, for any reason, unknown option will
be a warning too. Or an error when -Werror, even if that "other warning"
would not be an error on itself.

So we need to detect whether `-Wno-unsupported-something` is *really*
supported. Luckily, `-Wunsupported-something` will always fail with an
error.

So, whenever there's a need to detect if -Wno-something is supported,
test -Wsomething instead.
2018-02-06 12:53:01 +01:00
Sergei Golubchik
4418abb267 cleanup: simplify maintainer.cmake 2018-02-06 02:33:56 +01:00
Jan Lindström
60f51af755 MDEV-15042: INSERT ON DUPLICATE KEY UPDATE produces error 1032 (Can't find record)
Problem was that wrong error message was returned when insert
returned FK-error and there was no duplicate key to process.

row_ins
	If error from insert was DB_NO_REFERENCED_ROW and there was
	no duplicate key we should ignore ON DUPLICATE KEY UPDATE
	and return original error message.
2018-02-05 18:21:28 +02:00
Sergei Golubchik
7407313f11 silence the annoying compiler warning 2018-02-05 16:04:12 +01:00
Marko Mäkelä
3f42529a6f Merge 10.0 into 10.1 2018-02-05 09:25:33 +02:00
Marko Mäkelä
cb5374801e MDEV-15202 innodb.log_file_size failed in buildbot
Suppress some messages that are emitted rarely
(when the FIL_PAGE_FILE_FLUSH_LSN of the first page of ibdata1
does not match the latest redo log checkpoint).
2018-02-05 09:23:36 +02:00
Elena Stepanova
aba15b864a Updated list of unstable tests for 10.1.31 release 2018-02-04 04:28:14 +02:00
Marko Mäkelä
8812a2f858 Merge 10.0 into 10.1 2018-02-03 12:53:30 +02:00
Marko Mäkelä
ec03390f9b fil_write_flushed_lsn(): Ensure that the return value is initialized
Previously, the function could theoretically return an uninitialized
value if the system tablespace contained no data files. It should be
impossible for InnoDB to start up in such scenario.
2018-02-03 12:52:25 +02:00
Marko Mäkelä
d7d910d08b Fix a warning about possibly unused variable
xtrabackup_init_temp_log(): Remove a redundant variable and limit scope.
2018-02-03 12:50:38 +02:00
Marko Mäkelä
a988c70922 After-merge test result fix 2018-02-03 12:49:41 +02:00
Sergei Golubchik
c383418cbf Merge branch 'github/10.0-galera' into 10.1 2018-02-03 08:09:06 +01:00
Marko Mäkelä
9390ff53fc MDEV-14958 Merge new release of InnoDB MySQL 5.7.21 to 10.2
Two follow-up tasks were filed for MySQL 5.7.21 changes that
were not applied here:

MDEV-15179 performance_schema.file_instances does not reflect RENAME TABLE
MDEV-14222 Unnecessary 'cascade' memory allocation for every updated
row when there is no FOREIGN KEY
2018-02-02 21:11:49 +02:00
Marko Mäkelä
f69a3b2e92 After-merge fix for commit d4df7bc9b1
The merge omitted some InnoDB and XtraDB conflict resolutions,
most notably, failing to merge the fix of MDEV-12173.

ibuf_merge_or_delete_for_page(), lock_rec_block_validate():
Invoke fil_space_acquire_silent() instead of fil_space_acquire().
This fixes MDEV-12173.

wsrep_debug, wsrep_trx_is_aborting(): Removed unused declarations.

_fil_io(): Remove. Instead, declare default parameters for the XtraDB
fil_io().

buf_read_page_low(): Declare default parameters, and clean up some
callers.

os_aio(): Correct the macro that is defined when !UNIV_PFS_IO.
2018-02-02 19:57:59 +02:00
Vicențiu Ciorbaru
0765caa073 Merge remote-tracking branch 'origin/5.5' into 10.0 2018-02-02 18:14:35 +01:00
Oleksandr Byelkin
f694df6ac5 Fix of NULLIF print statement. 2018-02-02 17:23:05 +01:00
Marko Mäkelä
d13fbc6212 Remove code related to InnoDB native partitioning in MySQL 5.7
row_rename_partitions_for_mysql(): Remove. This should only be relevant
in an upgrade into MySQL 5.7, which has InnoDB native partitioning.
2018-02-02 16:16:52 +02:00
Marko Mäkelä
d57b2430d7 Merge a fix from MySQL 5.7, to presumably dead code
Remove a test that does not apply to MariaDB

In MariaDB, there are no high-priority transactions (no tx_priority).
This should also mean that all references to TRX_STATE_FORCED_ROLLBACK
are dead code.
2018-02-02 16:16:14 +02:00
Jimmy Yang
6266493fc3 Bug #25729649 LOCK0LOCK.CC:NNN:ADD_POSITION != __NULL
Reviewed-by: Sunny Bains <sunny.bains@oracle.com>
2018-02-02 16:15:30 +02:00
Marko Mäkelä
4c731a2d7c Adapt a MySQL 5.7 fix for SET GLOBAL innodb_buffer_pool_size
Bug#23590280 NO WARNING WHEN REDUCING INNODB_BUFFER_POOL_SIZE
INSIZE (sic) THE FIRST CHUNK

innodb_buffer_pool_size_validate(): Issue a warning if the
requested innodb_buffer_pool_size is less than
innodb_buffer_pool_chunk_size, because we cannot shrink individual
chunks.
2018-02-02 16:15:13 +02:00
Marko Mäkelä
009e872b1c Merge a test case from MySQL 5.7 (no code fix needed) 2018-02-02 16:15:13 +02:00
Marko Mäkelä
d4ea179e13 MDEV-13626: Merge InnoDB test cases from MySQL 5.7 (part 7)
Import and adjust the innodb.innodb_buffer_pool_resize tests,
except innodb.innodb_buffer_pool_resize_debug, which would time out.

buf_pool_clear_hash_index(): Adjust assertions.
2018-02-02 16:15:13 +02:00
Sergei Golubchik
29031fe391 my_addr_resolve fixes
* use a longer timeout, 10ms is not always enough
* stop waiting as long as the data is read, do not unconditionally
  wait for timeout every time
2018-02-02 11:42:07 +01:00