summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-11071: Assertion `thd->transaction.stmt.is_empty()' failed in ↵bb-10.2-MDEV-11071Oleksandr Byelkin2018-06-1426-518/+778
| | | | | | Locked_tables_list::unlock_locked_table fix_length_and_dec now return result (error/OK)
* MDEV-16457 mariabackup 10.2+ should default to innodb_checksum_algorithm=crc32Marko Mäkelä2018-06-141-1/+1
| | | | | | | | | | Since MariaDB Server 10.2.2 (and MySQL 5.7), the default value of innodb_checksum_algorithm is crc32 (CRC-32C), not the inefficient "innodb" checksum. Change Mariabackup to use the same default, so that checksum validation (when using the default algorithm on the server) will take less time during mariabackup --backup. Also, mariabackup --prepare should be a little faster, and the server should read backups faster, because the page checksums would only be validated against CRC-32C.
* MDEV-13103 Deal with page_compressed page corruptionMarko Mäkelä2018-06-1414-863/+509
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fil_page_decompress(): Replaces fil_decompress_page(). Allow the caller detect errors. Remove duplicated code. Use the "safe" instead of "fast" variants of decompression routines. fil_page_compress(): Replaces fil_compress_page(). The length of the input buffer always was srv_page_size (innodb_page_size). Remove printouts, and remove the fil_space_t* parameter. buf_tmp_buffer_t::reserved: Make private; the accessors acquire() and release() will use atomic memory access. buf_pool_reserve_tmp_slot(): Make static. Remove the second parameter. Do not acquire any mutex. Remove the allocation of the buffers. buf_tmp_reserve_crypt_buf(), buf_tmp_reserve_compression_buf(): Refactored away from buf_pool_reserve_tmp_slot(). buf_page_decrypt_after_read(): Make static, and simplify the logic. Use the encryption buffer also for decompressing. buf_page_io_complete(), buf_dblwr_process(): Check more failures. fil_space_encrypt(): Simplify the debug checks. fil_space_t::printed_compression_failure: Remove. fil_get_compression_alg_name(): Remove. fil_iterate(): Allocate a buffer for compression and decompression only once, instead of allocating and freeing it for every page that uses compression, during IMPORT TABLESPACE. Also, validate the page checksum before decryption, and reduce the scope of some variables. fil_page_is_index_page(), fil_page_is_lzo_compressed(): Remove (unused). AbstractCallback::operator()(): Remove the parameter 'offset'. The check for it in FetchIndexRootPages::operator() was basically redundant and dead code since the previous refactoring.
* MDEV-15352 AUTO_INCREMENT breaks after updating a column value to a negative ↵Alexander Barkov2018-06-1411-46/+624
| | | | number
* MDEV-16311 Server crash when using a NAME_CONST() with a CURSORAlexander Barkov2018-06-133-0/+45
| | | | | | | | | | | | | | | | | | | | Problem: The problem was most likely introduced by a fix for MDEV-11597 (commit 5f0c31f928338e8a6ffde098b7ffd3d1a8b02903) which removed the assignment "killed= KILL_BAD_DATA" from THD::raise_condition(). Before MDEV-11597, sp_head::execute() tested thd->killed after looping through the SP instructions and exited with an error if thd->killed is set. After MDEV-11597, sp_head::execute() stopped to notice errors and set the OK status on top of the error status, which crashed on assert. Fix: Making sp_cursor::fetch() return -1 if server_side_cursor->fetch(1) left an error in the diagnostics area. This makes the statement "err_status= i->execute(thd, &ip)" in sp_head::execute() set the error code and correctly break the SP instruction loop and return on error without setting the OK status.
* MDEV-15304: Server crash in print_keydup_error / key_unpack or unexpected ↵Sergei Petrunia2018-06-131-15/+8
| | | | | | | ER_DUP_KEY Adjust the patch to match the variant accepted into the upstream: undo the changes in ha_rocksdb::load_hidden_pk_value().
* MDEV-15319: [SQL Layer] Server crashes in Field::set_null / ↵Sergei Petrunia2018-06-132-0/+20
| | | | | | myrocks::ha_rocksdb ... Added a testcase
* MDEV-15870 Using aggregate and window function in unexpected places can ↵Alexander Barkov2018-06-134-5/+30
| | | | crash the server
* MDEV-12060 Crash in EXECUTE IMMEDIATE with an expression returning a GRANT ↵Alexander Barkov2018-06-122-6/+89
| | | | | | | command This problem was earlier fixed by MDEV-14603. Only adding 10.2 specific tests.
* MDEV-16456 InnoDB error "returned OS error 71" complains about wrong pathMarko Mäkelä2018-06-124-8/+42
| | | | | | | | | | | When attempting to rename a table to a non-existing database, InnoDB would misleadingly report "OS error 71" when in fact the error code is InnoDB's own (OS_FILE_NOT_FOUND), and not report both pathnames. Errors on rename could occur due to reasons connected to either pathname. os_file_handle_rename_error(): New function, to report errors in renaming files.
* Undo wrong my_free overflowVicențiu Ciorbaru2018-06-111-1/+1
|
* Add missed change from 7ffa82b03c8da12062223d5e332e972d6f828d44Vicențiu Ciorbaru2018-06-112-2/+2
|
* MDEV-13122 Backup myrocksdb with mariabackup.Vladislav Vaintroub2018-06-0713-3/+435
|
* MDEV-16300 : remove rocksdb checkpoint created by mariabackup.Vladislav Vaintroub2018-06-074-1/+78
| | | | | | | Add variable rocksdb_remove_mariabackup_checkpoint. If set, it will remove $rocksdb_datadir/mariabackup-checkpoint directory. The variable is to be used by exclusively by mariabackup, to remove temporary checkpoints.
* MDEV-16367 mariabackup: error: failed to copy enough redo logMarko Mäkelä2018-06-071-57/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log_copying_thread(): Keep copying redo log until the end has been reached. (Previously, we would stop copying as soon as the first batch of xtrabackup_copy_logfile() returned.) log_copying: Remove. Use log_copying_running instead. copy_logfile: Remove. Log copying will now only be invoked from 2 places: from xtrabackup_backup_func() for the initial batch, and from log_copying_thread() until all of the log has been read. Use the global variable metadata_to_lsn for determining if the final part of the log is being copied. xtrabackup_copy_log(): Add diagnostic messages for terminating the copying. These messages should be dead code, because log_group_read_log_seg() should be checking for the same. xtrabackup_copy_logfile(): Correct the retrying logic. If anything was successfully read, process the portion that was read. On failure, let the caller close dst_log_file. io_watching_thread(): Stop throttling during the last phase of copying the log (metadata_to_lsn!=0). The final copying of the log will now be performed in log_copying_thread(). stop_backup_threads(): Clean up the message about stopping the log copying thread. xtrabackup_backup_low(): Read metadata_to_lsn from the latest checkpoint header page, even if it is the first page. Let the log_copying_thread take care of copying all of the redo log.
* Mariabackup: Make some globals staticMarko Mäkelä2018-06-073-4/+3
|
* Merge 10.1 into 10.2Marko Mäkelä2018-06-0620-566/+80
|\
| * Merge 10.0 to 10.1Marko Mäkelä2018-06-066-236/+8
| |\
| | * MDEV-16124 fil_rename_tablespace() times out and crashes server during ↵Marko Mäkelä2018-06-056-236/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | table-rebuilding ALTER TABLE InnoDB insisted on closing the file handle before renaming a file. Renaming a file should never be a problem on POSIX systems. Also on Windows it should work if the file was opened in FILE_SHARE_DELETE mode. fil_space_t::stop_ios: Remove. We no longer need to stop file access during rename operations. fil_mutex_enter_and_prepare_for_io(): Remove the wait for stop_ios. fil_rename_tablespace(): Remove the retry logic; do not close the file handle. Remove the unused fault injection that was added along with the DATA DIRECTORY functionality (MySQL WL#5980). os_file_create_simple_func(), os_file_create_func(), os_file_create_simple_no_error_handling_func(): Include FILE_SHARE_DELETE in the share_mode. (We will still prevent multiple InnoDB instances from using the same files by not setting FILE_SHARE_WRITE.)
| * | MDEV-15824 innodb_defragment=ON trumps innodb_optimize_fulltext_only=ON in ↵Marko Mäkelä2018-06-054-28/+44
| | | | | | | | | | | | | | | | | | | | | | | | OPTIMIZE TABLE ha_innobase::optimize(): If both innodb_defragment and innodb_optimize_fulltext_only are at their default settings (OFF), fall back to ALTER TABLE. Else process one or both options.
| * | Add FLUSH TABLES to avoid corruption of MyISAM system tablesMarko Mäkelä2018-06-052-1/+4
| | |
| * | Remove dead code that was added in MDEV-5834Marko Mäkelä2018-06-0510-319/+12
| | | | | | | | | | | | | | | | | | | | | | | | ha_innobase::set_partition_owner_stats(): Remove (unused function). ha_innobase::ha_partition_stats: Remove (the variable is never read). Remove unused ut_timer functions.
| * | MDEV-16303 - do not install wsrep.ini on WindowsVladislav Vaintroub2018-05-291-2/+9
| | |
* | | MDEV-12642: Build deb source packages on buildbot, just not on Travis-CIOtto Kekäläinen2018-06-051-3/+11
| | |
* | | MDEV-16376 ASAN: heap-use-after-free in gcol.innodb_virtual_debugMarko Mäkelä2018-06-048-77/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After a failed ADD INDEX, dict_index_remove_from_cache_low() could iterate the index fields and dereference a freed virtual column object when trying to remove the index from the v_indexes of the virtual column. This regression was caused by a merge of MDEV-16119 InnoDB lock->index refers to a freed object. ha_innobase_inplace_ctx::clear_added_indexes(): Detach the indexes of uncommitted indexes from virtual columns, so that the iteration in dict_index_remove_from_cache_low() can be avoided. ha_innobase::prepare_inplace_alter_table(): Ignore uncommitted corrupted indexes when rejecting ALTER TABLE. (This minor bug was revealed by the extension of the test case.) dict_index_t::detach_columns(): Detach an index from virtual columns. Invoked by both dict_index_remove_from_cache_low() and ha_innobase_inplace_ctx::clear_added_indexes(). dict_col_t::detach(const dict_index_t& index): Detach an index from a column. dict_col_t::is_virtual(): Replaces dict_col_is_virtual(). dict_index_t::has_virtual(): Replaces dict_index_has_virtual().
* | | MDEV-13834: Upgrade failure from 10.1 innodb_encrypt_logMarko Mäkelä2018-06-042-8/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | log_crypt_101_read_block(): Mimic MariaDB 10.1, and use the first encryption key if the key for the checkpoint cannot be found. Redo log encryption key rotation was ultimately disabled in MDEV-9422 (MariaDB 10.1.13) due to design issues. So, from MariaDB 10.1.13 onwards only one log encryption key should matter. recv_log_format_0_recover(): Add the parameter 'bool crypt'. Indicate when the log cannot be decrypted for upgrade, instead of making a possibly false claim that the log requires crash recovery. init_crypt_key(): Remove extra space from a message.
* | | Better Link Spacinggvtek2018-06-011-0/+5
| | | | | | | | | | | | | | | | | | | | | Just spacing out the links on separate linkes, they were running together in a block of text and could be a little hard for some people to differentiate where one begins and the next ends. Seems silly, but just trying to help in the formatting a bit.
* | | MDEV-16353 Server crash on query with CTEIgor Babaev2018-05-313-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | This bug caused crashes for queries with unreferenced non-recursive CTEs specified by unions.It happened because the function st_select_lex_unit::prepare() tried to use the value of the field 'derived' that could not be set for unferenced CTEs as there was no derived table associated with an unreferenced CTE.
* | | Remove an unnecessary #includeMarko Mäkelä2018-05-301-4/+0
| | |
* | | Allow tests to work with cmake -DPLUGIN_PARTITION=NOMarko Mäkelä2018-05-298-3/+6
| | |
* | | Add an end-marker to ease future mergesMarko Mäkelä2018-05-292-0/+3
| | |
* | | Merge 10.1 into 10.2Marko Mäkelä2018-05-2934-222/+293
|\ \ \ | |/ /
| * | MDEV-16283 ALTER TABLE...DISCARD TABLESPACE still takes long on a large ↵Marko Mäkelä2018-05-2920-174/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | buffer pool Also fixes MDEV-14727, MDEV-14491 InnoDB: Error: Waited for 5 secs for hash index ref_count (1) to drop to 0 by replacing the flawed wait logic in dict_index_remove_from_cache_low(). On DISCARD TABLESPACE, there is no need to drop the adaptive hash index. We must drop it on IMPORT TABLESPACE, and eventually on DROP TABLE or DROP INDEX. As long as the dict_index_t object remains in the cache and the table remains inaccessible, the adaptive hash index entries to orphaned pages would not do any harm. They would be dropped when buffer pool pages are reused for something else. btr_search_drop_page_hash_when_freed(), buf_LRU_drop_page_hash_batch(): Remove the parameter zip_size, and pass 0 to buf_page_get_gen(). buf_page_get_gen(): Ignore zip_size if mode==BUF_PEEK_IF_IN_POOL. buf_LRU_drop_page_hash_for_tablespace(): Drop the adaptive hash index even if the tablespace is inaccessible. buf_LRU_drop_page_hash_for_tablespace(): New global function, to drop the adaptive hash index. buf_LRU_flush_or_remove_pages(), fil_delete_tablespace(): Remove the parameter drop_ahi. dict_index_remove_from_cache_low(): Actively drop the adaptive hash index if entries exist. This should prevent InnoDB hangs on DROP TABLE or DROP INDEX. row_import_for_mysql(): Drop any adaptive hash index entries for the table. row_drop_table_for_mysql(): Drop any adaptive hash index for the table, except if the table resides in the system tablespace. (DISCARD TABLESPACE does not apply to the system tablespace, and we do no want to drop the adaptive hash index for other tables than the one that is being dropped.) row_truncate_table_for_mysql(): Drop any adaptive hash index entries for the table, except if the table resides in the system tablespace.
| * | Fix type mismatchMarko Mäkelä2018-05-291-1/+1
| | |
| * | MDEV-14589 InnoDB should not lock a delete-marked recordMarko Mäkelä2018-05-294-28/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the transaction isolation level is SERIALIZABLE, or when a locking read is performed in the REPEATABLE READ isolation level, InnoDB must lock delete-marked records in order to prevent another transaction from inserting something. However, at READ UNCOMMITTED or READ COMMITTED isolation level or when the parameter innodb_locks_unsafe_for_binlog is set, the repeatability of the reads does not matter, and there is no need to lock any records. row_search_for_mysql(): Skip locks on delete-marked committed records upfront, instead of invoking row_unlock_for_mysql() afterwards. The unlocking never worked for secondary index records.
| * | MDEV-10679 Crash in performance schema and partitioning with discoveryMonty2018-05-266-6/+33
| | | | | | | | | | | | | | | | | | | | | Crash happened because in discover, table->work_part_info was not properly reset before execution. Fixed by resetting before calling execute alter table, create table or mysql_create_frm_image.
| * | Avoid warnings in String::copy when copying string on itself (ok to do)Monty2018-05-261-1/+10
| | |
| * | Fixed compiler warningsMonty2018-05-262-46/+43
| | | | | | | | | | | | When merging this with 10.2 and later, one can just use the 10.2 or later code
| * | MDEV-16093 Memory leak with triggersMonty2018-05-263-2/+31
| | | | | | | | | | | | | | | Problem was that blob memory allocated in Table_trigger_list was not properly freed
| * | embedded use-after-free ASAN errorSergei Golubchik2018-05-251-0/+2
| | | | | | | | | | | | | | | | | | Close MYSQL (and destroy THD) in the same thread where it was used, because THD embeds MDL_context, that owns some LF_PINS, that remember a pointer to my_thread_var->stack_ends_here.
* | | MDEV-13834 10.2 wrongly recognizes 10.1.10 innodb_encrypt_log=ON data as ↵Marko Mäkelä2018-05-281-36/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after-crash and refuses to start infos[]: Allocate enough entries to accommodate all keys from both checkpoint pages. infos_used: The size of infos[]. get_crypt_info(): Merge to the only caller, log_crypt_101_read_block(). log_crypt_101_read_block(): Do not validate the log block checksum, because it will not be valid when upgrading from MariaDB 10.1.10. Instead, check that the encryption key exists. log_crypt_101_read_checkpoint(): Append to infos[] instead of overwriting.
* | | MDEV-16310: rocksdb.check_ignore_unknown_options fails on OS XSergei Petrunia2018-05-281-1/+1
| | | | | | | | | | | | Use a compatible xargs command-line arguments.
* | | Fixed memory overrun in binlog_encryption.encrypted_masterMonty2018-05-263-8/+12
| | | | | | | | | | | | | | | Problem was that max_row_lengt() used different bitmap than pack_row()
* | | Updated results for galera_encrypt_tmp_filesMonty2018-05-261-0/+2
| | |
* | | Fix conversion warnings/errors.Vladislav Vaintroub2018-05-242-2/+2
| | |
* | | Extend debug_assert_on_not_freed_memorybb-10.2-monty-fixedMonty2018-05-241-1/+2
| | | | | | | | | | | | | | | Don't check global_memory_used if debug_assert_on_not_freed_memory is not set
* | | Merge remote-tracking branch 'origin/10.1' into 10.2Monty2018-05-2440-160/+822
|\ \ \ | |/ /
| * | Add a missing dependency to a testMarko Mäkelä2018-05-241-0/+1
| | |
| * | Merge 10.0 into 10.1Marko Mäkelä2018-05-242-18/+38
| |\ \ | | |/
| | * MDEV-16267 Wrong INFORMATION_SCHEMA.INNODB_BUFFER_PAGE.TABLE_NAMEMarko Mäkelä2018-05-242-18/+38
| | | | | | | | | | | | | | | i_s_innodb_buffer_page_fill(), i_s_innodb_buf_page_lru_fill(): Only invoke Field::set_notnull() if the index was found.