Thank you, MySQL

by john on January 7, 2008

For not following ANSI only for “not equals” and allowing as well != (which I can shove into XML without escaping).

{ 4 comments… read them below or add one }

Max January 8, 2008 at 1:42 pm

Thank you substantially less, MySQL

for mindlessly executing the following statement:

update user remotecheck set Process_priv=’Y';

As you can guess, it set every user in the mysql database’s Process_priv column to ‘Y’. Why did it even parse? Did it regard “remotecheck” (which should have been in a “where user=’remotecheck’ clause) as a table alias for user?

I do, however, strongly prefer using != to . Don’t most major vendors support that syntax, non-standard as it may be? I seem to remember using it in Oracle and SQL Server as well.

Max January 8, 2008 at 1:43 pm

whoops, ^.^<>.^

john January 8, 2008 at 2:44 pm

Doubtless the other vendors allow != but it’s one of those convenience things that MySQL is good about.

Meanwhile: Sorry about your update! At least it wasn’t delete from user;

Max January 8, 2008 at 5:35 pm

Right. Which pretty much any vendor’s RDBMS would happily execute.

It turned out not to be a big deal and I was able to figure out the correct values to run the re-update on, but it clearly could easily have been worse.

Leave a Comment

Previous post: Gracenote; ripping CDs on Windows

Next post: Most annoying prophylactic dialog of all time?