mirror of
https://github.com/iredmail/iRedMail
synced 2026-06-08 14:51:59 +00:00
Switch row format of vmail.mailbox to Dynamic.
This commit is contained in:
@@ -15,6 +15,26 @@
|
||||
--
|
||||
-- - bytes
|
||||
-- - messages
|
||||
--
|
||||
-- Old MariaDB may use `COMPAT` row format, it causes error like
|
||||
--
|
||||
-- "Row size too large. The maximum row size for the used table type, not counting BLOBs,
|
||||
-- is 8126. This includes storage overhead, check the manual. You have to change some
|
||||
-- columns to TEXT or BLOBs"
|
||||
--
|
||||
-- DYNAMIC is default innodb row format in MariaDB for years, it is safe to
|
||||
-- switch.
|
||||
|
||||
SET @row_format = (SELECT ROW_FORMAT FROM INFORMATION_SCHEMA.TABLES
|
||||
WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'mailbox');
|
||||
|
||||
SET @sql = IF(@row_format != 'Dynamic',
|
||||
CONCAT('ALTER TABLE mailbox ROW_FORMAT=DYNAMIC;'),
|
||||
'SELECT "Row format is already Dynamic" AS Message;');
|
||||
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
|
||||
drop procedure if exists irm173_schema_change;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user