rfe #2839504 [engines] Support InnoDB plugin new row formats
This commit is contained in:
@@ -32,6 +32,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
+ [export] Added Excel XLSX export module,
|
+ [export] Added Excel XLSX export module,
|
||||||
thanks to Derek Schaefer
|
thanks to Derek Schaefer
|
||||||
+ [core] Addded ability for tracking changes made through phpMyAdmin
|
+ [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)
|
3.2.2.0 (not yet released)
|
||||||
- bug #2825293 [structure] Default value for a BIT column
|
- bug #2825293 [structure] Default value for a BIT column
|
||||||
|
@@ -333,6 +333,53 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
|
|||||||
{
|
{
|
||||||
return 'innodb';
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
@@ -430,6 +430,7 @@ if (isset($auto_increment) && strlen($auto_increment) > 0
|
|||||||
|
|
||||||
// the outer array is for engines, the inner array contains the dropdown
|
// the outer array is for engines, the inner array contains the dropdown
|
||||||
// option values as keys then the dropdown option labels
|
// option values as keys then the dropdown option labels
|
||||||
|
|
||||||
$possible_row_formats = array(
|
$possible_row_formats = array(
|
||||||
'MARIA' => array(
|
'MARIA' => array(
|
||||||
'FIXED' => 'FIXED',
|
'FIXED' => 'FIXED',
|
||||||
@@ -448,6 +449,20 @@ $possible_row_formats = array(
|
|||||||
'COMPACT' => 'COMPACT',
|
'COMPACT' => 'COMPACT',
|
||||||
'REDUNDANT' => 'REDUNDANT')
|
'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
|
// 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
|
// 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)
|
// try it inside an ALTER TABLE, MySQL (at least in 5.1.23-maria)
|
||||||
|
Reference in New Issue
Block a user