perhaps this behavior is caused by using write_history() (not append_history()) in the client/mysql.cc (line 1263). http://cnswww.cns.cwru.edu/php/chet/readline/history.html#SEC15