SELECT json_extract query crashes server
Issue checklist
MySQL.scalar.await("SELECT users JSON_EXTRACT(accounts, '$."..accountName.."') AS money WHERE identifier = ?", {money, identifier})
crashes my server without a trace. Just closes. It's wrong syntax which I didn't realise, but still shouldnt crash. It might also crash, because the arguments mismatch.
- [x] I am using the latest release
- [ ] I have referenced previously reported issues
- [ ] I have referenced available documentation and cannot resolve the issue
- [ ] I'm certain this is an issue with oxymysql, and not with my resource
Describe the bug Crash
Screenshots https://i.imgur.com/IAb4iBZ.png Printed myself the query in front
Code MySQL.scalar.await("SELECT users JSON_EXTRACT(accounts, '$."..accountName.."') AS money WHERE identifier = ?", {money, identifier})
Expected behavior An error and no crash
Additional context Add any other context about the problem here.
Server details
- Newest artifact
- Linux
Database details
- MariaDB
- 11
Feel free to ask the Ctrl:V devs over at Cfx.re to fix the billion issues causing crashes when using the node22 scrt, otherwise downgrade oxmysql so you get the expected error or resolve the error in your query.
SELECT JSON_EXTRACT(accounts, '$.bank') FROM users WHERE identifier = ? This query is actually causing it. Whenever JSON_EXTRACT is used, it crashes.
But UPDATE querys work for me.
The cfx devs are a joke tbh, latest updates are more broken than ever.