From 61d8c134f60de0bb61c7ad7472ad9a594a0b5843 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 26 Jun 2024 19:19:56 +0200 Subject: [PATCH] Switched to ROW_FORMAT DYNAMIC for better compatibility with MariaDB 10.3 / 10.11 (#4027) Co-authored-by: Fabrizio Balliano --- app/code/core/Mage/Catalog/etc/config.xml | 2 +- .../mysql4-install-1.4.0.0.0.php | 2 +- .../mysql4-upgrade-0.7.36-0.7.37.php | 2 +- .../mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php | 2 +- .../upgrade-1.6.0.0.19.1.6-1.6.0.0.19.1.7.php | 23 +++++++++++++++++++ 5 files changed, 27 insertions(+), 4 deletions(-) create mode 100644 app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.19.1.6-1.6.0.0.19.1.7.php diff --git a/app/code/core/Mage/Catalog/etc/config.xml b/app/code/core/Mage/Catalog/etc/config.xml index 61cfb611821..c2d63d39cd8 100644 --- a/app/code/core/Mage/Catalog/etc/config.xml +++ b/app/code/core/Mage/Catalog/etc/config.xml @@ -17,7 +17,7 @@ - 1.6.0.0.19.1.6 + 1.6.0.0.19.1.7 diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php index a70bca2defb..558e59023a2 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-install-1.4.0.0.0.php @@ -503,7 +503,7 @@ KEY `FK_CATALOG_PRODUCT_WEBSITE_WEBSITE` (`website_id`), CONSTRAINT `FK_CATALOG_PRODUCT_WEBSITE_WEBSITE` FOREIGN KEY (`website_id`) REFERENCES `{$installer->getTable('core/website')}` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `FK_CATALOG_WEBSITE_PRODUCT_PRODUCT` FOREIGN KEY (`product_id`) REFERENCES `{$installer->getTable('catalog_product_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = FIXED; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = DYNAMIC; -- DROP TABLE IF EXISTS `{$installer->getTable('catalog_product_entity_media_gallery')}`; CREATE TABLE `{$installer->getTable('catalog_product_entity_media_gallery')}` ( diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php index 9de090e5f52..ed1bd60efd0 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-0.7.36-0.7.37.php @@ -29,7 +29,7 @@ REFERENCES `{$installer->getTable('catalog_product_entity')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `FK_CATAOLOG_PRODUCT_WEBSITE_WEBSITE` FOREIGN KEY `FK_CATAOLOG_PRODUCT_WEBSITE_WEBSITE` (`website_id`) REFERENCES `{$installer->getTable('core_website')}` (`website_id`) ON DELETE CASCADE ON UPDATE CASCADE, - ROW_FORMAT = FIXED; + ROW_FORMAT = DYNAMIC; "); } catch (Exception $e) { } diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php index 8f07aa89113..6b80c3facb3 100644 --- a/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/mysql4-upgrade-1.4.0.0.4-1.4.0.0.5.php @@ -27,7 +27,7 @@ KEY `IDX_CHILD` (`child_id`), CONSTRAINT `FK_CATALOG_PRODUCT_RELATION_CHILD` FOREIGN KEY (`child_id`) REFERENCES `{$installer->getTable('catalog/product')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE, CONSTRAINT `FK_CATALOG_PRODUCT_RELATION_PARENT` FOREIGN KEY (`parent_id`) REFERENCES `{$installer->getTable('catalog/product')}` (`entity_id`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=INNODB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; +) ENGINE=INNODB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; INSERT IGNORE INTO `{$installer->getTable('catalog/product_relation')}` SELECT diff --git a/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.19.1.6-1.6.0.0.19.1.7.php b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.19.1.6-1.6.0.0.19.1.7.php new file mode 100644 index 00000000000..242350b0c9e --- /dev/null +++ b/app/code/core/Mage/Catalog/sql/catalog_setup/upgrade-1.6.0.0.19.1.6-1.6.0.0.19.1.7.php @@ -0,0 +1,23 @@ +startSetup(); + +$installer->run("ALTER TABLE {$this->getTable('catalog/product_website')} ROW_FORMAT=DYNAMIC;"); +$installer->run("ALTER TABLE {$this->getTable('catalog/product_relation')} ROW_FORMAT=DYNAMIC;"); + +$installer->endSetup();