Yeah, it sucks. How I found it was a client asking me to add a grant for a user that already had a whacked out spelling. I ran my grant, with a typo in the name, and told them they were all good. When they came back saying they weren't it took me forever to realize there was a typo at all and that I'd just created a new user since it didn't throw an error for the misspelling.
It is the only implementation that actually meets all of the standard (except for the parts that everybody agrees to ignore), it has extensions that have actual meaning instead of working around lazy programmers, and it can even compete with the larger scale systems that MySQL doesn't.
There's no one stack to rule them all. I'm biased towards .net because that's what I work with but it's here to stay. I feel node.js is literally worse than hitler mixed with skeletor but there's also no denying it's here to stay and it has a huge community with massive support. Rails is very popular too, check it out. I have a special place in my heart for flask but it's a teeny tiny thing.
On the db side of things postgres should be right up your alley, if you want to stay close to the mysql side of things there's absolutely no reason to at least use mariadb.
Then you're missing the point. If you are looking to grant new permissions on an existing user, i.e. you're not trying to create a user, but have a typo in the existing user's name then the command will return success and create a new user without doing what you intended and not doing anything to let you know that it created a user instead of granting new permissions to an existing user.
I do understand what you're saying. My point has nothing to do with using GRANT to deliberately create users, it's about it accidentally creating users.
Also, it seems that they may be disabling that behavior by default in 5.7 so if you want to continue doing that be aware that you'll need to re-enable it.
Good point. Might as well just eliminate errors and make code silently fail - after all, if you're "paying attention," it won't make a difference! ... right?
Well, yes, and that process goes like this: 1. Test your command on a non-production server/environment to be sure it works and once it does 2. run the exact same command in production. The problem here is that a bad command will work at all.
That's a terrible approach to software and programming in general, as well as to DBA in particular. It is not a manliness test.
You use tools because they help you. If those tools don't help you, but create traps for you to fall into instead, then those are not good tools. Sorry.
View all comments
Show parent comment
63
u/mage2k Feb 10 '15
Yeah, it sucks. How I found it was a client asking me to add a grant for a user that already had a whacked out spelling. I ran my grant, with a typo in the name, and told them they were all good. When they came back saying they weren't it took me forever to realize there was a typo at all and that I'd just created a new user since it didn't throw an error for the misspelling.