diff options
author | brian@zim.(none) <> | 2005-10-03 21:09:01 -0700 |
---|---|---|
committer | brian@zim.(none) <> | 2005-10-03 21:09:01 -0700 |
commit | 11be8401a7f2188432d3daa653bc2c6f067a9b80 (patch) | |
tree | d93e8b84b71a21fb41e696c41bfd0595d280b63d /sql/ha_innodb.cc | |
parent | fe26e59d70bc1b30d2426cbcf191ea7af0139db5 (diff) | |
parent | 2a42afd1322784317c2972076eaa50dcc1308355 (diff) | |
download | mariadb-git-11be8401a7f2188432d3daa653bc2c6f067a9b80.tar.gz |
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into zim.(none):/home/brian/mysql/fix-5.0
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r-- | sql/ha_innodb.cc | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc index b6737b3a991..85f26425099 100644 --- a/sql/ha_innodb.cc +++ b/sql/ha_innodb.cc @@ -208,6 +208,10 @@ static int innobase_release_savepoint(THD* thd, void *savepoint); handlerton innobase_hton = { "InnoDB", + SHOW_OPTION_YES, + "Supports transactions, row-level locking, and foreign keys", + DB_TYPE_INNODB, + innobase_init, 0, /* slot */ sizeof(trx_named_savept_t), /* savepoint size. TODO: use it */ innobase_close_connection, @@ -1188,7 +1192,7 @@ ha_innobase::init_table_handle_for_HANDLER(void) /************************************************************************* Opens an InnoDB database. */ -handlerton* +bool innobase_init(void) /*===============*/ /* out: &innobase_hton, or NULL on error */ @@ -1200,6 +1204,9 @@ innobase_init(void) DBUG_ENTER("innobase_init"); + if (have_innodb != SHOW_OPTION_YES) + goto error; + ut_a(DATA_MYSQL_TRUE_VARCHAR == (ulint)MYSQL_TYPE_VARCHAR); os_innodb_umask = (ulint)my_umask; @@ -1267,7 +1274,7 @@ innobase_init(void) "InnoDB: syntax error in innodb_data_file_path"); my_free(internal_innobase_data_file_path, MYF(MY_ALLOW_ZERO_PTR)); - DBUG_RETURN(0); + goto error; } /* -------------- Log files ---------------------------*/ @@ -1298,7 +1305,7 @@ innobase_init(void) my_free(internal_innobase_data_file_path, MYF(MY_ALLOW_ZERO_PTR)); - DBUG_RETURN(0); + goto error; } /* --------------------------------------------------*/ @@ -1386,7 +1393,7 @@ innobase_init(void) if (err != DB_SUCCESS) { my_free(internal_innobase_data_file_path, MYF(MY_ALLOW_ZERO_PTR)); - DBUG_RETURN(0); + goto error; } (void) hash_init(&innobase_open_tables,system_charset_info, 32, 0, 0, @@ -1413,7 +1420,10 @@ innobase_init(void) glob_mi.pos = trx_sys_mysql_master_log_pos; } */ - DBUG_RETURN(&innobase_hton); + DBUG_RETURN(FALSE); +error: + have_innodb= SHOW_OPTION_DISABLED; // If we couldn't use handler + DBUG_RETURN(TRUE); } /*********************************************************************** |