summaryrefslogtreecommitdiff
path: root/mysql-test/r/partition_myisam.result
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch '5.5' into 10.0Vicențiu Ciorbaru2017-03-031-0/+16
|\
| * MDEV-10418 Assertion `m_extra_cache' failed inAlexey Botchkov2017-02-221-0/+16
| | | | | | | | | | | | | | ha_partition::late_extra_cache(uint). m_extra_prepare_for_update should be cleaned in ha_partition::reset()
| * mysql-5.5.33 mergeSergei Golubchik2013-09-061-2/+2
| |\
| | * Bug#13548704 ALGORITHM USED FOR DROPPING PARTITIONED TABLE CAN LEADAditya A2013-06-141-2/+2
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | TO INCONSISTENCY [Merge from 5.1]
| | * | Bug#16274455: CAN NOT ACESS PARTITIONED TABLES WHENMattias Jonsson2013-02-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DOWNGRADED FROM 5.6.11 TO 5.6.10 Problem was new syntax not accepted by previous version. Fixed by adding version comment of /*!50531 around the new syntax. Like this in the .frm file: 'PARTITION BY KEY /*!50611 ALGORITHM = 2 */ () PARTITIONS 3' and also changing the output from SHOW CREATE TABLE to: CREATE TABLE t1 (a INT) /*!50100 PARTITION BY KEY */ /*!50611 ALGORITHM = 1 */ /*!50100 () PARTITIONS 3 */ It will always add the ALGORITHM into the .frm for KEY [sub]partitioned tables, but for SHOW CREATE TABLE it will only add it in case it is the non default ALGORITHM = 1. Also notice that for 5.5, it will say /*!50531 instead of /*!50611, which will make upgrade from 5.5 > 5.5.31 to 5.6 < 5.6.11 fail! If one downgrades an fixed version to the same major version (5.5 or 5.6) the bug 14521864 will be visible again, but unless the .frm is updated, it will work again when upgrading again. Also fixed so that the .frm does not get updated version if a single partition check passes.
| | * | Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONINGMattias Jonsson2013-01-301-1/+1
| | |\ \ | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to an internal change in the server code in between 5.1 and 5.5 (wl#2649) the hash function used in KEY partitioning changed for numeric and date/time columns (from binary hash calculation to character based hash calculation). Also enum/set changed from latin1 ci based hash calculation to binary hash between 5.1 and 5.5. (bug#11759782). These changes makes KEY [sub]partitioned tables on any of the affected column types incompatible with 5.5 and above, since the calculation of partition id differs. Also since InnoDB asserts that a deleted row was previously read (positioned), the server asserts on delete of a row that is in the wrong partition. The solution for this situation is: 1) The partitioning engine will check that delete/update will go to the partition the row was read from and give an error otherwise, consisting of the rows partitioning fields. This will avoid asserts in InnoDB and also alert the user that there is a misplaced row. A detailed error message will be given, including an entry to the error log consisting of both table name, partition and row content (PK if exists, otherwise all partitioning columns). 2) A new optional syntax for KEY () partitioning in 5.5 is allowed: [SUB]PARTITION BY KEY [ALGORITHM = N] (list_of_cols) Where N = 1 uses the same hashing as 5.1 (Numeric/date/time fields uses binary hashing, ENUM/SET uses charset hashing) N = 2 uses the same hashing as 5.5 (Numeric/date/time fields uses charset hashing, ENUM/SET uses binary hashing). If not set on CREATE/ALTER it will default to 2. This new syntax should probably be ignored by NDB. 3) Since there is a demand for avoiding scanning through the full table, during upgrade the ALTER TABLE t PARTITION BY ... command is considered a no-op (only .frm change) if everything except ALGORITHM is the same and ALGORITHM was not set before, which allows manually upgrading such table by something like: ALTER TABLE t PARTITION BY KEY ALGORITHM = 1 () or ALTER TABLE t PARTITION BY KEY ALGORITHM = 2 () 4) Enhanced partitioning with CHECK/REPAIR to also check for/repair misplaced rows. (Also works for ALTER TABLE t CHECK/REPAIR PARTITION) CHECK FOR UPGRADE: If the .frm version is < 5.5.3 and uses KEY [sub]partitioning and an affected column type then it will fail with an message: KEY () partitioning changed, please run: ALTER TABLE `test`.`t1` PARTITION BY KEY ALGORITHM = 1 (a) PARTITIONS 12 (i.e. current partitioning clause, with the addition of ALGORITHM = 1) CHECK without FOR UPGRADE: if MEDIUM (default) or EXTENDED options are given: Scan all rows and verify that it is in the correct partition. Fail for the first misplaced row. REPAIR: if default or EXTENDED (i.e. not QUICK/USE_FRM): Scan all rows and every misplaced row is moved into its correct partitions. 5) Updated mysqlcheck (called by mysql_upgrade) to handle the new output from CHECK FOR UPGRADE, to run the ALTER statement instead of running REPAIR. This will allow mysql_upgrade (or CHECK TABLE t FOR UPGRADE) to upgrade a KEY [sub]partitioned table that has any affected field type and a .frm version < 5.5.3 to ALGORITHM = 1 without rebuild. Also notice that if the .frm has a version of >= 5.5.3 and ALGORITHM is not set, it is not possible to know if it consists of rows from 5.1 or 5.5! In these cases I suggest that the user does: (optional) LOCK TABLE t WRITE; SHOW CREATE TABLE t; (verify that it has no ALGORITHM = N, and to be safe, I would suggest backing up the .frm file, to be used if one need to change to another ALGORITHM = N, without needing to rebuild/repair) ALTER TABLE t <old partitioning clause, but with ALGORITHM = N>; which should set the ALGORITHM to N (if the table has rows from 5.1 I would suggest N = 1, otherwise N = 2) CHECK TABLE t; (here one could use the backed up .frm instead and change to a new N and run CHECK again and see if it passes) and if there are misplaced rows: REPAIR TABLE t; (optional) UNLOCK TABLES;
* | | | MDEV-8287 DROP TABLE suppresses all engine errorsSergei Golubchik2015-06-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in ha_delete_table() * only convert ENOENT and HA_ERR_NO_SUCH_TABLE to warnings * only return real error codes (that is, not ENOENT and not HA_ERR_NO_SUCH_TABLE) * intercept HA_ERR_ROW_IS_REFERENCED to generate backward compatible ER_ROW_IS_REFERENCED in mysql_rm_table_no_locks() * no special code to handle HA_ERR_ROW_IS_REFERENCED * no special code to handle ENOENT and HA_ERR_NO_SUCH_TABLE * return multi-table error ER_BAD_TABLE_ERROR <table list> only when there were many errors, not when there were many tables to drop (but only one table generated an error)
* | | | 10.0-monty mergeSergei Golubchik2013-07-211-66/+63
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | includes: * remove some remnants of "Bug#14521864: MYSQL 5.1 TO 5.5 BUGS PARTITIONING" * introduce LOCK_share, now LOCK_ha_data is strictly for engines * rea_create_table() always creates .par file (even in "frm-only" mode) * fix a 5.6 bug, temp file leak on dummy ALTER TABLE
| * | | | merge few bug fixes from 5.6Sergei Golubchik2013-07-171-0/+74
| | | | |
| * | | | Fixed all remaining failures in partition tests. Igor Babaev2013-07-081-78/+1
| |/ / / | | | | | | | | | | | | Commented out the test case for bug 50036 as it was done in mysql-5.6.10.
* | | | * don't use 1-8 numbers for open_table_error codes, use an enum.Sergei Golubchik2013-04-091-1/+0
|/ / / | | | | | | | | | | | | | | | | | | | | | * print "table doesn't exist in engine" when a table doesn't exist in the engine, instead of "file not found" (if no file was involved) * print a complete filename that cannot be found ('t1.MYI', not 't1') * it's not an error for a DROP if a table doesn't exist in the engine (or some table files cannot be found) - if the DROP succeeded regardless
* | | after merge changes:Sergei Golubchik2011-12-121-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | * rename all debugging related command-line options and variables to start from "debug-", and made them all OFF by default. * replace "MySQL" with "MariaDB" in error messages * "Cast ... converted ... integer to it's ... complement" is now a note, not a warning * @@query_cache_strip_comments now has a session scope, not global.
* | mergeMattias Jonsson2011-04-271-0/+9
|\ \ | |/
| * Post push fix for bug#11766249 bug#59316Mattias Jonsson2011-04-271-0/+90
| | | | | | Partitions can have different ref_length (position data length). Removed DBUG_ASSERT which crashed debug builds when using MAX_ROWS on some partitions.
* Backport of bug#11891417 from mysql-trunk to mysql-5.5Mattias Jonsson2011-03-311-0/+241