summaryrefslogtreecommitdiff
path: root/storage/xtradb/handler/handler0alter.cc
Commit message (Collapse)AuthorAgeFilesLines
* Merge 10.1 into 10.2Marko Mäkelä2020-09-291-0/+6
|\
| * MDEV-22277 LeakSanitizer: detected memory leaks in ↵Thirunarayanan Balathandayuthapani2020-09-281-0/+6
| | | | | | | | | | | | | | mem_heap_create_block_func after attempt to create foreign key - During online DDL, prepare phase error handler fails to remove the memory allocated for newly created foreign keys.
* | Merge 10.1 into 10.2Marko Mäkelä2019-09-181-4/+3
|\ \ | |/
| * MDEV-19529 InnoDB hang on DROP FULLTEXT INDEXThirunarayanan Balathandayuthapani2019-09-181-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: ======= During dropping of fts index, InnoDB waits for fts_optimize_remove_table() and it holds dict_sys->mutex and dict_operaiton_lock even though the table id is not present in the queue. But fts_optimize_thread does wait for dict_sys->mutex to process the unrelated table id from the slot. Solution: ======== Whenever table is added to fts_optimize_wq, update the fts_status of in-memory fts subsystem to TABLE_IN_QUEUE. Whenever drop index wants to remove table from the queue, it can check the fts_status to decide whether it should send the MSG_DELETE_TABLE to the queue. Removed the following functions because these are all deadcode. dict_table_wait_for_bg_threads_to_exit(), fts_wait_for_background_thread_to_start(),fts_start_shutdown(), fts_shudown().
* | Merge 10.1 into 10.2Marko Mäkelä2019-05-131-1/+1
|\ \ | |/
| * Merge branch '5.5' into 10.1Vicențiu Ciorbaru2019-05-111-1/+1
| |\
| | * Follow-up to changing FSF addressVicențiu Ciorbaru2019-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some places didn't match the previous rules, making the Floor address wrong. Additional sed rules: sed -i -e 's/Place.*Suite .*, Boston/Street, Fifth Floor, Boston/g' sed -i -e 's/Suite .*, Boston/Fifth Floor, Boston/g'
* | | Merge branch '10.1' into 10.2Oleksandr Byelkin2019-05-041-2/+19
|\ \ \ | |/ /
| * | Bug#28573894 ALTER PARTITIONED TABLE ADD AUTO_INCREMENT DIFF RESULT ↵Marko Mäkelä2019-04-251-1/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DEPENDING ON ALGORITHM For partitioned table, ensure that the AUTO_INCREMENT values will be assigned from the same sequence. This is based on the following change in MySQL 5.6.44: commit aaba359c13d9200747a609730dafafc3b63cd4d6 Author: Rahul Malik <rahul.m.malik@oracle.com> Date: Mon Feb 4 13:31:41 2019 +0530 Bug#28573894 ALTER PARTITIONED TABLE ADD AUTO_INCREMENT DIFF RESULT DEPENDING ON ALGORITHM Problem: When a partition table is in-place altered to add an auto-increment column, then its values are starting over for each partition. Analysis: In the case of in-place alter, InnoDB is creating a new sequence object for each partition. It is default initialized. So auto-increment columns start over for each partition. Fix: Assign old sequence of the partition to the sequence of next partition so it won't start over. RB#21148 Reviewed by Bin Su <bin.x.su@oracle.com>
| * | Clean up ib_sequence::m_max_valueMarko Mäkelä2019-04-251-1/+1
| | | | | | | | | | | | | | | | | | | | | Correctly document the usage of m_max_value. Remove the const qualifier, so that the implicit assignment operator can be used. Make all members of ib_sequence private, and add an accessor member function max_value().
* | | Merge 10.1 into 10.2Marko Mäkelä2019-04-031-10/+2
|\ \ \ | |/ /
| * | Fix -Wnonnull-compareMarko Mäkelä2019-04-031-10/+2
| | | | | | | | | | | | | | | InnoDB and XtraDB had redundant assertions for checking that function parameters that were declared as nonnull were not NULL.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-03-071-2/+10
|\ \ \ | |/ / | | | | | | | | | | | | Rewrite the MDEV-13818 fix to prevent heap-use-after-free. Add a test case for MDEV-18272.
| * | MDEV-13818 CREATE INDEX leaks memory if running out of undo log spaceMarko Mäkelä2019-03-071-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | row_merge_create_index_graph(): Relay the internal state from dict_create_index_step(). Our caller should free the index only if it was not copied, added to the cache, and freed. row_merge_create_index(): Free the index template if it was not added to the cache. This is a safer variant of the logic that was introduced in 65070beffd2e9279145b48d1f27c517b6588e543 in 10.2. prepare_inplace_alter_table_dict(): Add additional fault injection to exercise a code path where we have already added an index to the cache.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-03-041-1/+1
|\ \ \ | |/ /
| * | MDEV-18732 InnoDB: ALTER IGNORE returns error for NULLMarko Mäkelä2019-03-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Only starting with MariaDB 10.3.8 (MDEV-16365), InnoDB can actually handle ALTER IGNORE TABLE correctly when introducing a NOT NULL attribute to a column that contains a NULL value. Between MariaDB Server 10.0 and 10.2, we would incorrectly return an error for ALTER IGNORE TABLE when the column contains a NULL value.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-02-111-1/+0
|\ \ \ | |/ /
| * | MDEV-18016: Cover the no-rebuild case, and remove a bogus debug assertionMarko Mäkelä2019-02-111-1/+0
| | | | | | | | | | | | | | | | | | The code path where the table was not being rebuilt during ALTER TABLE was not covered by the test. Add coverage, and remove the debug assertion that could fail in this case.
* | | Merge 10.1 into 10.2Marko Mäkelä2019-02-031-43/+41
|\ \ \ | |/ / | | | | | | | | | | | | Temporarily disable a test for commit 2175bfce3e9da8332f10ab0e0286dc93915533a2 because fixing it in 10.2 requires updating libmariadb.
| * | Merge 10.1 into 10.1Marko Mäkelä2019-02-021-43/+41
| |\ \ | | | | | | | | | | | | This is joint work with Oleksandr Byelkin.
| | * | MDEV-18016: Assertion failure on ALTER TABLE after foreign_key_checks=0Marko Mäkelä2019-01-291-34/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ha_innobase::commit_inplace_alter_table(): Do not crash if innobase_update_foreign_cache() returns an error. It can return an error on ALTER TABLE if an inconsistent FOREIGN KEY constraint was created earlier when SET foreign_key_checks=0 was in effect. Instead, report a warning to the client that constraints cannot be loaded.
| | * | MDEV-18256 Duplicated call to dict_foreign_remove_from_cache()Marko Mäkelä2019-01-291-5/+13
| | | | | | | | | | | | | | | | | | | | ha_innobase::prepare_inplace_alter_table(): Filter out duplicates from ha_alter_info->alter_info->drop_list.elements.
| | * | MDEV-18222: Duplicated call to dict_foreign_remove_from_cache()Marko Mäkelä2019-01-291-4/+4
| | | | | | | | | | | | | | | | | | | | innobase_rename_column_try(): Declare fk_evict as std::set instead of std::list, in order to filter out duplicates.
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2019-01-031-1/+1
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2019-01-031-1/+1
| |\ \ \ | | |/ /
| | * | compilation warning on WindowsSergei Golubchik2019-01-021-1/+1
| | | |
* | | | Merge branch '10.1' into 10.2mariadb-10.2.21Sergei Golubchik2018-12-301-14/+18
|\ \ \ \ | |/ / /
| * | | Merge branch '10.0' into 10.1Sergei Golubchik2018-12-291-14/+18
| |\ \ \ | | |/ /
| | * | MDEV-18041 Database corruption after renaming a prefix-indexed columnEugene Kosov2018-12-291-14/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression after MDEV-13671. The bug is related to key part prefix lengths wich are stored in SYS_FIELDS. Storage format is not obvious and was handled incorrectly which led to data dictionary corruption. SYS_FIELDS.POS actually contains prefix length too in case if any key part has prefix length. innobase_rename_column_try(): fixed prefixes handling Tests for prefixed indexes added too. Closes #1063
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-12-121-3/+2
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2018-12-121-3/+2
| |\ \ \ | | |/ /
| | * | MDEV-17833 ALTER TABLE is not enforcing prefix index size limitEugene Kosov2018-12-111-3/+2
| | | | | | | | | | | | | | | | | | | | ha_innobase::prepare_inplace_alter_table(): check max column length for every index in a table, not just added in this particular ALTER TABLE with ADD INDEX ones.
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-11-061-15/+15
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2018-11-051-15/+15
| |\ \ \ | | |/ /
| | * | MDEV-13671 InnoDB should use case-insensitive column name comparisons like ↵Eugene Kosov2018-11-051-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the rest of the server Problem affects INPLACE ALTER rename columns. innobase_rename_column_try(): some strcmp() was replaced with my_strcasecmp(), queries to update data dictionary was updated to not match column name case.
* | | | Merge branch '10.1' into 10.2Oleksandr Byelkin2018-09-141-10/+10
|\ \ \ \ | |/ / /
| * | | Merge branch '11.0' into 10.1Oleksandr Byelkin2018-09-061-10/+10
| |\ \ \ | | |/ /
| | * | cleanup: FOREIGN_KEY_INFOSergei Golubchik2018-09-041-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of returning strings for CASCADE/RESTRICT from every storage engine, use enum values Backport of a3614d33e8a
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-08-021-51/+68
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2018-07-311-51/+68
| |\ \ \ | | |/ /
| | * | MDEV-16855 Fix fts_sync_synchronization in InnoDBMarko Mäkelä2018-07-301-32/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of the following fix from MySQL 5.7.23. Some code refactoring has been omitted, and the test case has been adapted to MariaDB. commit 7a689acaa65e9d602575f7aa53fe36a64a07460f Author: Krzysztof Kapuścik <krzysztof.kapuscik@oracle.com> Date: Tue Mar 13 12:34:03 2018 +0100 Bug#27082268 Invalid FTS sync synchronization The fix closes two issues: Bug #27082268 - INNODB: FAILING ASSERTION: SYM_NODE->TABLE != NULL DURING FTS SYNC Bug #27095935 - DEADLOCK BETWEEN FTS_DROP_INDEX AND FTS_OPTIMIZE_SYNC_TABLE Both issues were related to a FTS cache sync being done during operations that perfomed DDL actions on internal FTS tables (ALTER TABLE, TRUNCATE). In some cases the FTS tables and/or internal cache structures could get removed while still being used to perform FTS synchronization leading to crashes. In other the sync operations could not get finishes as it was waiting for dict lock which was taken by thread waiting for the background sync to be finished. The changes done includes: - Stopping background operations during ALTER TABLE and TRUNCATE. - Removal of unused code in FTS. - Cleanup of FTS sync related code to make it more readable and easier to maintain. RB#18262
| | * | Apply the 5.6.40 security fixes to XtraDBMarko Mäkelä2018-07-301-18/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We did not merge Percona XtraDB 5.6.40-84.0 yet. The changes in it are mostly cosmetic, except for 2 bug fixes from Oracle MySQL 5.6.40, which could be security bugs. This was achieved by taking the applicable parts of an earlier InnoDB commit to XtraDB: git diff 15ec8c2f28f08517ecbffb959d756b4bdd53ab45{~,} storage/innobase| sed -e s+/innobase/+/xtradb/+|patch -p1
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-06-261-0/+6
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2018-06-261-0/+6
| |\ \ \ | | |/ /
| | * | MDEV-15953 Alter InnoDB Partitioned Table Moves Files (which were originally ↵Eugene Kosov2018-06-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | not in the datadir) to the datadir ha_innobase::prepare_inplace_alter_table: preserve DATA DICTIONARY for table
* | | | Merge branch '10.1' into 10.2Sergei Golubchik2018-05-101-23/+29
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2018-05-071-23/+29
| |\ \ \ | | |/ /
| | * | MDEV-14693 XA: Assertion `!clust_index->online_log' failed in ↵Marko Mäkelä2018-05-071-23/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rollback_inplace_alter_table ha_innobase::commit_inplace_alter_table(): Defer the freeing of ctx->trx until after the operation has been successfully committed. In this way, rollback on a partitioned table will be possible. rollback_inplace_alter_table(): Handle ctx->new_table == NULL when ctx->trx != NULL.
* | | | Merge 10.1 into 10.2Marko Mäkelä2018-04-241-8/+4
|\ \ \ \ | |/ / /
| * | | Merge 10.0 into 10.1Marko Mäkelä2018-04-241-8/+4
| |\ \ \ | | |/ /