| Subcribe via RSS

Changing The Exit Message in MySQL Client

July 2nd, 2008 Posted in MySQL

Sheeri Kritzer Cabral sent out a tweet yesterday wishing she could change the default MySQL exit text from “Bye” to “kthxbai!”. I figured that it was something that could be quickly done using a pager, but that turned out not to work because it is written after the pager would have been called. So I started digging around the source and found the following line in client/mysql.cc (line 1233):

put_info(sig ? "Aborted" : "Bye", INFO_RESULT);

and changed it to:

put_info(sig ? "Aborted" : "kthxbai!", INFO_RESULT);

So, Sheeri, this patch is for you:)

qubert:client rlowe$ bzr diff mysql.cc
=== modified file 'client/mysql.cc'
--- client/mysql.cc 2008-06-25 09:44:55 +0000
+++ client/mysql.cc 2008-07-02 02:28:19 +0000
@@ -1230,7 +1230,7 @@

#endif
if (sig >= 0)
- put_info(sig ? "Aborted" : "Bye", INFO_RESULT);
+ put_info(sig ? "Aborted" : "kthxbai!", INFO_RESULT);
glob_buffer.free();
old_buffer.free();
processed_prompt.free();

Share and Enjoy:
  • Digg
  • del.icio.us
  • Google
  • StumbleUpon
  • Technorati
Start Slide Show with PicLens Lite PicLensButton Changing The Exit Message in MySQL Client

Leave a Reply