- 13 Dec, 2017 2 commits
-
-
Alexander Barkov authored
The loop in read_xml_field(), unlike the same loop in read_sep_field(), cannot end with item<>NULL, as it does not have any "break" statements. The entire block "if (item) {...}" was a dead code.
-
Alexander Barkov authored
The fixes for these bugs: Bug#27586 Wrong autoinc value assigned by LOAD DATA in the NO_AUTO_VALUE_ON_ZERO mode Bug#22372 Disable spatial key, load data, enable spatial key, crashes table fixed only LOAD DATA INFILE, but did not fix LOAD XML INFILE. This patch does for LOAD XML FILE what patches for Bug#27586 and Bug#22372 earlier did for LOAD DATA INFILE. 1. Fixing the auto_increment problem: a. table->auto_increment_field_not_null is not set to TRUE anymore when a column does not have a corresponding XML tag. b. Adding "table->auto_increment_field_not_null= false" in the end of read_xml_field(). These two changes resemble the patch for Bug#27586. 2. Fixing the GEOMETRY problem: The result for "reset()" was not tested for errors in read_xml_field(), which made it possible for empty string to sneak into a "GEOMETRY NOT NULL" column when this column does not have a corresponding XML tag with data. After this patch the result of reset() is tested and and an error is returned in such cases. This change effectively resembles the patch for Bug#22372 3. Spliting the code into a new virtual method Field::load_data_set_null(). Rationale: a. To avoid duplicate code in read_sep_field() and read_xml_field(): Changes #1 and #2 made the code handling NULL values for Field exactly the same in read_sep_field() and read_xml_field(). b. To avoid tests for field_type(), which is not friendly to upcoming data type plugins. This change makes it possible for data type plugins to implement their own special way for handling NULL values in LOAD DATA by overriding Field_xxx::load_data_set_null(), like Field_geom and Field_timestamp do.
-
- 12 Dec, 2017 5 commits
-
-
Monty authored
If connection was not blocked, the 'db' was not properly reset This bug didn't affect information_schema
-
Marko Mäkelä authored
-
Marko Mäkelä authored
-
Sergei Petrunia authored
Part #2: Take into accont the fact that three binary collations that we handle are technically NOPAD collations
-
Marko Mäkelä authored
-
- 11 Dec, 2017 11 commits
-
-
Sergei Petrunia authored
Disallow use of NOPAD collations in indexed columns.
-
Marko Mäkelä authored
-
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_mvcc(): Skip locks on delete-marked committed records upfront, instead of invoking row_unlock_for_mysql() afterwards. The unlocking never worked for secondary index records.
-
Marko Mäkelä authored
dict_stats_rename_table(): After DB_LOCK_WAIT_TIMEOUT or DB_DUPLICATE_KEY, reset the trx->error_state before retrying. Also, properly treat DB_DEADLOCK as a hard error.
-
Marko Mäkelä authored
-
Sergei Petrunia authored
Part #2: Adjust other parts of testsuite to take into account that RocksDB files are in "#rocksdb" now.
-
Sergei Petrunia authored
Part2: make MyRocks add its directory into @@ignore_db_dirs when starting. This is necessary because apparently not everybody are using plugin's my.cnf So load ha_rocksdb.{so,dll} manually and then hit MDEV-12451, MDEV-14461 etc.
-
Sergei Petrunia authored
Rename Use '#rocksdb' instead of '.rocksdb' as subdirectory for RocksDB datadir.
-
Marko Mäkelä authored
MDEV-14614 InnoDB: Failing assertion: trx->error_state == DB_SUCCESS or lock wait timeout upon saving statistics The assertion failure was caused by MDEV-14511 Use fewer transactions for updating InnoDB persistent statistics We are reusing a transaction object after commit, and sometimes, even after a successful operation, the trx_t::error_state may be something else than DB_SUCCESS. Reset the field when needed.
-
Marko Mäkelä authored
-
- 08 Dec, 2017 17 commits
-
-
Sergey Vojtovich authored
-
Marko Mäkelä authored
Before MySQL 5.7 or MariaDB 10.2.2, there used to be some magic InnoDB table names that would assign some InnoDB flags on CREATE TABLE or DROP TABLE.
-
Marko Mäkelä authored
Starting with MySQL 5.7 (or MariaDB 10.2.2) InnoDB no longer contains the "table monitor" or "tablespace monitor". The conditions on srv_print_innodb_tablespace_monitor, srv_print_innodb_table_monitor never hold. So, the code was dead. Also, remove a bogus reference to dict_print(), which used to implement the InnoDB table monitor.
-
Marko Mäkelä authored
fil_get_space_names(): Remove. fts_drop_orphaned_tables(): Iterate fil_system->space_list directly.
-
Marko Mäkelä authored
-
Vladislav Vaintroub authored
-
Monty authored
- Changed rocksdb.2pcgroup_commit.test to print information on error - Updated myisam_views-big.result
-
Monty authored
LOCK_thd_data was used to protect both THD data and ensure that the THD is not deleted while it was in use This patch moves the THD delete protection to LOCK_thd_kill, which already protects the THD for kill. The benefits are: - More well defined what LOCK_thd_data protects - LOCK_thd_data usage is now much simpler and easier to verify - Less chance of deadlocks in SHOW PROCESS LIST as there is less chance of interactions between mutexes - Remove not needed LOCK_thread_count from thd_get_error_context_description() - Fewer mutex taken for thd->awake() Other things: - Don't take mysys->var mutex in show processlist to check if thread is kill marked - thd->awake() now automatically takes the LOCK_thd_kill mutex (Simplifies code) - Apc uses LOCK_thd_kill instead of LOCK_thd_data
-
Monty authored
-
Monty authored
This will allow show processlist to continue, without blocking all new connections, if some threads gets stuck while holding LOCK_thd_data or mysys_var->mutex Connections that has mutex 'stuck' are marked as 'Busy' in 'Command' Todo: Make F_BACKOFF to do 'pause' instead of just (1)
-
Sergey Vojtovich authored
Moved InnoDB UT_RELAX_CPU() to server. Restored cross-platform LF_BACKOFF implementation basing on UT_RELAX_CPU().
-
Jan Lindström authored
-
Alexander Barkov authored
-
Marko Mäkelä authored
Allow DROP TABLE `#mysql50##sql-...._.` to drop tables that were being rebuilt by ALGORITHM=INPLACE NOTE: If the server is killed after the table-rebuilding ALGORITHM=INPLACE commits inside InnoDB but before the .frm file has been replaced, then the recovery will involve something else than DROP TABLE. NOTE: If the server is killed in a true inplace ALTER TABLE commits inside InnoDB but before the .frm file has been replaced, then we are really out of luck. To properly handle that situation, we would need a transactional mysql.ddl_fixup table that directs recovery to rename or remove files. prepare_inplace_alter_table_dict(): Use the altered_table->s->table_name for generating the new_table_name. table_name_t::part_suffix: The start of the partition name suffix. table_name_t::dbend(): Return the end of the schema name. table_name_t::dblen(): Return the length of the schema name, in bytes. table_name_t::basename(): Return the name without the schema name. table_name_t::part(): Return the partition name, or NULL if none. row_drop_table_for_mysql(): Assert for #sql, not #sql-ib.
-
Marko Mäkelä authored
-
Marko Mäkelä authored
fseg_alloc_free_page_low(): Remove a bogus and redundant assertion about fil_space_t::purpose. The debug function fsp_space_modify_check() is asserting something similar, but more accurately.
-
Alexander Barkov authored
-
- 07 Dec, 2017 5 commits
-
-
Sergei Petrunia authored
Update the .result file. Old EXPLAIN output was incorrect due to hitting MDEV-14563.
-
Alexander Barkov authored
-
Jan Lindström authored
-
Jan Lindström authored
MDEV-14401: Stored procedure that declares a handler that catches ER_LOCK_DEADLOCK error causes thd->is_error() assertion This was missing bug fix from MySQL wsrep i.e. Galera. Problem was that if stored procedure declares a handler that catches deadlock error, then the error may have been cleared in method sp_rcontext::handle_sql_condition(). Use wsrep_conflict_state correctly to determine is the error already sent to client. Add test case for both this bug and MDEV-12837: WSREP: BF lock wait long. Test requires both fixes to pass.
-
Jan Lindström authored
Problem was a merge error from MySQL wsrep i.e. Galera. wsrep_on_check New check function. Galera can't be enabled if innodb-lock-schedule-algorithm=VATS. innobase_kill_query In Galera async kill we could own lock mutex. innobase_init If Variance-Aware-Transaction-Sheduling Algorithm (VATS) is used on Galera we fall back to First-Come-First-Served (FCFS) with notice to user. Changed innodb-lock-schedule-algorithm as read-only parameter as it was designed to be. lock_reset_lock_and_trx_wait Use ib::hex() to print out transaction ID. lock_rec_other_has_expl_req, lock_rec_other_has_conflicting, RecLock::add_to_waitq lock_rec_lock_slow lock_table_other_has_incompatible lock_rec_insert_check_and_lock lock_prdt_other_has_conflicting Change pointer to conflicting lock to normal pointer as this pointer contents could be changed later. RecLock::create Conclicting lock pointer is moved to last parameter with default value NULL. This conflicting transaction could be selected as victim in Galera if requesting transaction is BF (brute force) transaction. In this case contents of conflicting lock pointer will be changed. Use ib::hex() to print transaction ids.
-