- 05 Jun, 2018 2 commits
-
-
Daniel Black authored
c902d5a4 changed this to bash. This isn't approprate as mysqld_safe is used by FreeBSD where there is no bash by default. The original reason to use bash seems related to MDEV-3279 which was a dash bug fixed in 2009 - https://git.kernel.org/pub/scm/utils/dash/dash.git/commit/?id=3800d4934391b144fd261a7957aea72ced7d47ea Working around 9 year old fixed bugs shouldn't be done here.
-
Alexander Barkov authored
The problem described in the bug report happened because the code did not test check_cols(1) after fix_fields() in a few places. Additionally, fix_fields() could be called multiple times for SP variables, because they are all fixed at a early stage in append_for_log(). Solution: 1. Adding a few helper methods - fix_fields_if_needed() - fix_fields_if_needed_for_scalar() - fix_fields_if_needed_for_bool() - fix_fields_if_needed_for_order_by() and using it in many cases instead of fix_fields() where the "fixed" status is not definitely known to be "false". 2. Adding DBUG_ASSERT(!fixed) into Item_splocal*::fix_fields() to catch double execution. 3. Adding tests. As a good side effect, the patch removes a lot of duplicate code (~60 lines): if (!item->fixed && item->fix_fields(..) && item->check_cols(1)) return true;
-
- 04 Jun, 2018 3 commits
-
-
Marko Mäkelä authored
-
Marko Mäkelä authored
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().
-
Marko Mäkelä authored
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.
-
- 03 Jun, 2018 5 commits
-
-
Sergei Golubchik authored
-
Sergei Golubchik authored
just before they're sent to the client. Because mysql->host value is known only after the connection is established, and it's needed for the "_sever_host" attribute. This fixes ASAN use-after-free warning in rpl tests followup for ee8dfc68
-
Eugene Kosov authored
MDEV-15991 Server crashes in setup_on_expr upon calling SP or function executing DML on versioned tables Do not try to set versioning conditions on every SP call. It may work incorrectly, but it's a general bug described in MDEV-774. This patch makes system versioning stuff consistent with other code and also fixes a use-after-free bug. Closes #756
-
Aleksey Midenkov authored
* Always-false vers_select_conds_t::from_query * Debug helpers Closes #684
-
Sergei Golubchik authored
-
- 02 Jun, 2018 1 commit
-
-
Otto Kekäläinen authored
This partially reverts commit dc0a7660.
-
- 01 Jun, 2018 3 commits
-
-
Yuqi authored
Make mariadb crc32 lib platform independent It looks strange that someone can make use of 2 crc libraries (Power64 or AArch64) at the same time. The patch sets macros 'CRC32_LIBRARY' to make platform independence as an optional crc32 library. Change-Id: I68bbf73cafb6a12f7fb105ad57d117b114a8c4af Signed-off-by: Yuqi Gu <yuqi.gu@arm.com>
-
gvtek authored
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.
-
Igor Babaev authored
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.
-
- 31 May, 2018 1 commit
-
-
Marko Mäkelä authored
INNOBASE_DEFAULTS: Replace ALTER_ADD_COLUMN with the more appropriate ALTER_ADD_STORED_BASE_COLUMN. This clean-up causes no change of behaviour, because ALGORITHM=INPLACE would be refused for ALTER_ADD_STORED_GENERATED_COLUMN, and default values are not computed nor substituted for ALTER_ADD_VIRTUAL_COLUMN.
-
- 30 May, 2018 4 commits
-
-
Vladislav Vaintroub authored
Disable /permissive- flag, so MFC is found, and upgrade_wizard is built. MFC code is not standard C++, so it doesn not play well with /permissive-
-
Marko Mäkelä authored
commit 2dbeebdb accidentally changed ALTER_COLUMN_OPTION and ALTER_COLUMN_STORAGE_TYPE to be separate flags. InnoDB and Mroonga are only checking for the latter; the example storage engine is checking for the former only. The impact of this bug should be incorrect operation of Mroonga when the column options GROONGA_TYPE, FLAGS are changed. InnoDB does not define any column options, only table options, so the flag ALTER_COLUMN_OPTION should never have been set. Also, remove the unused flag ALTER_DROP_HISTORICAL.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
Fix type mismatches in the unit test mdev10259(). btr_search_info_get_ref_count(): Do not return early if !table->space. We can simply access table->space_id even after the tablespace has been discarded. btr_get_search_latch(): Relax a debug assertion to allow !index->table->space.
-
- 29 May, 2018 11 commits
-
-
Otto Kekäläinen authored
Include all the Makefiles that define variables that can be useful within debian/rules. This includes buildflags.mk as well. Use the standard variable names and don't define our own.
-
James Clarke authored
For details see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=852728
-
Adrian Bunk authored
For details see https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=865737
-
Otto Kekäläinen authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Marko Mäkelä authored
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.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
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.
-
- 28 May, 2018 9 commits
-
-
Marko Mäkelä authored
MDEV-13834 10.2 wrongly recognizes 10.1.10 innodb_encrypt_log=ON data as 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.
-
Sergei Petrunia authored
Use a compatible xargs command-line arguments.
-
Otto Kekäläinen authored
All packages in group 'essential' are by default installed on all Debian and Ubuntu systems, and there is no need to mark them as dependencies for any binary.
-
Otto Kekäläinen authored
-
Otto Kekäläinen authored
(This change matches how debian/control is in downstream Debian.org)
-
Otto Kekäläinen authored
(This change matches how debian/rules is in downstream Debian.org)
-
Otto Kekäläinen authored
-
Kristien Nielsen authored
We have carried along this patch as a patch inside our sources since 2012 (commit cfd4fcb0). The validity of this has thus been vetted in production for years and the review done now did not find otherwise. A race in dash causes mysqld_safe to occasionally loop infinitely. Fix by using bash instead. https://bugs.launchpad.net/ubuntu/+source/mysql-dfsg-5.0/+bug/675185 As this is the last patch, we can also clean away usage of dpatch.
-
Christian Hammers authored
We have carried along this patch as a patch inside our sources since 2012 (commit cfd4fcb0). This same patch has been used also in MySQL packaging at Oracle and in downstream Debian.org packages for both MySQL and MariaDB. The validity of this has thus been vetted in production for years and the review done now did not find otherwise. Code contributed to Oracle with http://forge.mysql.com/wiki/Sun_Contributor_Agreement Reported as http://bugs.mysql.com/bug.php?id=31361
-
- 27 May, 2018 1 commit
-
-
Monty authored
Fixed by deleting the sequence if we where not able to initialize it I also noticed that we didn't always set the error message when check_killed(), which could lead to aborted queries without error beeing properly set. Fixed by default setting error message if check_error() noticed that killed had been called. This allowed me to remove a lot of calls to thd->send_kill_message().
-