summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
authorunknown <brian@zim.(none)>2005-10-02 20:13:18 -0700
committerunknown <brian@zim.(none)>2005-10-02 20:13:18 -0700
commitcdb571925795518303b64c7149698fc328cf5f65 (patch)
tree0d6229a55087d478a4a78a95c498d0e963d270d8 /sql/ha_innodb.cc
parent05df35e3d67ce8519e3281be29b599c3283db039 (diff)
parent5655d31d5ff64ecea103be523985fa755586673b (diff)
downloadmariadb-git-cdb571925795518303b64c7149698fc328cf5f65.tar.gz
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.0
into zim.(none):/home/brian/mysql/fix-5.0 sql/ha_blackhole.cc: Auto merged sql/ha_heap.cc: Auto merged sql/ha_innodb.cc: Auto merged sql/examples/ha_example.cc: Auto merged sql/examples/ha_tina.cc: Auto merged sql/ha_archive.cc: Auto merged sql/ha_archive.h: Auto merged sql/ha_myisam.cc: Auto merged sql/ha_myisammrg.cc: Auto merged sql/ha_ndbcluster.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/mysql_priv.h: Auto merged sql/sql_show.cc: Auto merged sql/ha_federated.cc: Merge fix.
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc21
1 files changed, 16 insertions, 5 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index de458785534..ebe1e41f890 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,11 @@ 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
+ innobase_hton.state= SHOW_OPTION_DISABLED;
+ DBUG_RETURN(TRUE);
}
/***********************************************************************