Commit b894f480 authored by unknown's avatar unknown

This straightens up usage of have_ variables, and removes dead -skip-isam option.


mysql-test/r/warnings.result:
  Modified skip to use NDB.
mysql-test/t/warnings-master.opt:
  Removed dead options
mysql-test/t/warnings.test:
  Updated test to use NDB
sql/mysql_priv.h:
  Removed dead have_ variables
sql/mysqld.cc:
  Removed dead options (one which was never documenteD).
sql/set_var.cc:
  Removed have_ variables for prefered usage of show engines
storage/federated/ha_federated.cc:
  Removed head variable
storage/myisammrg/ha_myisammrg.cc:
  Updated to use correct state
parent 7d6b4a1a
...@@ -166,10 +166,10 @@ show variables like 'max_error_count'; ...@@ -166,10 +166,10 @@ show variables like 'max_error_count';
Variable_name Value Variable_name Value
max_error_count 10 max_error_count 10
drop table t1; drop table t1;
create table t1 (id int) engine=merge; create table t1 (id int) engine=NDB;
Warnings: Warnings:
Warning 1266 Using storage engine MyISAM for table 't1' Warning 1266 Using storage engine MyISAM for table 't1'
alter table t1 engine=merge; alter table t1 engine=NDB;
Warnings: Warnings:
Warning 1266 Using storage engine MyISAM for table 't1' Warning 1266 Using storage engine MyISAM for table 't1'
drop table t1; drop table t1;
......
...@@ -113,11 +113,8 @@ show variables like 'max_error_count'; ...@@ -113,11 +113,8 @@ show variables like 'max_error_count';
# Test for handler type # Test for handler type
# #
drop table t1; drop table t1;
#create table t1 (id int) engine=isam; create table t1 (id int) engine=NDB;
#alter table t1 engine=isam; alter table t1 engine=NDB;
#drop table t1;
create table t1 (id int) engine=merge;
alter table t1 engine=merge;
drop table t1; drop table t1;
# #
......
...@@ -1640,14 +1640,9 @@ extern TYPELIB log_output_typelib; ...@@ -1640,14 +1640,9 @@ extern TYPELIB log_output_typelib;
/* optional things, have_* variables */ /* optional things, have_* variables */
extern SHOW_COMP_OPTION have_innodb; extern SHOW_COMP_OPTION have_innodb;
extern SHOW_COMP_OPTION have_example_db;
extern SHOW_COMP_OPTION have_archive_db;
extern SHOW_COMP_OPTION have_csv_db; extern SHOW_COMP_OPTION have_csv_db;
extern SHOW_COMP_OPTION have_federated_db;
extern SHOW_COMP_OPTION have_blackhole_db;
extern SHOW_COMP_OPTION have_ndbcluster; extern SHOW_COMP_OPTION have_ndbcluster;
extern SHOW_COMP_OPTION have_partition_db; extern SHOW_COMP_OPTION have_partition_db;
extern SHOW_COMP_OPTION have_merge_db;
extern handlerton *partition_hton; extern handlerton *partition_hton;
extern handlerton *myisam_hton; extern handlerton *myisam_hton;
......
...@@ -310,7 +310,7 @@ static bool lower_case_table_names_used= 0; ...@@ -310,7 +310,7 @@ static bool lower_case_table_names_used= 0;
static bool volatile select_thread_in_use, signal_thread_in_use; static bool volatile select_thread_in_use, signal_thread_in_use;
static bool volatile ready_to_exit; static bool volatile ready_to_exit;
static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0; static my_bool opt_debugging= 0, opt_external_locking= 0, opt_console= 0;
static my_bool opt_isam, opt_ndbcluster, opt_merge; static my_bool opt_ndbcluster;
static my_bool opt_short_log_format= 0; static my_bool opt_short_log_format= 0;
static uint kill_cached_threads, wake_thread; static uint kill_cached_threads, wake_thread;
static ulong killed_threads, thread_created; static ulong killed_threads, thread_created;
...@@ -5165,9 +5165,6 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite, ...@@ -5165,9 +5165,6 @@ Disable with --skip-innodb-doublewrite.", (gptr*) &innobase_use_doublewrite,
(gptr*) &global_system_variables.innodb_table_locks, (gptr*) &global_system_variables.innodb_table_locks,
0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0}, 0, GET_BOOL, OPT_ARG, 1, 0, 0, 0, 0, 0},
#endif /* End WITH_INNOBASE_STORAGE_ENGINE */ #endif /* End WITH_INNOBASE_STORAGE_ENGINE */
{"isam", OPT_ISAM, "Obsolete. ISAM storage engine is no longer supported.",
(gptr*) &opt_isam, (gptr*) &opt_isam, 0, GET_BOOL, NO_ARG, 0, 0, 0,
0, 0, 0},
{"language", 'L', {"language", 'L',
"Client error messages in given language. May be given as a full path.", "Client error messages in given language. May be given as a full path.",
(gptr*) &language_ptr, (gptr*) &language_ptr, 0, GET_STR, REQUIRED_ARG, (gptr*) &language_ptr, (gptr*) &language_ptr, 0, GET_STR, REQUIRED_ARG,
...@@ -5339,9 +5336,6 @@ master-ssl", ...@@ -5339,9 +5336,6 @@ master-ssl",
#endif /* HAVE_REPLICATION */ #endif /* HAVE_REPLICATION */
{"memlock", OPT_MEMLOCK, "Lock mysqld in memory.", (gptr*) &locked_in_memory, {"memlock", OPT_MEMLOCK, "Lock mysqld in memory.", (gptr*) &locked_in_memory,
(gptr*) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, (gptr*) &locked_in_memory, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"merge", OPT_MERGE, "Enable Merge storage engine. Disable with \
--skip-merge.",
(gptr*) &opt_merge, (gptr*) &opt_merge, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
{"myisam-recover", OPT_MYISAM_RECOVER, {"myisam-recover", OPT_MYISAM_RECOVER,
"Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.", "Syntax: myisam-recover[=option[,option...]], where option can be DEFAULT, BACKUP, FORCE or QUICK.",
(gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0, (gptr*) &myisam_recover_options_str, (gptr*) &myisam_recover_options_str, 0,
...@@ -7016,31 +7010,11 @@ static void mysql_init_variables(void) ...@@ -7016,31 +7010,11 @@ static void mysql_init_variables(void)
"d:t:i:o,/tmp/mysqld.trace"); "d:t:i:o,/tmp/mysqld.trace");
#endif #endif
opt_error_log= IF_WIN(1,0); opt_error_log= IF_WIN(1,0);
#ifdef WITH_MYISAMMRG_STORAGE_ENGINE
have_merge_db= SHOW_OPTION_YES;
#else
have_merge_db= SHOW_OPTION_NO;
#endif
#ifdef WITH_INNOBASE_STORAGE_ENGINE #ifdef WITH_INNOBASE_STORAGE_ENGINE
have_innodb= SHOW_OPTION_YES; have_innodb= SHOW_OPTION_YES;
#else #else
have_innodb= SHOW_OPTION_NO; have_innodb= SHOW_OPTION_NO;
#endif #endif
#ifdef WITH_ARCHIVE_STORAGE_ENGINE
have_archive_db= SHOW_OPTION_YES;
#else
have_archive_db= SHOW_OPTION_NO;
#endif
#ifdef WITH_BLACKHOLE_STORAGE_ENGINE
have_blackhole_db= SHOW_OPTION_YES;
#else
have_blackhole_db= SHOW_OPTION_NO;
#endif
#ifdef WITH_FEDERATED_STORAGE_ENGINE
have_federated_db= SHOW_OPTION_YES;
#else
have_federated_db= SHOW_OPTION_NO;
#endif
#ifdef WITH_CSV_STORAGE_ENGINE #ifdef WITH_CSV_STORAGE_ENGINE
have_csv_db= SHOW_OPTION_YES; have_csv_db= SHOW_OPTION_YES;
#else #else
...@@ -7544,10 +7518,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -7544,10 +7518,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break; break;
} }
case OPT_MERGE: case OPT_MERGE:
if (opt_merge)
have_merge_db= SHOW_OPTION_YES;
else
have_merge_db= SHOW_OPTION_DISABLED;
case OPT_BDB: case OPT_BDB:
break; break;
case OPT_NDBCLUSTER: case OPT_NDBCLUSTER:
...@@ -7778,10 +7748,6 @@ static void get_options(int argc,char **argv) ...@@ -7778,10 +7748,6 @@ static void get_options(int argc,char **argv)
#ifndef WITH_INNOBASE_STORAGE_ENGINE #ifndef WITH_INNOBASE_STORAGE_ENGINE
if (opt_innodb) if (opt_innodb)
sql_print_warning("this binary does not contain INNODB storage engine"); sql_print_warning("this binary does not contain INNODB storage engine");
#endif
#ifndef WITH_ISAM_STORAGE_ENGINE
if (opt_isam)
sql_print_warning("this binary does not contain ISAM storage engine");
#endif #endif
if ((opt_log_slow_admin_statements || opt_log_queries_not_using_indexes) && if ((opt_log_slow_admin_statements || opt_log_queries_not_using_indexes) &&
!opt_slow_log) !opt_slow_log)
...@@ -8131,21 +8097,12 @@ void refresh_status(THD *thd) ...@@ -8131,21 +8097,12 @@ void refresh_status(THD *thd)
*****************************************************************************/ *****************************************************************************/
#undef have_innodb #undef have_innodb
#undef have_ndbcluster #undef have_ndbcluster
#undef have_archive_db
#undef have_csv_db #undef have_csv_db
#undef have_federated_db
#undef have_partition_db
#undef have_blackhole_db
#undef have_merge_db
SHOW_COMP_OPTION have_innodb= SHOW_OPTION_NO; SHOW_COMP_OPTION have_innodb= SHOW_OPTION_NO;
SHOW_COMP_OPTION have_ndbcluster= SHOW_OPTION_NO; SHOW_COMP_OPTION have_ndbcluster= SHOW_OPTION_NO;
SHOW_COMP_OPTION have_archive_db= SHOW_OPTION_NO;
SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO; SHOW_COMP_OPTION have_csv_db= SHOW_OPTION_NO;
SHOW_COMP_OPTION have_federated_db= SHOW_OPTION_NO;
SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO; SHOW_COMP_OPTION have_partition_db= SHOW_OPTION_NO;
SHOW_COMP_OPTION have_blackhole_db= SHOW_OPTION_NO;
SHOW_COMP_OPTION have_merge_db= SHOW_OPTION_NO;
#ifndef WITH_INNOBASE_STORAGE_ENGINE #ifndef WITH_INNOBASE_STORAGE_ENGINE
uint innobase_flush_log_at_trx_commit; uint innobase_flush_log_at_trx_commit;
......
...@@ -660,18 +660,12 @@ sys_var_thd_time_zone sys_time_zone("time_zone"); ...@@ -660,18 +660,12 @@ sys_var_thd_time_zone sys_time_zone("time_zone");
/* Read only variables */ /* Read only variables */
sys_var_have_variable sys_have_archive_db("have_archive", &have_archive_db);
sys_var_have_variable sys_have_blackhole_db("have_blackhole_engine",
&have_blackhole_db);
sys_var_have_variable sys_have_compress("have_compress", &have_compress); sys_var_have_variable sys_have_compress("have_compress", &have_compress);
sys_var_have_variable sys_have_crypt("have_crypt", &have_crypt); sys_var_have_variable sys_have_crypt("have_crypt", &have_crypt);
sys_var_have_variable sys_have_csv_db("have_csv", &have_csv_db); sys_var_have_variable sys_have_csv_db("have_csv", &have_csv_db);
sys_var_have_variable sys_have_dlopen("have_dynamic_loading", &have_dlopen); sys_var_have_variable sys_have_dlopen("have_dynamic_loading", &have_dlopen);
sys_var_have_variable sys_have_federated_db("have_federated_engine",
&have_federated_db);
sys_var_have_variable sys_have_geometry("have_geometry", &have_geometry); sys_var_have_variable sys_have_geometry("have_geometry", &have_geometry);
sys_var_have_variable sys_have_innodb("have_innodb", &have_innodb); sys_var_have_variable sys_have_innodb("have_innodb", &have_innodb);
sys_var_have_variable sys_have_merge_db("have_merge", &have_merge_db);
sys_var_have_variable sys_have_ndbcluster("have_ndbcluster", &have_ndbcluster); sys_var_have_variable sys_have_ndbcluster("have_ndbcluster", &have_ndbcluster);
sys_var_have_variable sys_have_openssl("have_openssl", &have_openssl); sys_var_have_variable sys_have_openssl("have_openssl", &have_openssl);
sys_var_have_variable sys_have_partition_db("have_partitioning", sys_var_have_variable sys_have_partition_db("have_partitioning",
...@@ -792,16 +786,12 @@ SHOW_VAR init_vars[]= { ...@@ -792,16 +786,12 @@ SHOW_VAR init_vars[]= {
{sys_var_general_log.name, (char*) &opt_log, SHOW_MY_BOOL}, {sys_var_general_log.name, (char*) &opt_log, SHOW_MY_BOOL},
{sys_var_general_log_path.name, (char*) &sys_var_general_log_path, SHOW_SYS}, {sys_var_general_log_path.name, (char*) &sys_var_general_log_path, SHOW_SYS},
{sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len, SHOW_SYS}, {sys_group_concat_max_len.name, (char*) &sys_group_concat_max_len, SHOW_SYS},
{sys_have_archive_db.name, (char*) &have_archive_db, SHOW_HAVE},
{sys_have_blackhole_db.name,(char*) &have_blackhole_db, SHOW_HAVE},
{sys_have_compress.name, (char*) &have_compress, SHOW_HAVE}, {sys_have_compress.name, (char*) &have_compress, SHOW_HAVE},
{sys_have_crypt.name, (char*) &have_crypt, SHOW_HAVE}, {sys_have_crypt.name, (char*) &have_crypt, SHOW_HAVE},
{sys_have_csv_db.name, (char*) &have_csv_db, SHOW_HAVE}, {sys_have_csv_db.name, (char*) &have_csv_db, SHOW_HAVE},
{sys_have_dlopen.name, (char*) &have_dlopen, SHOW_HAVE}, {sys_have_dlopen.name, (char*) &have_dlopen, SHOW_HAVE},
{sys_have_federated_db.name,(char*) &have_federated_db, SHOW_HAVE},
{sys_have_geometry.name, (char*) &have_geometry, SHOW_HAVE}, {sys_have_geometry.name, (char*) &have_geometry, SHOW_HAVE},
{sys_have_innodb.name, (char*) &have_innodb, SHOW_HAVE}, {sys_have_innodb.name, (char*) &have_innodb, SHOW_HAVE},
{sys_have_merge_db.name, (char*) &have_merge_db, SHOW_HAVE},
{sys_have_ndbcluster.name, (char*) &have_ndbcluster, SHOW_HAVE}, {sys_have_ndbcluster.name, (char*) &have_ndbcluster, SHOW_HAVE},
{sys_have_openssl.name, (char*) &have_openssl, SHOW_HAVE}, {sys_have_openssl.name, (char*) &have_openssl, SHOW_HAVE},
{sys_have_partition_db.name,(char*) &have_partition_db, SHOW_HAVE}, {sys_have_partition_db.name,(char*) &have_partition_db, SHOW_HAVE},
......
...@@ -418,7 +418,6 @@ int federated_db_init(void *p) ...@@ -418,7 +418,6 @@ int federated_db_init(void *p)
VOID(pthread_mutex_destroy(&federated_mutex)); VOID(pthread_mutex_destroy(&federated_mutex));
error: error:
have_federated_db= SHOW_OPTION_DISABLED; // If we couldn't use handler
DBUG_RETURN(TRUE); DBUG_RETURN(TRUE);
} }
......
...@@ -577,7 +577,7 @@ static int myisammrg_init(void *p) ...@@ -577,7 +577,7 @@ static int myisammrg_init(void *p)
myisammrg_hton= (handlerton *)p; myisammrg_hton= (handlerton *)p;
myisammrg_hton->state= have_merge_db; myisammrg_hton->state= SHOW_OPTION_YES;
myisammrg_hton->db_type= DB_TYPE_MRG_MYISAM; myisammrg_hton->db_type= DB_TYPE_MRG_MYISAM;
myisammrg_hton->create= myisammrg_create_handler; myisammrg_hton->create= myisammrg_create_handler;
myisammrg_hton->panic= myisammrg_panic; myisammrg_hton->panic= myisammrg_panic;
......
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