diff --git a/ChangeLog b/ChangeLog index abfe6a6dd..38c96f3e7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -32,6 +32,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + [export] Added Excel XLSX export module, thanks to Derek Schaefer + [core] Addded ability for tracking changes made through phpMyAdmin ++ rfe #2839504 [engines] Support InnoDB plugin's new row formats 3.2.2.0 (not yet released) - bug #2825293 [structure] Default value for a BIT column diff --git a/libraries/engines/innodb.lib.php b/libraries/engines/innodb.lib.php index dad5948a9..950e4e3d3 100644 --- a/libraries/engines/innodb.lib.php +++ b/libraries/engines/innodb.lib.php @@ -333,6 +333,53 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine { return 'innodb'; } + + /** + * + * Gets the InnoDB plugin version number + * http://www.innodb.com/products/innodb_plugin + * (do not confuse this with phpMyAdmin's storage engine plugins!) + * + * @return string the version number, or empty if not running as a plugin + */ + function getInnodbPluginVersion() + { + return PMA_DBI_fetch_value('SELECT @@innodb_version;'); + } + + /** + * + * Gets the InnoDB file format + * (works only for the InnoDB plugin) + * http://www.innodb.com/products/innodb_plugin + * (do not confuse this with phpMyAdmin's storage engine plugins!) + * + * @return string the InnoDB file format + */ + function getInnodbFileFormat() + { + return PMA_DBI_fetch_value("SHOW GLOBAL VARIABLES LIKE 'innodb_file_format';", 0, 1); + } + + /** + * + * Verifies if this server supports the innodb_file_per_table feature + * (works only for the InnoDB plugin) + * http://www.innodb.com/products/innodb_plugin + * (do not confuse this with phpMyAdmin's storage engine plugins!) + * + * @return boolean whether this feature is supported or not + */ + function supportsFilePerTable() + { + $innodb_file_per_table = PMA_DBI_fetch_value("SHOW GLOBAL VARIABLES LIKE 'innodb_file_per_table';", 0, 1); + if ($innodb_file_per_table == 'ON') { + return true; + } else { + return false; + } + + } } ?> diff --git a/tbl_operations.php b/tbl_operations.php index 2649aa3b8..d0453070c 100644 --- a/tbl_operations.php +++ b/tbl_operations.php @@ -430,6 +430,7 @@ if (isset($auto_increment) && strlen($auto_increment) > 0 // the outer array is for engines, the inner array contains the dropdown // option values as keys then the dropdown option labels + $possible_row_formats = array( 'MARIA' => array( 'FIXED' => 'FIXED', @@ -448,6 +449,20 @@ $possible_row_formats = array( 'COMPACT' => 'COMPACT', 'REDUNDANT' => 'REDUNDANT') ); + +$innodb_engine_plugin = PMA_StorageEngine::getEngine('innodb'); +$innodb_plugin_version = $innodb_engine_plugin->getInnodbPluginVersion(); +if (!empty($innodb_plugin_version)) { + $innodb_file_format = $innodb_engine_plugin->getInnodbFileFormat(); +} else { + $innodb_file_format = ''; +} +if ('Barracuda' == $innodb_file_format && $innodb_engine_plugin->supportsFilePerTable()) { + $possible_row_formats['INNODB']['DYNAMIC'] = 'DYNAMIC'; + $possible_row_formats['INNODB']['COMPRESSED'] = 'COMPRESSED'; +} +unset($innodb_engine_plugin, $innodb_plugin_version, $innodb_file_format); + // for MYISAM there is also COMPRESSED but it can be set only by the // myisampack utility, so don't offer here the choice because if we // try it inside an ALTER TABLE, MySQL (at least in 5.1.23-maria)