Description:
There is a problem with the time output format of the following code in the function MYSQL_QUERY_LOG::write.
----------------
buff_len= my_snprintf(buff, sizeof buff,
"# Time: %02d%02d%02d %2d:%02d:%02d\n",
start.tm_year % 100, start.tm_mon + 1,
start.tm_mday, start.tm_hour,
start.tm_min, start.tm_sec);
----------------
You will find that the output format of hours is %2d, the correct should be %02d.
How to repeat:
There is a problem with the time output format of the following code in the function MYSQL_QUERY_LOG::write.
----------------
buff_len= my_snprintf(buff, sizeof buff,
"# Time: %02d%02d%02d %2d:%02d:%02d\n",
start.tm_year % 100, start.tm_mon + 1,
start.tm_mday, start.tm_hour,
start.tm_min, start.tm_sec);
----------------
You will find that the output format of hours is %2d, the correct should be %02d.
Suggested fix:
There is a problem with the time output format of the following code in the function MYSQL_QUERY_LOG::write.
----------------
buff_len= my_snprintf(buff, sizeof buff,
"# Time: %02d%02d%02d %2d:%02d:%02d\n",
start.tm_year % 100, start.tm_mon + 1,
start.tm_mday, start.tm_hour,
start.tm_min, start.tm_sec);
----------------
You will find that the output format of hours is %2d, the correct should be %02d.