diff --git a/ChangeLog b/ChangeLog index f8075095ba..3a4bf18822 100644 --- a/ChangeLog +++ b/ChangeLog @@ -119,6 +119,13 @@ phpMyAdmin - ChangeLog - issue Fix the display of Indexes that use Expressions and not column names - issue Allow to create the phpMyAdmin storage database using a different name than "phpmyadmin" using the interface - issue #17092 Document that "$cfg['Servers'][$i]['designer_coords']" was removed in version 4.3.0 +- issue #16906 Support special table names for pmadb storage table names +- issue #16906 Fix a caching effect on the feature list after creating the tables +- issue #16906 Better report errors when creating the pmadb or it's tables +- issue #16906 Create the pmadb tables using the names configured and not the default names +- issue #16906 Create the phpMyAdmin storage database using the configured "['pmadb']" name and not always "phpmyadmin" +- issue #16906 Prevent incorrect overriding of configured values after a pmadb fix +- issue #16906 Use the control connection to create the storage database and tables and not the user connection 5.1.1 (2021-06-04) - issue #13325 Fixed created procedure shows up in triggers and events and vice-versa diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 66d019b099..c8a536ff29 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -11125,7 +11125,7 @@ $values $values - + $aliases[$oldDatabase]['tables'] $cfgRelation['mimework'] $columnAliases[$column['name']] @@ -11137,7 +11137,6 @@ $column['Null'] $column['Type'] $column['Type'] - $column['name'] $definition['Type'] $mime['mimetype'] $oneKey['index_list'] @@ -11153,20 +11152,15 @@ $trigger['create'] $trigger['drop'] - - $field->key->columns[$key]['name'] - - + $aliases[$db]['tables'][$table]['columns'][$field] $aliases[$db]['tables'][$table]['columns'][$relField] $aliases[$db]['tables'][$view]['columns'][$colAlias] - $aliases[$oldDatabase]['tables'][$oldTable]['columns'][$column['name']] $aliases[$oldDatabase]['tables'][$refTable]['columns'][$column] - $columnAliases[$column['name']] $oneKey['ref_index_list'][$index] $values[$val] - + $GLOBALS['old_tz'] $colAlias $colAlias @@ -11174,7 +11168,6 @@ $colAs $column $column - $column $columnAliases $createQuery $definition @@ -13648,7 +13641,6 @@ $com_rs $com_rs $com_rs - $createQueries[$table] $disp $disp $disp @@ -13665,6 +13657,7 @@ $result $row[1] $show_create_table + $tableNameReplacements[$tableName] $tableRes $tableRes $tablesRows @@ -13695,7 +13688,8 @@ $relrow[$foreign_display] $relrow[$foreign_field] - + + $_SESSION['relation'][$GLOBALS['server']] $_SESSION['relation'][$GLOBALS['server']] $_SESSION['relation'][$GLOBALS['server']] $_SESSION['sql_history'][] @@ -13785,7 +13779,7 @@ string[] string|false - + $max_time $messages['disabled'] $messages['enabled'] @@ -13836,6 +13830,7 @@ Util::backquote($foreign_field) Util::backquote($foreign_table) Util::backquote($foreign_table) + Util::backquote($tableDbName) $_SESSION['relation'][$GLOBALS['server']] @@ -13871,8 +13866,9 @@ $GLOBALS['cfg']['ForeignKeyDropdownOrder'][1] - + (int) $GLOBALS['cfg']['LimitChars'] + (string) $table[1] (string) $data @@ -18718,18 +18714,21 @@ assertFalse assertSame - + + $_SESSION['relation'][$GLOBALS['server']]['version'] $_SESSION['relation'][$GLOBALS['server']]['version'] $_SESSION['relation'][$GLOBALS['server']]['version'] $_SESSION['relation'][$GLOBALS['server']] - + + assertSame assertSame assertSame - + + assertSame assertSame diff --git a/test/classes/DatabaseInterfaceTest.php b/test/classes/DatabaseInterfaceTest.php index f08704d76d..ba5976d456 100644 --- a/test/classes/DatabaseInterfaceTest.php +++ b/test/classes/DatabaseInterfaceTest.php @@ -836,6 +836,8 @@ class DatabaseInterfaceTest extends AbstractTestCase ['NULL'] ); + $this->dummyDbi->addSelectDb('PMA-storage'); + $this->dbi->initRelationParamsCache(); $this->assertArrayHasKey( @@ -846,6 +848,7 @@ class DatabaseInterfaceTest extends AbstractTestCase ); $this->assertAllQueriesConsumed(); + $this->assertAllSelectsConsumed(); $this->dummyDbi->addResult( 'SHOW TABLES FROM `PMA-storage`', diff --git a/test/classes/RelationTest.php b/test/classes/RelationTest.php index e56ca5d6ff..da58abfba4 100644 --- a/test/classes/RelationTest.php +++ b/test/classes/RelationTest.php @@ -1001,13 +1001,15 @@ class RelationTest extends AbstractTestCase $this->assertArrayHasKey('relation', $_SESSION, 'The cache is expected to be filled'); $this->assertSame([], $_SESSION['relation']); + $this->dummyDbi->addSelectDb('db_pma'); + $this->dummyDbi->addSelectDb('db_pma'); $this->relation->fixPmaTables('db_pma', true); $this->assertArrayNotHasKey('message', $GLOBALS); $this->assertArrayHasKey('relation', $_SESSION, 'The cache is expected to be filled'); $this->assertSame('db_pma', $GLOBALS['cfg']['Server']['pmadb']); $this->assertSame([ - 'PMA_VERSION' => $_SESSION['relation'][$GLOBALS['server']]['PMA_VERSION'], + 'version' => $_SESSION['relation'][$GLOBALS['server']]['version'], 'relwork' => false, 'displaywork' => false, 'bookmarkwork' => false, @@ -1033,6 +1035,7 @@ class RelationTest extends AbstractTestCase ], $_SESSION['relation'][$GLOBALS['server']]); $this->assertAllQueriesConsumed(); + $this->assertAllSelectsConsumed(); } public function testFixPmaTablesNormalFixTablesFails(): void @@ -1126,6 +1129,7 @@ class RelationTest extends AbstractTestCase 'SHOW TABLES FROM `phpmyadmin`', [] ); + $this->dummyDbi->addSelectDb('phpmyadmin'); $this->assertArrayNotHasKey('errno', $GLOBALS); @@ -1137,6 +1141,7 @@ class RelationTest extends AbstractTestCase $this->assertAllQueriesConsumed(); $this->assertAllErrorCodesConsumed(); + $this->assertAllSelectsConsumed(); } public function testCreatePmaDatabaseFailsError1044(): void