-
Couldn't load subscription status.
- Fork 49
Fixes for phpMyAdmin, Adminer, etc. #269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
db3e1f1 to
821a8ce
Compare
| ('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') | ||
| )"; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
| string $database, | ||
| int $mysql_version = 80038 | ||
| ) { | ||
| $this->mysql_version = $mysql_version; |
There was a problem hiding this comment.
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() ) |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
|
Very nice 👍 |
This is a set of fixes of issues discovered when testing phpMyAdmin and Adminer:
USEstatement when switching back to the main database (USE wp).@@versionand@@version_commentsystem variables.INFORMATION_SCHEMA.CHARACTER_SETS.INFORMATION_SCHEMA.COLLATIONS.SHOW COLLATIONSstatement.CASTexpression handling.There are more fixes to come, but maybe we can add those in subsequent PRs so that the scope here doesn't explode.