diff options
author | unknown <acurtis@poseidon.ndb.mysql.com> | 2005-11-07 16:25:06 +0100 |
---|---|---|
committer | unknown <acurtis@poseidon.ndb.mysql.com> | 2005-11-07 16:25:06 +0100 |
commit | 6b3a9caef9b8cf42f8a706f778bba72db89cdd2b (patch) | |
tree | 2b8ffe29d899326e4ad244ac3f67d4fcf29bfae6 /sql/sql_yacc.yy | |
parent | df33aacd87ff08c27fd371a0bb348fe3986e6f95 (diff) | |
download | mariadb-git-6b3a9caef9b8cf42f8a706f778bba72db89cdd2b.tar.gz |
Make storage engines "pluggable", handlerton work
Makefile.am:
Changes to autoconf subst
config/ac-macros/ha_berkeley.m4:
simplify
config/ac-macros/ha_ndbcluster.m4:
simplify
config/ac-macros/ha_partition.m4:
simplify
configure.in:
strip configure of storage engine specific cruft and simplify
extra/Makefile.am:
changes to autoconf/automake subst
libmysqld/Makefile.am:
only compile storage engines if required.
make find object file a little smarter
libmysqld/examples/Makefile.am:
changes to autoconf subst
mysql-test/Makefile.am:
remove storage engine specific cruft
mysql-test/r/ps_1general.result:
cannot gaurantee order of results from 'show storage engines'
mysql-test/r/show_check.result:
fix test - frm file fails to be deleted if it is invalid
mysql-test/r/sql_mode.result:
isam does not exist, test may need to be redone/fixed in 5.0
mysql-test/r/warnings.result:
isam no longer exists
mysql-test/t/ps_1general.test:
cannot gaurantee order of results from 'show storage engines'
mysql-test/t/show_check.test:
fix test - frm file fails to be deleted if it is invalid
mysql-test/t/sql_mode.test:
isam does not exist, test may need to be redone/fixed in 5.0
mysql-test/t/system_mysql_db_fix.test:
change isam to myisam
mysql-test/t/view.test:
change isam to myisam
mysql-test/t/warnings.test:
isam no longer exists
sql/Makefile.am:
Make storage engines "pluggable" stage 1
only compile storage engines if included
sql/examples/ha_example.cc:
handlerton work
sql/examples/ha_example.h:
handlerton work
sql/examples/ha_tina.cc:
handlerton work
sql/examples/ha_tina.h:
handlerton work
sql/ha_archive.cc:
handlerton work
sql/ha_archive.h:
handlerton work
sql/ha_berkeley.cc:
handlerton work
sql/ha_berkeley.h:
handlerton work
sql/ha_blackhole.cc:
handlerton work
sql/ha_federated.cc:
handlerton work
sql/ha_federated.h:
handlerton work
sql/ha_heap.cc:
handlerton work
sql/ha_innodb.cc:
handlerton work
sql/ha_innodb.h:
handlerton work
sql/ha_myisam.cc:
handlerton work
sql/ha_myisammrg.cc:
handlerton work
sql/ha_ndbcluster.cc:
handlerton work
sql/ha_ndbcluster.h:
handlerton work
sql/ha_partition.cc:
handlerton work
sql/handler.cc:
start removing storage engine specific cruft
sql/handler.h:
start removing storage engine specific cruft
db_type for binlog handlerton
handlerton flag for not-user-selectable storage engines
sql/lex.h:
start removing storage engine specific cruft
sql/log.cc:
handlerton work
give binlog handlerton a 'real' db_type
sql/mysql_priv.h:
start removing storage engine specific cruft
sql/mysqld.cc:
start removing storage engine specific cruft
sql/set_var.cc:
start removing storage engine specific cruft
sql/sp_head.cc:
start removing storage engine specific cruft
sql/sql_class.cc:
start removing storage engine specific cruft
sql/sql_class.h:
start removing storage engine specific cruft
sql/sql_lex.h:
start removing storage engine specific cruft
sql/sql_manager.cc:
start removing storage engine specific cruft
sql/sql_manager.h:
start removing storage engine specific cruft
sql/sql_parse.cc:
start removing storage engine specific cruft
sql/sql_partition.cc:
start removing storage engine specific cruft
sql/sql_prepare.cc:
start removing storage engine specific cruft
sql/sql_show.cc:
start removing storage engine specific cruft
sql/sql_table.cc:
changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
start removing storage engine specific cruft
sql/sql_update.cc:
changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/sql_yacc.yy:
start removing storage engine specific cruft
test if we should throw error
sql/table.cc:
changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/table.h:
changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
sql/unireg.cc:
changed define from HAVE_PARTITION_DB to WITH_PARTITION_STORAGE_ENGINE
storage/ndb/include/kernel/kernel_types.h:
added my_config.h
storage/ndb/include/ndb_global.h.in:
added my_config.h
storage/ndb/include/ndb_types.h.in:
added my_config.h
config/ac-macros/storage.m4:
New BitKeeper file ``config/ac-macros/storage.m4''
sql/handlerton.cc.in:
New BitKeeper file ``sql/handlerton.cc.in''
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 62 |
1 files changed, 34 insertions, 28 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 11f8192809f..7d670d8988c 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -3255,7 +3255,9 @@ storage_engines: ident_or_text { $$ = ha_resolve_by_name($1.str,$1.length); - if ($$ == DB_TYPE_UNKNOWN) { + if ($$ == DB_TYPE_UNKNOWN && + test(YYTHD->variables.sql_mode & MODE_NO_ENGINE_SUBSTITUTION)) + { my_error(ER_UNKNOWN_STORAGE_ENGINE, MYF(0), $1.str); YYABORT; } @@ -7110,6 +7112,9 @@ show_param: | ENGINE_SYM storage_engines { Lex->create_info.db_type= $2; } show_engine_param + | ENGINE_SYM ALL + { Lex->create_info.db_type= DB_TYPE_DEFAULT; } + show_engine_param | opt_full COLUMNS from_or_in table_ident opt_db wild_and_where { LEX *lex= Lex; @@ -7192,9 +7197,19 @@ show_param: YYABORT; } | INNOBASE_SYM STATUS_SYM - { Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; WARN_DEPRECATED("SHOW INNODB STATUS", "SHOW ENGINE INNODB STATUS"); } + { + LEX *lex= Lex; + lex->sql_command = SQLCOM_SHOW_ENGINE_STATUS; + lex->create_info.db_type= DB_TYPE_INNODB; + WARN_DEPRECATED("SHOW INNODB STATUS", "SHOW ENGINE INNODB STATUS"); + } | MUTEX_SYM STATUS_SYM - { Lex->sql_command = SQLCOM_SHOW_MUTEX_STATUS; } + { + LEX *lex= Lex; + lex->sql_command = SQLCOM_SHOW_ENGINE_MUTEX; + lex->create_info.db_type= DB_TYPE_INNODB; + WARN_DEPRECATED("SHOW MUTEX STATUS", "SHOW ENGINE INNODB MUTEX"); + } | opt_full PROCESSLIST_SYM { Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;} | opt_var_type VARIABLES wild_and_where @@ -7223,9 +7238,19 @@ show_param: YYABORT; } | BERKELEY_DB_SYM LOGS_SYM - { Lex->sql_command= SQLCOM_SHOW_LOGS; WARN_DEPRECATED("SHOW BDB LOGS", "SHOW ENGINE BDB LOGS"); } + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; + lex->create_info.db_type= DB_TYPE_BERKELEY_DB; + WARN_DEPRECATED("SHOW BDB LOGS", "SHOW ENGINE BDB LOGS"); + } | LOGS_SYM - { Lex->sql_command= SQLCOM_SHOW_LOGS; WARN_DEPRECATED("SHOW LOGS", "SHOW ENGINE BDB LOGS"); } + { + LEX *lex= Lex; + lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; + lex->create_info.db_type= DB_TYPE_BERKELEY_DB; + WARN_DEPRECATED("SHOW LOGS", "SHOW ENGINE BDB LOGS"); + } | GRANTS { LEX *lex=Lex; @@ -7324,30 +7349,11 @@ show_param: show_engine_param: STATUS_SYM - { - switch (Lex->create_info.db_type) { - case DB_TYPE_NDBCLUSTER: - Lex->sql_command = SQLCOM_SHOW_NDBCLUSTER_STATUS; - break; - case DB_TYPE_INNODB: - Lex->sql_command = SQLCOM_SHOW_INNODB_STATUS; - break; - default: - my_error(ER_NOT_SUPPORTED_YET, MYF(0), "STATUS"); - YYABORT; - } - } + { Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS; } + | MUTEX_SYM + { Lex->sql_command= SQLCOM_SHOW_ENGINE_MUTEX; } | LOGS_SYM - { - switch (Lex->create_info.db_type) { - case DB_TYPE_BERKELEY_DB: - Lex->sql_command = SQLCOM_SHOW_LOGS; - break; - default: - my_error(ER_NOT_SUPPORTED_YET, MYF(0), "LOGS"); - YYABORT; - } - }; + { Lex->sql_command= SQLCOM_SHOW_ENGINE_LOGS; }; master_or_binary: MASTER_SYM |