Thank you, MySQL

7
Jan/08
4

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

Filed under: Technology
Comments (4) Trackbacks (0)
  1. Max
    1:42 pm on January 8th, 2008

    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.

  2. Max
    1:43 pm on January 8th, 2008

    whoops, ^.^<>.^

  3. john
    2:44 pm on January 8th, 2008

    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;

  4. Max
    5:35 pm on January 8th, 2008

    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

No trackbacks yet.