Skip to content

Conversation

@JanJakes
Copy link
Member

@JanJakes JanJakes commented Oct 16, 2025

This is a set of fixes of issues discovered when testing phpMyAdmin and Adminer:

  • Fix USE statement when switching back to the main database (USE wp).
  • Add support for @@version and @@version_comment system variables.
  • Add support for INFORMATION_SCHEMA.CHARACTER_SETS.
  • Add support for INFORMATION_SCHEMA.COLLATIONS.
  • Add support for SHOW COLLATIONS statement.
  • Improve CAST expression handling.

There are more fixes to come, but maybe we can add those in subsequent PRs so that the scope here doesn't explode.

@JanJakes JanJakes marked this pull request as ready for review October 16, 2025 15:03
('utf8mb4_bin', 'utf8mb4', 46, '', 'Yes', 1, 'PAD SPACE'),
('utf8mb4_unicode_ci', 'utf8mb4', 224, '', 'Yes', 8, 'PAD SPACE'),
('utf8mb4_0900_ai_ci', 'utf8mb4', 255, 'Yes', 'Yes', 0, 'NO PAD')
)";
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a "quick fix", but it's actually quite nice—the tables are not materialized until requested.

Maybe in the future, we can unify it to real tables, but I suppose there's no urgency at the moment, as this seems to be working fine.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this is a very nice direction. This information is dynamic in nature, storing it would be quite inconvenient since we'd need to migrate existing databases whenever something changes. Lovely.

@JanJakes JanJakes requested review from a team and adamziel October 16, 2025 15:06
string $database,
int $mysql_version = 80038
) {
$this->mysql_version = $mysql_version;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lovely

return 'REAL';
default:
throw $this->new_not_supported_exception(
sprintf( 'cast type: %s', $first_child->get_value() )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯 for an explicit error

) {
$table_name = strtolower( $table_name );

// Some information schema tables can be computed on the fly.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really nice and I bet this is also how MySQL does it.

@adamziel
Copy link
Collaborator

Very nice 👍

@JanJakes JanJakes merged commit 581d361 into develop Oct 17, 2025
14 checks passed
@JanJakes JanJakes deleted the phpmyadmin-fixes branch October 17, 2025 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants