Commit 1281fbc5 authored by unknown's avatar unknown

Fix for bug #30088: Can't disable myisam-recover by a value of "".

  - test result.

Problem: we don't proper handle "" value of the --myisam-recover option.

Fix: turn off myisam recovering if --myisam-recover="" is set.


mysql-test/r/show_check.result:
  Fix for bug #30088: Can't disable myisam-recover by a value of "".
    - test result.
mysql-test/t/show_check-master.opt:
  Fix for bug #30088: Can't disable myisam-recover by a value of "".
    - test case.
mysql-test/t/show_check.test:
  Fix for bug #30088: Can't disable myisam-recover by a value of "".
    - test case.
sql/mysqld.cc:
  Fix for bug #30088: Can't disable myisam-recover by a value of "".
    - turn off myisam recovering if --myisam-recover="" is passed.
parent 6fb214b4
...@@ -1118,4 +1118,7 @@ select 1 from information_schema.tables limit 1; ...@@ -1118,4 +1118,7 @@ select 1 from information_schema.tables limit 1;
show status like 'slow_queries'; show status like 'slow_queries';
Variable_name Value Variable_name Value
Slow_queries 2 Slow_queries 2
show variables like 'myisam_recover_options';
Variable_name Value
myisam_recover_options OFF
End of 5.0 tests End of 5.0 tests
--log-slow-queries --log-long-format --log-queries-not-using-indexes --log-slow-queries --log-long-format --log-queries-not-using-indexes --myisam-recover=""
...@@ -782,4 +782,9 @@ show variables like "log_queries_not_using_indexes"; ...@@ -782,4 +782,9 @@ show variables like "log_queries_not_using_indexes";
select 1 from information_schema.tables limit 1; select 1 from information_schema.tables limit 1;
show status like 'slow_queries'; show status like 'slow_queries';
#
# Bug #30088: Can't disable myisam-recover by a value of ""
#
show variables like 'myisam_recover_options';
--echo End of 5.0 tests --echo End of 5.0 tests
...@@ -7241,11 +7241,16 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -7241,11 +7241,16 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
#endif /* HAVE_INNOBASE_DB */ #endif /* HAVE_INNOBASE_DB */
case OPT_MYISAM_RECOVER: case OPT_MYISAM_RECOVER:
{ {
if (!argument || !argument[0]) if (!argument)
{ {
myisam_recover_options= HA_RECOVER_DEFAULT; myisam_recover_options= HA_RECOVER_DEFAULT;
myisam_recover_options_str= myisam_recover_typelib.type_names[0]; myisam_recover_options_str= myisam_recover_typelib.type_names[0];
} }
else if (!argument[0])
{
myisam_recover_options= HA_RECOVER_NONE;
myisam_recover_options_str= "OFF";
}
else else
{ {
myisam_recover_options_str=argument; myisam_recover_options_str=argument;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment