#At file:///Users/jimw/my/mysql-5.1/ based on revid:jimw@stripped
2891 Jim Winstead 2009-05-07
The mysql command-line client did not properly handle MYSQL_HISTFILE being set
to an empty string, or to /dev/null, as we suggest and have suggested in the
documentation. (Bug #34224)
modified:
client/mysql.cc
=== modified file 'client/mysql.cc'
--- a/client/mysql.cc 2009-04-28 18:30:21 +0000
+++ b/client/mysql.cc 2009-05-08 00:48:20 +0000
@@ -1183,7 +1183,12 @@ int main(int argc,char *argv[])
histfile= 0;
}
}
- if (histfile)
+
+ /* We used to suggest setting MYSQL_HISTFILE=/dev/null. */
+ if (histfile && strncmp(histfile, "/dev/null", 10) == 0)
+ histfile= NULL;
+
+ if (histfile && histfile[0])
{
if (verbose)
tee_fprintf(stdout, "Reading history-file %s\n",histfile);
@@ -1218,7 +1223,8 @@ sig_handler mysql_end(int sig)
{
mysql_close(&mysql);
#ifdef HAVE_READLINE
- if (!status.batch && !quick && !opt_html && !opt_xml && histfile)
+ if (!status.batch && !quick && !opt_html && !opt_xml &&
+ histfile && histfile[0])
{
/* write-history */
if (verbose)
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (jimw:2891) Bug#34224 | Jim Winstead | 8 May |