Xaprb

Stay curious!

MySQL kill could be so much more exciting

with 4 comments

When I kill a query or connection, whoever is running it gets a boring message about what happens. Wouldn’t it be fun and useful to be able to specify the error message the user should see? Imagine the possibilities:

mysql> KILL 10282, "Sorry, no cigar today. Try again tomorrow."

Joking aside, relevant error messages would be great for all involved.

Written by Xaprb

August 28th, 2012 at 2:06 pm

Posted in SQL

4 Responses to 'MySQL kill could be so much more exciting'

Subscribe to comments with RSS

  1. So it’s relatively easy to modify error messages, but one thing that could be “interesting” is a new language set, which one could use to set the error message language (such as “humour”):

    http://dev.mysql.com/doc/refman/5.0/en/error-message-language.html
    http://dev.mysql.com/doc/internals/en/ch29s01s02.html

    “Deadlock found, hunt down and beat all other users, or just retry”

    Or even “haiku”:

    “You just deadlocked, we rolled back your transaction, retrying would be proper”

    Of course, these are server error messages, and the client would see client error messages too (especially in the case of a killed connection).. That grand old “Lost connection to MySQL server during query” that could be any number of things.. :)

    Mark Leith

    28 Aug 12 at 3:51 pm

  2. On a slightly related note, I was also thinking about KILL commands today in the context of long-running transactions, and found myself wishing for KILL TRANSACTION support (where KILL QUERY doesn’t release locks, and KILL CONNECTION might have severe consequences for the application). So I submitted Bug#66582.

    Todd Farmer

    28 Aug 12 at 4:31 pm

  3. My launch script says

    /etc/init.d/percona start

    Mysql , con un bel pò di vitamine

    wich is like

    Mysql, now vitaminized

    Roy Bellingan

    29 Aug 12 at 2:45 am

  4. I want haikus.
    They would make life lots of fun.
    I am not good at them though.

    Xaprb

    29 Aug 12 at 4:45 pm

Leave a Reply