Description:
Usually deprecated options are documented and a warning is given in the error log. For example, if we use --log_slow_queries with 5.1/5.5 we get:
110208 19:54:13 mysqld_safe Starting mysqld daemon with databases from /home/lmorgado/sandboxes/msb_5_1_33/data
110208 19:54:13 [Warning] The syntax '--log_slow_queries' is deprecated and will be removed in MySQL 7.0. Please use '--slow_query_log'/'--slow_query_log_file' instead.
110208 19:58:08 mysqld_safe Starting mysqld daemon with databases from /home/lmorgado/sandboxes/rsandbox_5_5_8/master/data
110208 19:58:08 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
This is also documented in both manual entries:
http://dev.mysql.com/doc/refman/5.1/en/server-options.html#option_mysqld_log-slow-queries
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_slow_query_log
However, for a number of very old options, they are documented as deprecated but no warning is given:
"The following startup variables and options were renamed:
Name in 3.23 Name in 4.0 (and above)
myisam_bulk_insert_tree_size bulk_insert_buffer_size
query_cache_startup_type query_cache_type
record_buffer read_buffer_size
record_rnd_buffer read_rnd_buffer_size
sort_buffer sort_buffer_size
--warnings --log-warnings
--err-log --log-error (for mysqld_safe)
The startup options record_buffer, sort_buffer, and warnings still work in MySQL 4.0 but are deprecated."
http://dev.mysql.com/doc/refman/4.1/en/upgrading-from-3-23.html
How to repeat:
For example:
shell>grep sort_buffer my.cnf
sort_buffer=1234567
shell> restart mysql
110208 20:07:53 mysqld_safe mysqld from pid file /home/lmorgado/sandboxes/rsandbox_5_5_8/master/data/mysql_sandbox13213.pid ended
.110208 20:07:54 mysqld_safe Starting mysqld daemon with databases from /home/lmorgado/sandboxes/rsandbox_5_5_8/master/data
110208 20:07:54 [Warning] The syntax '--log-slow-queries' is deprecated and will be removed in a future release. Please use '--slow-query-log'/'--slow-query-log-file' instead.
110208 20:07:54 [Note] Plugin 'FEDERATED' is disabled.
InnoDB: The InnoDB memory heap is disabled
InnoDB: Mutexes and rw_locks use GCC atomic builtins
InnoDB: Compressed tables use zlib 1.2.3
110208 20:07:54 InnoDB: Using Linux native AIO
110208 20:07:54 InnoDB: Initializing buffer pool, size = 128.0M
110208 20:07:54 InnoDB: Completed initialization of buffer pool
110208 20:07:54 InnoDB: highest supported file format is Barracuda.
110208 20:07:54 InnoDB: 1.1.4 started; log sequence number 1599024
110208 20:07:54 [Note] Semi-sync replication initialized for transactions.
110208 20:07:54 [Note] Semi-sync replication enabled on the master.
110208 20:07:54 [Note] Event Scheduler: Loaded 0 events
110208 20:07:54 [Note] /home/lmorgado/5.5.8/bin/mysqld: ready for connections.
Version: '5.5.8-log' socket: '/tmp/mysql_sandbox13213.sock' port: 13213 MySQL Community Server (GPL)
sandbox server started
mysql> SHOW VARIABLES LIKE "sort_buffer%";
+------------------+---------+
| Variable_name | Value |
+------------------+---------+
| sort_buffer_size | 1234567 |
+------------------+---------+
1 row in set (0.00 sec)
master [localhost] {msandbox} ((none)) > SHOW VARIABLES LIKE "log_slow_queries" ;
+------------------+-------+
| Variable_name | Value |
+------------------+-------+
| log_slow_queries | ON |
+------------------+-------+
1 row in set (0.00 sec)
master [localhost] {msandbox} ((none)) > SHOW VARIABLES LIKE "slow_query_log" ;
+----------------+-------+
| Variable_name | Value |
+----------------+-------+
| slow_query_log | ON |
+----------------+-------+
1 row in set (0.00 sec)
We see that both variables (sort_buffer and log_slow_queries) are set and accepted (both are deprecated) but only one warning is given.
Suggested fix:
*) Add warnings to the error log for all the old variables renamed in:
http://dev.mysql.com/doc/refman/4.1/en/upgrading-from-3-23.html
*) Perhaps mention in the manual entry for sort_buffer_size that this is the "new" name for sort_buffer.