Today, when working with binaries in the business library, you want to change the number of days that the binaries expire, and if the discovery date is set to 2-bit integers. The following warning will appear. The expiration date number of days cannot be set successfully. The MySQL version is the same from 5.1 to 5.5.
mysql> set global expire_logs_days=100; Query OK, 0 rows affected, 1 Warning (0.00 sec) mysql> Show warnings;+---------+------+------------------------- --------------------------+| Level | Code | Message &N Bsp |+---------+------+---------------------------------------------------+| Warning | 1292 | Truncated incorrect Expire_logs_days value: ' |+---------+------+---------------------------------------------- -----+1 Row in Set (0.00 sec) ps: The same effect is changed in the configuration file my.cnf, for example, you set the value to expire_logs_days= 199 (2-bit positive integer), restart the service, View the list of parameters and the results are as follows. Mysql> Show variables like ' expire_logs_days '; +------------------+-------+| Variable_name | Value |+------------------+-------+| Expire_logs_days | |+------------------+-------+1 row in Set (0.00 sec) Change date parameter can only be changed to 99. mysql> set global expire_logs_days=99; Query OK, 0 rows Affected (0.00 sec) mysql> Show variables like ' expire_logs_days '; +------------------+-------+| Variable_name | Value |+------------------+-------+| Expire_logs_days | |+------------------+-------+1 row in Set (0.00 sec) mysql> set global expire_logs_days=0.5; ERROR 1232 (42000): Incorrect argument type to variable ' expire_logs_days ' description: The parameter does not support floating-point numbers, only positive integers are supported. ps:mysql The default expire_logs_days=0, log files are not automatically deleted. If the log file is too large and the business requires it, you can only manually archive the compressed backup. For unimportant logs, you can set the value of Expire_logs_days, and you need to be aware that only 99 is supported. If it does not matter, there is no need to save 99 days ha.
MySQL binary log file expiration days setting description