pixel77 Posted October 3, 2021 Share Posted October 3, 2021 (edited) Hi, I have a SQL problem that I didn't have before: sourceS.lua:836: dbPoll failed; Field 'asdasd' doesn't have a default value I've been using the script for 3 years now, I don't know why it now asks for a default value. Okay, I could set a default value, but is there no other way to fix this issue? I think the problem started when I updated the MariaDB or PHPMyAdmin: mysql Ver 15.1 Distrib 10.5.11-MariaDB, for debian-linux-gnu (x86_64) using EditLine wrapper My script running fine with this mysql: mysql Ver 15.1 Distrib 10.1.48-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2 MTA:SA server version is 1.5.8. Thx for help! Edited October 3, 2021 by pixel77 Link to comment
Kenix Posted October 3, 2021 Share Posted October 3, 2021 (edited) Try this set global sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" in mysql Edited October 3, 2021 by Kenix 1 Link to comment
The_GTA Posted October 3, 2021 Share Posted October 3, 2021 (edited) Hello pixel77! Times are moving on and technology is becoming more robust. With the constant improvement of technology over time come more thorough requirements for developers to specify data in their code. It looks like MySQL does not want to assume implicit default values for table fields by default anymore which I think is fine. I recommend you to either modify the SQL table definitions to provide default field values where there are not or to always specify the field values in INSERT statements that have no default values. Otherwise you may risk further incompatibilities with future MySQL versions due to technological progress. Edited October 3, 2021 by The_GTA 1 Link to comment
pixel77 Posted October 5, 2021 Author Share Posted October 5, 2021 On 04/10/2021 at 00:34, Kenix said: Try this set global sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" in mysql thanks, its working On 04/10/2021 at 00:40, The_GTA said: Hello pixel77! Times are moving on and technology is becoming more robust. With the constant improvement of technology over time come more thorough requirements for developers to specify data in their code. It looks like MySQL does not want to assume implicit default values for table fields by default anymore which I think is fine. I recommend you to either modify the SQL table definitions to provide default field values where there are not or to always specify the field values in INSERT statements that have no default values. Otherwise you may risk further incompatibilities with future MySQL versions due to technological progress. Yes, I know, just I needed a faster solution right now, but thanks for the advice. Link to comment
The_GTA Posted October 5, 2021 Share Posted October 5, 2021 Just now, pixel77 said: Yes, I know, just I needed a faster solution right now, but thanks for the advice. You're welcome! Take it by heart if you face such problems in the future. It is important actually take effort in life, at least in things that you truly care about. 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now