The improvement I would like to help my MySQL troubleshooting is that bad queries give better and more specific error messages than “You have an error somewhere”.
That’s not to downplay the complexity of providing that, I’m sure it’s technically difficult, but this is basically the worst debugging experience I’ve had of any language.
I feel like this is MySQL's model very well. A long time ago they traded some strictness for speed, because the average MySQL user was doing some basic CRUD apps and it never mattered. But adding useful checks and good messages everywhere requires a fair amount of engineer effort and probably costs more processing than whatever performance benchmark they are probably optimizing for.
You say that but having worked on a DSL for a while, you end up sprinkling this code all over the place and things which might be simple loops, or string.splits, etc become much more gnarly.
I've used to write my queries in pgAdmin or VSCode.
I downloaded DataGrip after reading your comment, and damn, the autocomplete is just so good. It even shows me the arguments of Postgresql extensions like TimescaleDB.
This almost reads like an ad, but I just wanted to thank you for changing my life :P
Is this better in MariaDB? Over the last hour I have been writing some Python code talking to MariaDB, and the errors I got about syntax issues all seemed to point fairly closely to what the issue was. Mind you, these are fairy simple queries (perhaps more complex queries produce worse errors?)
Honest question.
Been migrating a 5 year old Percona MySQL galera cluster over to MariaDB galera. Galera multi-master clusters, for my use case, are a huge win. A month ago I had started down the path of replacing it with CockroachDB, but Cockroach only supports UTF-8 and my use case requires LATIN-1, sadly.
Percona -> MariaDB has been super smooth. With Percona over the years I've had a few updates that didn't apply and I had to go in and fix things like repo locations or keys as things evolved, but mostly it was just a workhorse. I guess one issue we had was it would never autostart on a reboot (despite "systemctl enable"), but I was never able to track it down in a reproducible way.
With MariaDB I'm using the digitalocean repos and I guess we'll see how stable those are.
Galera has been great, have used it for 5+ years and only a couple hiccups. This is a rather small database, but nearly mission critical. A couple times the cluster failed to start and I had to figure out the most recent node and manually bootstrap from it. I built some small shell tools to tell me if the cluster was happy, and bootstrap, because I had to do it so in frequently I could never remember the queries and files involved, and didn't want to have to read through my docs when the cluster was down.
Our use case is a small e-mail relay, so the win with galera is each e-mail server also runs a database node, and since they are master/master we can take one node down at a time for maintenance without having to do any failovers or the like.
This took some getting used to after six years of working with Postgres.
In my current set-up (inherited), the unit tests run using H2 while running code talks to MySQL, so I have two databases that give unhelpful generic error messages.
In my experience (a 25+ year Oracle database geek), MySQL error messages confuse me more and Oracle's are better. But Oracle also has some error messages where you have to know how parsers (and semantic/typecheckers) work, in order to understand why the message was worded like that.
But Oracle usually does point out the exact character/token in the SQL statement where the error originated from.
That’s not to downplay the complexity of providing that, I’m sure it’s technically difficult, but this is basically the worst debugging experience I’ve had of any language.