MySQL 5.1 Command line client improvements

MySQL 5.1 Command line client improvements

PREVIOUS POST
NEXT POST

Just found this little handy feature today:

So now if you press CTRL-C MySQL Command Line Client will not exit but will terminate query being executed. This is great as so many queries assumed CTRL-C would also abort running query in previous MySQL versions and I’ve seen many monstrous queries left running without noticing just because people would think CTRL-C terminated the query. Now it finally really does.

Great Job! I wish I would see more of such relatively simple but very handy improvements 🙂

PREVIOUS POST
NEXT POST

Share this post

Comments (11)

  • Paul DuBois Reply

    This was introduced in 5.0.25 (and 5.1.10).

    http://dev.mysql.com/doc/refman/5.0/en/news-5-0-25.html

    June 16, 2007 at 4:37 pm
  • jim Reply

    i did that.

    June 16, 2007 at 5:36 pm
  • Harrison Fisk Reply

    I helped with it 😉

    June 16, 2007 at 5:46 pm
  • jim Reply

    that’s right! i forgot that what i did was based on harrison’s initial patch.

    June 16, 2007 at 6:33 pm
  • peter Reply

    Thanks Jim, Harrison, Paul

    It may have been where for a while I just somehow did not notice it before 🙂

    June 17, 2007 at 9:06 am
  • Perrin Harkins Reply

    I agree: great feature! Very helpful.

    June 17, 2007 at 9:44 pm
  • Moazzam Reply

    You guys rock! It’s very handy. Using that you can even do a select and an insert in the same query from the same table. It randomly messes up the MYI files, though (which can be repaired by table repair command). It would be great if it didn’t.

    I did something like this :

    insert into table1 (id, serial_no) select ‘asd’ as id, count(name) as serial_no from where category=’blah’

    June 18, 2007 at 9:13 am
  • Moazzam Reply

    It won’t let me edit my comment so I am posting a new one. I had an error in the query I posted. Here is the right one :

    insert into table1 (id, serial_no) select ‘asd’ as id, count(name) as serial_no from table1 table1_1 where category=’blah’

    June 18, 2007 at 9:14 am
  • peter Reply

    Moazzam,

    Please report it as a but KILL for the query should not cause data corruption. It would be OK to abort the query and have partially executed insert for MyISAM tables but if index gets corrupted it is surely a bug.

    June 18, 2007 at 11:45 am
  • Caught in a Web » MySQL 5.x - Konačno unapreÄ‘en klijent Reply

    […] 5.x – Konačno unapreÄ‘en klijent Listajući svoje omiljene WebDev feed-ove, za oko mi je zapao jedan post na sjajnom MySQL Perfomance Blogu: …if you press CTRL-C MySQL Command Line Client will not […]

    June 20, 2007 at 3:46 pm
  • Caught in a Web » MySQL 5.x - Finally improved client Reply

    […] 5.x – Finally improved client Looking at my favorite rss feeds today, I found this post on great MySQL Performance Blog: …if you press CTRL-C MySQL Command Line Client will not exit […]

    July 14, 2007 at 4:05 am

Leave a Reply