summaryrefslogtreecommitdiff
path: root/storage/innobase/handler/ha_innodb.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-09-06 11:40:27 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-09-07 22:10:03 +0300
commit754727bb8a4a1850666ef024d5caad04512822db (patch)
tree701b077fe5d4166f9dd174172231e86f97075fd6 /storage/innobase/handler/ha_innodb.cc
parentcf2a4426a2e864f35d002b1595fdffd4fe85ee4e (diff)
downloadmariadb-git-754727bb8a4a1850666ef024d5caad04512822db.tar.gz
MDEV-14378 In ALGORITHM=INPLACE, use a common name for the intermediate tables or partitions
This is a backport of commit 07e9ff1fe18999e1acd640ee3b2169c3f506fb35. 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.
Diffstat (limited to 'storage/innobase/handler/ha_innodb.cc')
-rw-r--r--storage/innobase/handler/ha_innodb.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 0fdfaa449fd..7bb84b41a11 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -294,11 +294,7 @@ is_partition(
{
/* We look for pattern #P# to see if the table is partitioned
MariaDB table. */
-#ifdef _WIN32
- return strstr(file_name, "#p#");
-#else
- return strstr(file_name, "#P#");
-#endif /* _WIN32 */
+ return strstr(file_name, table_name_t::part_suffix);
}
/** Signal to shut down InnoDB (NULL if shutdown was signaled, or if