summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* MDEV-15786: ERROR 1062 (23000) at line 365: Duplicate entry 'spider' for key ↵bb-10.3-MDEV-15786Jacob Mathew2018-07-201-3/+21
| | | | | | | | | | | | | | | | | | | | | | 'PRIMARY' The problem occurs on Ubuntu where a Spider package is installed on the system separately from the MariaDB package. MariaDB and Spider upgrades leave the Spider plugin improperly installed. Spider is present in the mysql.plugin table but is not present in information_schema. The problem has been corrected in Spider's installation script. Logic has been added to check for Spider entries in both information_schema and mysql.plugin. If Spider is present in mysql.plugin but is not present in information_schema, then Spider is first removed from mysql.plugin. The subsequent plugin install of Spider will insert entries in both mysql.plugin and information_schema. Author: Jacob Mathew. Reviewer: Kentoku Shiba.
* rpl_row_001.test failed in internal checkMonty2018-07-142-0/+16
| | | | | Problem was as part of SET PASSWORD FOR ROOT, mysql.user table changed compared to how it was originally created. (plugin changed value)
* MDEV-16246: insert timestamp into spider table from mysqldump gets wrong ↵Jacob Mathew2018-07-0923-284/+1575
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | time zone. The problem occurred because the Spider node was incorrectly handling timestamp values sent to and received from the data nodes. The problem has been corrected as follows: - Added logic to set and maintain the UTC time zone on the data nodes. To prevent timestamp ambiguity, it is necessary for the data nodes to use a time zone such as UTC which does not have daylight savings time. - Removed the spider_sync_time_zone configuration variable, which did not solve the problem and which interfered with the solution. - Added logic to convert to the UTC time zone all timestamp values sent to and received from the data nodes. This is done for both unique and non-unique timestamp columns. It is done for WHERE clauses, applying to SELECT, UPDATE and DELETE statements, and for UPDATE columns. - Disabled Spider's use of direct update when any of the columns to update is a timestamp column. This is necessary to prevent false duplicate key value errors. - Added a new test spider.timestamp to thoroughly test Spider's handling of timestamp values. Author: Jacob Mathew. Reviewer: Kentoku Shiba. Cherry-Picked: Commit 97cc9d3 on branch bb-10.3-MDEV-16246
* Merge 10.2 into 10.3Marko Mäkelä2018-07-072-3/+3
|\
| * MDEV-16664: Change the default to innodb_lock_schedule_algorithm=fcfsMarko Mäkelä2018-07-072-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The parameter innodb_lock_schedule_algorithm was introduced in MariaDB Server 10.1.19, 10.2.13, 10.3.4 as part of MDEV-11039. In MariaDB 10.1, the default value of the parameter is 'fcfs', that is, the existing algorithm is used by default. But in later versions of MariaDB Server, the parameter was 'vats', enabling the new algorithm. Because the new algorithm is triggering a debug assertion failure that suggests corruption of the transactional lock data structures, we will revert to the old algorithm by default until we have resolved the problem.
* | Merge 10.2 into 10.3Marko Mäkelä2018-07-0618-220/+637
|\ \ | |/
| * MDEV-15855 Deadlock between purge thread and DDL statementThirunarayanan Balathandayuthapani2018-07-0614-164/+633
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======== Truncate operation holds MDL on the table (t1) and tries to acquire InnoDB dict_operation_lock. Purge holds dict_operation_lock and tries to acquire MDL on the table (t1) to evaluate virtual column expressions for indexed virtual columns. It leads to deadlock of purge and truncate table (DDL). Solution: ========= If purge tries to acquire MDL on the table then it should do the following: i) Purge should release all innodb latches (including dict_operation_lock) before acquiring metadata lock on the table. ii) After acquiring metadata lock on the table, it should check whether the table was dropped or renamed. If the table is dropped then purge should ignore the undo log record. If the table is renamed then it should release the old MDL and acquire MDL on the new name. iii) Once purge acquires MDL, it should use the SQL table handle for all the remaining virtual index for the purge record. purge_node_t: Introduce new virtual column information to know whether the MDL was acquired successfully. This is joint work with Marko Mäkelä.
| * MDEV-14188 mariabackup.incremental_encrypted wrong resultMarko Mäkelä2018-07-062-0/+2
| | | | | | | | | | | | Add an explicit redo log flush. In this test innodb_flush_log_at_trx_commit was 2 by default. It is also possible that this failure occurs because of MDEV-15740.
| * Removed the test case for MDEV-15151 for the following reasons:Igor Babaev2018-07-052-52/+0
| | | | | | | | | | | | | | 1. The changed variant did not fail without the patch for MDEV-16629 while the original test case did fail. 2. In any case the test case should go to cte_recursive_not_embedded.test that was not created yet.
* | Merge 10.2 into 10.3Marko Mäkelä2018-07-0514-50/+167
|\ \ | |/
| * Clean up a testMarko Mäkelä2018-07-052-7/+7
| | | | | | | | | | | | | | | | At the end of a test, 'connection default' should be in a usable state. This was not the case, because there was a preceding 'send' without a 'reap'. If 'reap' was added, an error would be reported because the server was restarted after the 'send'. It is easiest to 'send' from a separate connection and do the restart from 'connection default'.
| * MDEV-15855: Use atomics for dict_table_t::n_ref_countThirunarayanan Balathandayuthapani2018-07-056-25/+18
| | | | | | | | | | | | | | Make dict_table_t::n_ref_count private, and protect it with a combination of dict_sys->mutex and atomics. We want to be able to invoke dict_table_t::release() without holding dict_sys->mutex.
| * Implement a parameter for wait_all_purged.incMarko Mäkelä2018-07-052-2/+10
| |
| * Fix warnings about possibly uninitialized variablesMarko Mäkelä2018-07-052-2/+2
| |
| * MDEV-16629 "Table Does Not Exist" Error from Recursive CTE Query Inside FunctionIgor Babaev2018-07-053-1/+133
| | | | | | | | | | | | | | | | | | | | | | When processing a query containing with clauses a call of the function check_dependencies_in_with_clauses() before opening tables used in the query is necessary if with clauses include specifications of recursive CTEs. This call was missing if such a query belonged to a stored function. This caused misbehavior of the server: it could report a fake error as in the test case for MDEV-16629 or the executed query could hang as in the test cases for MDEV-16661 and MDEV-15151.
* | MDEV-16675 Unnecessary explicit lock acquisition during UPDATE or DELETEMarko Mäkelä2018-07-0311-82/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In InnoDB, an INSERT will not create an explicit lock object. Instead, the inserted record is initially implicitly locked by the transaction that wrote its trx_t::id to the hidden system column DB_TRX_ID. (Other transactions would check if DB_TRX_ID is referring to a transaction that has not been committed.) If a record was inserted in the current transaction, it would be implicitly locked by that transaction. Only if some other transaction is requesting access to the record, the implicit lock should be converted to an explicit one, so that the waits-for graph can be constructed for detecting deadlocks and lock wait timeouts. Before this fix, InnoDB would convert implicit locks to explicit ones, even if no conflict exists. lock_rec_convert_impl_to_expl(): Return whether caller_trx already holds an explicit lock that covers the record. row_vers_impl_x_locked_low(): Avoid a lookup if the record matches caller_trx->id. lock_trx_has_expl_x_lock(): Renamed from lock_trx_has_rec_x_lock(). row_upd_clust_step(): In a debug assertion, check for implicit lock before invoking lock_trx_has_expl_x_lock(). rw_trx_hash_t::find(): Make do_ref_count a mandatory parameter. Assert that trx_id is not 0 (the caller should check it). trx_sys_t::is_registered(): Only invoke find() if id != 0. trx_sys_t::find(): Add the optional parameter do_ref_count. lock_rec_queue_validate(): Avoid lookup for trx_id == 0.
* | Merge 10.2 into 10.3Marko Mäkelä2018-07-0310-45/+142
|\ \ | |/
| * MDEV-16571 - some backup tests sometimes with missing data after restore.Vladislav Vaintroub2018-07-023-5/+1
| | | | | | | | | | | | | | | | Marko mentions, it could be caused by MDEV-15740 where InnoDB does not flush redo log as often as it should, with innodb_flush_log_at_trx_commit=1 The workaround is to use innodb_flush_log_at_trx_commit=2, which, according to MDEV-15740 is more durable.
| * MDEV-16630: Ambiguous error message when check constraint matches table nameAnel Husakovic2018-07-015-9/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One can create table with the same name for `field` and `table` `check` constraint. For example: `create table t(a int check(a>0), constraint a check(a>10));` But when inserting new rows same error is always raised. For example with ```insert into t values (-1);``` and ```insert into t values (10);``` same error `ER_CONSTRAINT_FAILED` is obtained and it is not clear which constraint is violated. This patch solve this error so that in case if field constraint is violated the first parameter in the error message is `table.field_name` and if table constraint is violated the first parameter in error message is `constraint_name`.
| * amend fix for MDEV-16596 - do not use CREATE_NEW flag when reopening redo ↵Vladislav Vaintroub2018-07-011-0/+1
| | | | | | | | | | | | log file. use OPEN_ALWAYS instead, since we know file already exist.
| * MDEV-16596 : Windows - redo log does not work on native 4K sector disks.Vladislav Vaintroub2018-06-302-31/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | Disks with native 4K sectors need 4K alignment and size for unbuffered IO (i.e for files opened with FILE_FLAG_NO_BUFFERING) Innodb opens redo log with FILE_FLAG_NO_BUFFERING, however it always does 512byte IOs. Thus, the IO on 4K native sectors will fail, rendering Innodb non-functional. The fix is to check whether OS_FILE_LOG_BLOCK_SIZE is multiple of logical sector size, and if it is not, reopen the redo log without FILE_FLAG_NO_BUFFERING flag.
* | Merge mariadb-10.3.8 into 10.3Marko Mäkelä2018-07-03285-1844/+5371
|\ \
| * | after-merge fixmariadb-10.3.8Sergei Golubchik2018-07-021-0/+0
| | |
| * | update C/CSergei Golubchik2018-07-011-0/+0
| | |
| * | Fix deb build failure on Xenial: disable -fPIESergei Golubchik2018-07-011-9/+8
| | | | | | | | | | | | | | | | | | | | | | | | Correct 898a8c3c0ce to work when newer debhelper-10.2 is installed from xenial-backports (or jessie-backports). Use gcc version instead of debproxy version, this is likely a gcc issue (as disabling LTO and gcc's linker plugin fixes it).
| * | Updated list of unstable tests for 10.3.8 releaseElena Stepanova2018-07-011-518/+774
| | |
| * | Merge branch '10.2' into 10.3Sergei Golubchik2018-06-30273-1286/+4469
| |\ \ | | |/
| | * Merge branch '10.1' into 10.2Sergei Golubchik2018-06-287-10/+50
| | |\
| | | * MDEV-16615 ASAN SEGV in handler::print_error or server crash after error ↵Sergei Golubchik2018-06-283-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | upon CREATE TABLE table->in_use is not always set and a KILL signal can arrive anytime.
| | | * MDEV-14014 Multi-Slave Replication Fail: bogus data in log eventAndrei Elkin2018-06-282-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-7257 made a dump thread to read from binlog concurrently with writers as long as the read bytes are below a water-mark (MYSQL_BIN_LOG::binlog_end_pos). However it appeared to be possible a dump thread reader reach out for bytes past the water mark through a feature of IO_CACHE that fills in the internal buffer and while doing so it could read what the reader is not supposed to see (the bytes above MYSQL_BIN_LOG::binlog_end_pos). The issue is fixed with constraining the IO_CACHE buffer fill to respect the watermark. An added unit test proves reading from file is bound to an external parameter passed to {IO_CACHE::end_of_file} cache member.
| | | * mark ed25519 stableSergei Golubchik2018-06-282-2/+2
| | | |
| | | * Merge branch '10.0' into 10.1Sergei Golubchik2018-06-281-2/+0
| | | |\
| | | | * remove double-countingSergei Golubchik2018-06-281-2/+0
| | | | | | | | | | | | | | | | | | | | rnd_pos_by_record calls ha_rnd_pos, which does the counting
| | | | * MDEV-8540 - Crash on server shutdown since 10.0.16Sergey Vojtovich2018-06-271-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only close stdin if it was open initinally. Otherwise we may close file descriptor which is reused for different puprose (specifically for binlog index file in case of this bug).
| | | * | MDEV-15607: mysqld crashed few after node is being joined with sstJan Lindström2018-06-271-4/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a typical systemd response where it tries to shutdown the joiner (due to "timeout") before the joiner manages to complete SST. wsrep_sst_wait wsrep_SE_init_wait While waiting the operation to finish use mysql_cond_timedwait instead of mysql_cond_wait and if operation is not finished extend systemd timeout (if needed).
| | * | | Innodb : do not use errno on Windows to print os_file_pwrite() error.Vladislav Vaintroub2018-06-281-3/+3
| | | | | | | | | | | | | | | | | | | | Use GetLastError() instead.
| | * | | make plugins.processlist more robustSergei Golubchik2018-06-282-5/+4
| | | | |
| | * | | MDEV-14014 Multi-Slave Replication Fail: bogus data in log eventAndrei Elkin2018-06-282-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MDEV-7257 made a dump thread to read from binlog concurrently with writers as long as the read bytes are below a water-mark (MYSQL_BIN_LOG::binlog_end_pos). However it appeared to be possible a dump thread reader reach out for bytes past the water mark through a feature of IO_CACHE that fills in the internal buffer and while doing so it could read what the reader is not supposed to see (the bytes above MYSQL_BIN_LOG::binlog_end_pos). The issue is fixed with constraining the IO_CACHE buffer fill to respect the watermark. An added unit test proves reading from file is bound to an external parameter passed to {IO_CACHE::end_of_file} cache member.
| | * | | MDEV-16473 WITH statement throws 'no database selected' errorSergei Golubchik2018-06-288-45/+13
| | | | | | | | | | | | | | | | | | | | Different fix, just use NULL, not no_db,
| | * | | This is another attempt to fix mdev-16473.Igor Babaev2018-06-286-4/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous correction of the patch for mdev-16473 did not work correctly for the databases whose names started with '*'. Added a test case with a database named "*".
| | * | | Pretty-print table names in some error messagesMarko Mäkelä2018-06-273-6/+5
| | | | |
| | * | | Correction for the patch to fix mdev-16473.Igor Babaev2018-06-262-2/+2
| | | | |
| | * | | Merge 10.1 into 10.2Marko Mäkelä2018-06-2611-9/+188
| | |\ \ \ | | | |/ /
| | | * | Merge 10.0 into 10.1Marko Mäkelä2018-06-2610-9/+184
| | | |\ \ | | | | |/
| | | | * MDEV-15953 Alter InnoDB Partitioned Table ignores pre-existing DATA ↵Marko Mäkelä2018-06-264-0/+123
| | | | |\ | | | | | | | | | | | | | | | | | | DIRECTORY attribute
| | | | | * MDEV-15953 Alter InnoDB Partitioned Table Moves Files (which were originally ↵Eugene Kosov2018-06-264-0/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | not in the datadir) to the datadir ha_innobase::prepare_inplace_alter_table: preserve DATA DICTIONARY for table
| | | | * | MDEV-15242 Poor RBR update performance with partitioned tablesAndrei Elkin2018-06-253-6/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Observed and described partitioned engine execution time difference between master and slave was caused by excessive invocation of base_engine::rnd_init which was done also for partitions uninvolved into Rows-event operation. The bug's slave slowdown therefore scales with the number of partitions. Fixed with applying an upstream patch. References: ---------- https://bugs.mysql.com/bug.php?id=73648 Bug#25687813 REPLICATION REGRESSION WITH RBR AND PARTITIONED TABLES
| | | | * | MDEV-16507 SIGSEGV when use_stat_tables = preferably andIgor Babaev2018-06-233-4/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | optimizer_use_condition_selectivity = 4 It does not makes sense to try to read statistics for temporary tables because it's not collected.
| | * | | | bump the VERSIONDaniel Bartholomew2018-06-261-1/+1
| | | | | |
| | * | | | Merge 10.1 into 10.2Marko Mäkelä2018-06-2610-77/+119
| | |\ \ \ \ | | | |/ / /