Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/classes/Util.php')
-rw-r--r--libraries/classes/Util.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/libraries/classes/Util.php b/libraries/classes/Util.php
index 8338d8e003..2e5a88159b 100644
--- a/libraries/classes/Util.php
+++ b/libraries/classes/Util.php
@@ -1373,6 +1373,7 @@ class Util
$binary = false;
$unsigned = false;
$zerofill = false;
+ $compressed = false;
} else {
$enumSetValues = [];
@@ -1394,6 +1395,8 @@ class Util
$zerofill = ($zerofillCount > 0);
$printType = (string) preg_replace('@unsigned@', '', $printType, -1, $unsignedCount);
$unsigned = ($unsignedCount > 0);
+ $printType = (string) preg_replace('@\/\*!100301 compressed\*\/@', '', $printType, -1, $compressedCount);
+ $compressed = ($compressedCount > 0);
$printType = trim($printType);
}
@@ -1410,6 +1413,14 @@ class Util
$attribute = 'UNSIGNED ZEROFILL';
}
+ if ($compressed) {
+ // With InnoDB page compression, multiple compression algorithms are supported.
+ // In contrast, with InnoDB's COMPRESSED row format, zlib is the only supported compression algorithm.
+ // This means that the COMPRESSED row format has less compression options than InnoDB page compression does.
+ // @see https://mariadb.com/kb/en/innodb-page-compression/#comparison-with-the-compressed-row-format
+ $attribute = 'COMPRESSED=zlib';
+ }
+
$canContainCollation = false;
if (! $binary && preg_match('@^(char|varchar|text|tinytext|mediumtext|longtext|set|enum)@', $type)) {
$canContainCollation = true;