fix(system): Correct issues with data formatting in database tables grid - #72
Open
Ibochkarev wants to merge 24 commits into
Open
fix(system): Correct issues with data formatting in database tables grid#72Ibochkarev wants to merge 24 commits into
Ibochkarev wants to merge 24 commits into
Conversation
- Resolve database name via SELECT DATABASE() with config fallback for MySQL 8 - Cast Data_length, Data_free, Index_length to int to handle NULL in SHOW TABLE STATUS - Compute Effective_size as max(0, dataLength - dataFree) - Extract formatTableRow(), cache permission and manager_log table name before loop - Add type hints for formatTableRow parameters Resolves modxcms#14976
…processor - Added logging for cases where the database name cannot be determined. - Enhanced error handling by returning early if the statement is null. - Changed access modifiers for formatTableRow() and getDatabaseName() methods to protected for better extensibility.
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
Fix spacing and remove extra doc block
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
…ist.php Co-authored-by: Jim Graham <jim@pixelsandstrings.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Что сделано
Data_length/Data_free/Index_lengthв int перед мат-операциями размера (MySQL 8 может вернуть NULL).database_truncate.SHOW TABLE STATUS-стейтмент отсутствуют.Зачем нужно
На MySQL 8 грид Database Tables может прийти пустым, когда config
dbnameпуст, а NULL-колонки размера ломают старую арифметику и ссылку optimize.Как проверить
Data_free > 0)manager_logсdatabase_truncateСвязанные
Refs modxcms#14976
Оригинал: modxcms#16855