Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[receiver/mysql] fix: remove the order by clause for non-existent col…
…umn (open-telemetry#33283) **Description:** <Describe what has changed.> <!--Ex. Fixing a bug - Describe the bug and how this fixes the issue. Ex. Adding a feature - Explain what this achieves.--> Remove the unnecessary order by clause causing undefined reference error. This order by clause was introduced in [this commit](open-telemetry@bbcb16c). In [the next commit](open-telemetry@5437618), the author made a change to the metrics model, but I think he forgot to remove the order by clause at that time. I think it could be changed to order by another column, but I didn't really feel the need to keep it sorted, so I removed it. **Link to tracking Issue:** open-telemetry#33271 **Testing:** <Describe what testing was performed and which tests were added.> Tested working as expected with [email protected] which is reported version in the issue. Also it can be tested as sql. ```sql -- before mysql> SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH, INDEX_LENGTH FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT in ('information_schema', 'sys') ORDER BY TABLE_LENGTH DESC; ERROR 1054 (42S22): Unknown column 'TABLE_LENGTH' in 'order clause' -- after mysql> SELECT TABLE_SCHEMA, TABLE_NAME, TABLE_ROWS, AVG_ROW_LENGTH, DATA_LENGTH, INDEX_LENGTH FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT in ('information_schema', 'sys'); +--------------------+------------------------------------------------------+------------+----------------+-------------+--------------+ | TABLE_SCHEMA | TABLE_NAME | TABLE_ROWS | AVG_ROW_LENGTH | DATA_LENGTH | INDEX_LENGTH | +--------------------+------------------------------------------------------+------------+----------------+-------------+--------------+ | mysql | innodb_table_stats | 2 | 8192 | 16384 | 0 | | mysql | innodb_index_stats | 6 | 2730 | 16384 | 0 | | performance_schema | cond_instances | 256 | 0 | 0 | 0 | | performance_schema | error_log | 9 | 0 | 0 | 0 | | performance_schema | events_waits_current | 1536 | 0 | 0 | 0 | (snip) ``` **Documentation:** <Describe the documentation added.> --------- Co-authored-by: Daniel Jaglowski <[email protected]> Co-authored-by: Curtis Robert <[email protected]>
- Loading branch information