π [Bug]New errors, conclusions drawn from multiple long-term tests
leechunlung opened this issue Β· comments
π Bug report
Expected behavior
Steps to reproduce
1.If "CharDBQuery" or "WorldDBQuery" DB information is involved in the Lua script, it Will cause server instability, and each crash will generate Lua error logs
2.this is my script,
https://mega.nz/file/Zqk1CJjT#76i9IAnfKzYnhwRUi_hV6aWPJQluFDkL5BVzzSjlPAg
https://mega.nz/file/UrtiVQ5B#iFtvgbc4kWUNwR0b3W2QOEfjzhEp_7dxmcmzmu2BmfY
3.I have been testing it in multiplayer games for a long time. Can you fix itοΌ
4. ...
5. Profit
Version & Environment
Client Version:
Commit Hash:
OS Client:
OS Server:
Crashlog
- None
Try it now. There was a recent change to how those functions work core side so it may change the behavior.
yes
Old
QueryResult* result
QueryResult* result = CharacterDatabase
New
std::unique_ptr<QueryResult>
std::unique_ptr<QueryResult> result
@leechunlung
example need update ElunaQueryMethods.h
Eluna* E, ElunaQuery* result -> Eluna* E, std::unique_ptr<ElunaQuery> result