Commit 60bb69aa authored by unknown's avatar unknown

Merge bk-internal.mysql.com:/home/bk/mysql-5.0

into  zippy.(none):/home/cmiller/work/mysql/mysql-5.0-maint


client/mysql.cc:
  Auto merged
parents e42692c0 3923cfd9
...@@ -448,6 +448,14 @@ int main(int argc,char *argv[]) ...@@ -448,6 +448,14 @@ int main(int argc,char *argv[])
MYF(MY_WME)); MYF(MY_WME));
if (histfile) if (histfile)
sprintf(histfile,"%s/.mysql_history",getenv("HOME")); sprintf(histfile,"%s/.mysql_history",getenv("HOME"));
char link_name[FN_REFLEN];
if (my_readlink(link_name, histfile, 0) == 0 &&
strncmp(link_name, "/dev/null", 10) == 0)
{
/* The .mysql_history file is a symlink to /dev/null, don't use it */
my_free(histfile, MYF(MY_ALLOW_ZERO_PTR));
histfile= 0;
}
} }
if (histfile) if (histfile)
{ {
...@@ -484,7 +492,7 @@ sig_handler mysql_end(int sig) ...@@ -484,7 +492,7 @@ sig_handler mysql_end(int sig)
{ {
mysql_close(&mysql); mysql_close(&mysql);
#ifdef HAVE_READLINE #ifdef HAVE_READLINE
if (!status.batch && !quick && !opt_html && !opt_xml) if (!status.batch && !quick && !opt_html && !opt_xml && histfile)
{ {
/* write-history */ /* write-history */
if (verbose) if (verbose)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment