mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 03:17:20 +02:00
Next big patch for loadable storage engines!
Handlerton array is now created instead of using sys_table_types_st. All storage engines can now have inits and giant ifdef's are now gone for startup. No compeltely clean yet, handlertons will next be merged with sys_table_types. Federated and archive now have real cleanup if their inits fail. sql/examples/ha_archive.cc: Modifications for new ha_init code. The init method now checks for errors and will not start up if the errors occur. sql/examples/ha_archive.h: Change for new init method. sql/examples/ha_example.cc: New handlerton pieces. sql/examples/ha_tina.cc: New handlerton pieces. sql/ha_berkeley.cc: New handlerton pieces, plus changes for ha_init changes. I'm not happy with our current "skip" setup. sql/ha_berkeley.h: Change in init return. sql/ha_blackhole.cc: Changes for new handlerton pieces. sql/ha_federated.cc: Changes for new handlerton and true cleanup code. sql/ha_heap.cc: Changes for new handlerton returns. sql/ha_innodb.cc: Changes for handlerton code. sql/ha_innodb.h: Change in init. sql/ha_myisam.cc: Changes for additional handlerton bits. sql/ha_myisammrg.cc: Changes for new handlerton bits. sql/ha_ndbcluster.cc: Changes for new handlerton bits. sql/ha_ndbcluster.h: Changes for handlerton bits. sql/handler.cc: Changes for ditching show_table_type_st types, and collapsing it into a handlerton array. The ha_init now just loops through all handlers to init (much cleaner...). handlertons and sys_table_types should be merged next. sql/handler.h: Additions for sys_table_types sql/log.cc: Clean up of binlog for changes in handlerton sql/mysql_priv.h: Removed unneeded define for binlog_init sql/sql_show.cc: Changes for change in handlerton to sys_table_types
This commit is contained in:
parent
a5dd3d5d8f
commit
5655d31d5f
20 changed files with 245 additions and 240 deletions
|
|
@ -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: TRUE if 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);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue