WL#5182: Remove more deprecated 4.1/5.0 features

Affects: Server-5.5   —   Status: Complete

WL#5154 was a task for formally deprecating and removing items that
were mentioned in the manual as having been deprecated since MySQL
4.1 or 5.0, but that had never been removed.

Since WL#5154 was created, examination of mysqld.cc, mysql.cc, and
mysqldump.c reveals additional deprecations not mentioned in the
manual. (In some cases, the items are simply not mentioned in the
5.1+ manuals.)

This is a follow-on task to deprecate and remove these additional
items.

Item descriptions follow with suggested deprecation actions.  Because
the items are all deprecated in the --help text, I include the lines
of code from the option structures that show the current deprecation
notice. The deprecations in the --help text begin in MySQL 4.1 for all
items except --log-update and --sql-bin-update-same, which begin in
MySQL 5.0.

Overall, I propose that:
* Deprecation actions apply in 5.0, 5.1, and Betony.
* Deprecated items should be removed in Celosia. (There is one
* case where removal has happened in 6.0, but removing in Celosia
 would cause no harm.)

For each "deprecate and add warning" action proposed below, it
should be understood that there is a matching "remove deprecated
code from Celosia code base" action proposed as well.

mysqld.cc:

--enable-locking:
 {"enable-locking", OPT_ENABLE_LOCK,
  "Deprecated option, use --external-locking instead.",

Internally, this maps onto --external-locking.

Current behavior: No warning message is given if this option is used.
                 Option is deprecated in --help text.
Action:           Deprecate --enable-locking.
                 Issue warning message if option is used.
                 In --help text and warning message, indicate that
                 --external-locking is preferred and include
                 --enable-locking removal version.

--delay-key-write-for-all-tables:
 {"delay-key-write-for-all-tables", OPT_DELAY_KEY_WRITE_ALL,
  "Don't flush key buffers between writes for any MyISAM table (Deprecated
option, use --delay-key-write=all instead).",

Internally, this maps onto --delay-key-write=ALL.

Current behavior: No warning message is given if this option is used.
                 Option is deprecated in --help text.
Action:           Deprecate --delay-key-write-for-all-tables.
                 Issue warning message if option is used.
                 In --help text and warning message, indicate that
                 --delay-key-write=ALL is preferred and include
                 --delay-key-write-for-all-tables removal version.

--log-update:
 {"log-update", OPT_UPDATE_LOG,
  "The update log is deprecated since version 5.0, is replaced by the binary
\
log and this option justs turns on --log-bin instead.",

Internally, this enables the binary log (I think).

Current behavior: A warning message is given if this option is used.
                 Option is deprecated in --help text.
Action:           Deprecate --log-update.
                 Issue warning message if option is used.
                 In --help text and warning message, indicate that
                 --log-bin is preferred and include --log-update
                 removal version.

--skip-locking:
 {"skip-locking", OPT_SKIP_LOCK,
  "Deprecated option, use --skip-external-locking instead.",

Internally, this maps to --skip-external-locking.

Current behavior: No warning message is given if this option is used.
                 Option is deprecated in --help text.
Action:           Deprecate --skip-locking.
                 Issue warning message if option is used.
                 In --help text and warning message, indicate that
                 --skip-external-locking is preferred and include
                 --skip-locking removal version.

--skip-symlink:
 {"skip-symlink", OPT_SKIP_SYMLINKS, "Don't allow symlinking of tables.
Deprecated option.  Use --skip-symbolic-links instead.",

Internally, this maps to --skip-symbolic-links.

Current behavior: No warning message is given if this option is used.
                 Option is deprecated in --help text.
Action:           Deprecate --skip-symlink.
                 Issue warning message if option is used.
                 In --help text and warning message, indicate that
                 --skip-symbolic-links is preferred and include
                 --skip-symlink removal version.

--sql-bin-update-same:
 {"sql-bin-update-same", OPT_SQL_BIN_UPDATE_SAME,
  "The update log is deprecated since version 5.0, is replaced by the binary
\
log and this option does nothing anymore.",

Current behavior: In 5.0 and up, if you use this option, the server writes
                 an error message and fails to start up.
                 Option is deprecated in --help text.
Action:           Deprecate --sql-bin-update-same.
                 In --help text and warning message, indicate
                 --sql-bin-update-same removal version.

--use-symbolic-links:
 {"use-symbolic-links", 's', "Enable symbolic link support. Deprecated
option; use --symbolic-links instead.",

Internally, this maps to --use-symbolic-links.

Current behavior: No warning message is given if this option is used.
                 Option is deprecated in --help text.
Action:           Deprecate --use-symbolic-links.
                 Issue warning message if option is used.
                 In --help text and warning message, indicate that
                 --symbolic-links is preferred and include
                 --use-symbolic-links removal version.

--warnings:
 {"warnings", 'W', "Deprecated; use --log-warnings instead.",

Internally, this maps to --log-warnings.

Current behavior: No warning message is given if this option is used.
                 Option is deprecated in --help text.
Action:           Deprecate --warnings.
                 Issue warning message if option is used.
                 In --help text and warning message, indicate that
                 --log-warnings is preferred and include --warnings
                 removal version.
                 DO NOT deprecate -W; retain it. (It is already
                 associated with --log-warnings as well, so
                 retain that association.)

myisam_max_extra_sort_file_size:
 {"myisam_max_extra_sort_file_size", OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
  "Deprecated option",

This is kind of an odd one.

There is a changelog entry for 5.0.6 stating that this "unused"
variable was removed.  However, the variable CAN be set at startup
and produces no warning to the error log in 5.0, 5.1, 5.4, and 5.5.
Setting the varaible at startup produces an error in 6.0. (The
variable was removed entirely from mysqld.cc in 6.0.6, I suspect in
conjunction with BUG#38371.)

There is nothing to do for 6.0, it seems. For 5.0 through 5.5, I
suggest that we do something like this:
* Remove the variable in Celosia (5.5)
* In the --help text, say the variable is deprecated, does nothing, and
 is removed in 5.5.
* If the variable is set at startup, write a similar warning to the error
 log as what the --help text says.

record_buffer:
 {"record_buffer", OPT_RECORD_BUFFER,
  "Alias for read_buffer_size",

As you can see, this wasn't mentioned as "deprecated" in the --help
text, but a search through the 4.1 manual finds this:

http://dev.mysql.com/doc/refman/4.1/en/upgrading-from-3-23.html:
"The startup options record_buffer, sort_buffer, and warnings still work in
MySQL 4.0 but are deprecated."

record_buffer is not documented in any of the 5.0 or higher manuals (except
that it appears in a mysqld --verbose --help listing), so there is nothing to
do regarding the manual except remove that single line in versions
corresponding to the server versions from which the variable gets removed.

Current behavior: No warning message is given if this variable is used.
                 Option is said to be an alias in --help text.
Action:           Deprecate record_buffer.
                 Issue warning message if variable is used.
                 In --help text and warning message, indicate that
                 read_buffer_size is preferred and include
                 record_buffer removal version.


mysql:

--no-tee
 {"no-tee", OPT_NOTEE, "Disable outfile. See interactive help (\\h) also. 
WARNING: option deprecated; use --disable-tee instead", 0, 0, 0, GET_NO_ARG,

This could be handled the same way as --no-pager. Thus:

Current behavior: Warning message is given if this option is used.
                 (--skip-tee is preferred)
                 Option is deprecated in --help text.
Action:           Deprecate --no-tee.
                 Add removal version to warning message.

mysqldump:

--all (and -a):
 {"all", 'a', "Deprecated. Use --create-options instead.",

We could deprecate --all and associate -a with --create options to
preserve the short option.  Thus:

Current behavior: No warning message is given if this option is used.
                 Option is deprecated in --help text.
Action:           Deprecate --all.
                 Issue warning message if option is used.
                 (Include --all removal version and indicate that
                 --create-options is preferred.)
                 DO NOT deprecate -a; retain it, but associate it with
                 --create-options.
                 Remove deprecation of -a from program --help text
                 (and associate -a with --create-options instead).
                 Associate -a with --create-options in manual.