default innodb_flush_method

) however we can not see it in show variables command, how do i know which is current flush method?

mysql> show global variables like ‘innodb_flush_method’;
±--------------------±------+
| Variable_name | Value |
±--------------------±------+
| innodb_flush_method | |
±--------------------±------+

Also explicitly adding innodb_flush_method=fdatasync in my.cnf gives error

[ERROR] InnoDB: Unrecognized value fdatasync for innodb_flush_method
[ERROR] Plugin ‘InnoDB’ init function returned error.

We can configure innodb_flush_method=O_DIRECT or innodb_flush_method=O_DSYNC and the same we can see in show variables command

mysql> show global variables like ‘innodb_flush_method’;
±--------------------±---------+
| Variable_name | Value |
±--------------------±---------+
| innodb_flush_method | O_DIRECT |
±--------------------±---------+

Why we can not set innodb_flush_method=fdatasync in my.cnf?

Hi,

If you can see in that document ([URL]MySQL :: MySQL 5.6 Reference Manual :: 14.14 InnoDB Startup Options and System Variables)

“Formerly, a value of fdatasync also specified the default behavior. This value was removed, due to confusion that a value of fdatasync caused fsync() system calls rather than fdatasync() for flushing. To obtain the default value now, do not set any value for innodb_flush_method at startup.”

So when you are not seeing any value for that parameter means, default is set which is fsync(). Even in that document they have mentioned couple of time like
"fdatasync()

Regards,