MySQL breaks GROUP BY syntax of standard SQL, and allows arbitrary columns with aggregate functions.
The ONLY_FULL_GROUP_BY stops this, instead raising an error. Since the SQL was originally designed
with this mode on, restricting the SQL broke the code in a few places.
Adding the extra group by clauses solves the issue without effecting query results.
These issues will be caught by MySQLTest in the future, since the issues could be reproduced by
enabling ONLY_FULL_GROUP_BY mode.
Affects issues:
- Fixed#2619
* Optimized network ping table query
* Removed icon id selection subqueries
- Take the icon ID into memory when the icons are stored
* Fix typos in the optimized ping table query
* Optimize server ping table query
* Attempt to optimize /v1/servers tps data query
* Optimize ping and geolocations tables uuid -> user_id foreign key
* Prevent Plan from crashing if patching takes too long
- HikariCP auto commit was true for some reason even though all transactions have commit mechanism built-in.
- The setting was reset during connection recreation and that could cause an index out of bounds error.
* Reduce try-nesting in ExecStatement
* Use user_id and server_id instead of uuid for plan_world_times table
* Use user_id and server_id instead of uuid for plan_sessions and plan_user_info table
* Fix more issues and test queries used by Query Filters
* Use deferRender for data tables to load data into the table faster
* Swap uuids to user ids for query page filters
Fixes an issue where SQL is too big to execute
Affects issues:
- #2196
- Filter interface
- Wrote 5 filters
- Wrote QueryFilters that manages different Filters
Plan is to link the QueryFilters to Resolvers:
- One that returns all filters and their options as json
- One that users the query parameters (eg ?q={json}) and gets the filters
- FilterQuery has a static method to parse the json
- Subquery was not returning rows for active playtime of 0, fix: COALESCE
- Union was removing duplicate 0s, replaced with UNION ALL
- Query did not use floating point for calculation
Affects issues:
- Fixed#1388
- Removed 5-way union
- Removed 2 nested queries
- Calculated groups with java code from the queried activity index values.
Affects issues:
- Improvement for #1329
Reason: Parse means extracting information - In many cases the word was being
used wrong (In Finnish 'parsia' means 'to patch together', which caused
the wrong use)
The word 'parse' replaced with 'build', 'create' or 'generate' where appropriate
Activity index grouping query for /network page was using plan_user_info
instead of plan_users.
This lead to duplication of users if a player had played on multiple
servers.
Affects issues:
- Fixed#1216
MySQL that restricts float being queried with getLong caused an
SQLException
All usages of getLong with AVG function replaced with
getDouble cast to long.
Affects issues:
- Fixed#1181