Merge branch 'QA_4_0'
This commit is contained in:
commit
511a005281
@ -52,6 +52,7 @@ phpMyAdmin - ChangeLog
|
||||
- bug #4098 Default table tab is ignored
|
||||
- bug #4099 Server/library difference warning: setting is ignored
|
||||
- bug #4100 table tree group strategy
|
||||
- bug #4102 ALTER TABLE ORDER BY and InnoDB
|
||||
|
||||
4.0.7.0 (2013-09-23)
|
||||
- bug #3993 Sorting in database overview with statistics doesn't work
|
||||
|
||||
@ -236,7 +236,30 @@ $response->addHTML('<div id="boxContainer" data-box-width="300">');
|
||||
/**
|
||||
* Order the table
|
||||
*/
|
||||
$response->addHTML(PMA_getHtmlForOrderTheTable($columns));
|
||||
require_once 'libraries/Index.class.php';
|
||||
$indexes = PMA_Index::getFromTable($GLOBALS['table'], $GLOBALS['db']);
|
||||
$hasNotNullUniqueIdx = false;
|
||||
foreach ($indexes as $name => $idx) {
|
||||
if ($name == 'PRIMARY') {
|
||||
$hasNotNullUniqueIdx = true;
|
||||
} elseif (! $idx->getNonUnique()) {
|
||||
$hasNotNullUniqueIdx = true;
|
||||
foreach ($idx->getColumns() as $column) {
|
||||
if ($column->getNull()) {
|
||||
$hasNotNullUniqueIdx = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($hasNotNullUniqueIdx) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
// `ALTER TABLE ORDER BY` does not make sense for InnoDB tables that contain
|
||||
// a user-defined clustered index (PRIMARY KEY or NOT NULL UNIQUE index).
|
||||
// InnoDB always orders table rows according to such an index if one is present.
|
||||
if (! ($tbl_storage_engine == 'INNODB' && $hasNotNullUniqueIdx)) {
|
||||
$response->addHTML(PMA_getHtmlForOrderTheTable($columns));
|
||||
}
|
||||
|
||||
/**
|
||||
* Move table
|
||||
|
||||
Loading…
Reference in New Issue
Block a user