# mysql client history file only updated sometimes



## seanacais (Mar 4, 2013)

I'm running FreeBSD 9.1 and have mysql56-client and mysql56-server installed. (5.6.10)

Mysql itself seems to be running fine, but I've noticed that the history file does not seem to be updated consistently.  Specifically, the history file does not appear to be written when I try to do a select statement any more complex then select *.

Here is a set of repeatable steps that shows the problem
1) From a command line issue the mysql client command and connect to the mysql database

`$ mysql -u root -p mysql` <return>

2) Issue the sql statement(s)

```
show tables;
select * from user;
```

3) Press the up-arrow and see that the history shows these statements

4) Issue the sql statement

```
select host,user,password from user;
```

5) Press the up-arrow and notice that the last command is not shown.

6) Issue the sql statement;

```
select * from db;
```

7) Press the up-arrow and see that the history shows the last select statement

8) Issue the sql statement;

```
select host,Db,User from db;
```

9) Press the up-arrow and see that the history shows the last select statement

I cannot find the common failing here between these commands.

I have tested this on a 9.0 system I have running mysql 5.5.28 and I am NOT seeing this behavior.  

I wonder if this could be connected to the new --histignore feature that was added in 5.6.8???

I'd appreciate if anyone could at least confirm this behavior in 5.6.8 or later.  Any insight is of course, greatly appreciated!

Kevin


----------



## seanacais (Mar 4, 2013)

Is --histignore the default option??

I'm not specifying the option on the command line, but the default pattern appears to be applied anyway.  

The sql statement select host,user from user; will be placed in the history file, but the statement select host,user,password from user; will not be.

Since the default pattern for --histignore is  
	
	



```
"*IDENTIFIED*:*PASSWORD*"
```
 that kind of makes sense, but I don't see how it's being enabled.

Thanks,

Kevin


----------

