Commit cdb57192 authored by unknown's avatar unknown
Browse files

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.
parents 05df35e3 5655d31d
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -74,7 +74,11 @@


handlerton example_hton= {
  "CSV",
  "EXAMPLE",
  SHOW_OPTION_YES,
  "Example storage engine", 
  DB_TYPE_EXAMPLE_DB,
  NULL,    /* We do need to write one! */
  0,       /* slot */
  0,       /* savepoint size. */
  NULL,    /* close_connection */
+4 −0
Original line number Diff line number Diff line
@@ -56,6 +56,10 @@ static int tina_init= 0;

handlerton tina_hton= {
  "CSV",
  SHOW_OPTION_YES,
  "CSV storage engine", 
  DB_TYPE_CSV_DB,
  NULL,    /* One needs to be written! */
  0,       /* slot */
  0,       /* savepoint size. */
  NULL,    /* close_connection */
+23 −8
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@
*/

/* If the archive storage engine has been inited */
static bool archive_inited= 0;
static bool archive_inited= FALSE;
/* Variables for archive share methods */
pthread_mutex_t archive_mutex;
static HASH archive_open_tables;
@@ -138,6 +138,10 @@ static HASH archive_open_tables;
/* dummy handlerton - only to have something to return from archive_db_init */
handlerton archive_hton = {
  "archive",
  SHOW_OPTION_YES,
  "Archive storage engine", 
  DB_TYPE_ARCHIVE_DB,
  archive_db_init,
  0,       /* slot */
  0,       /* savepoint size. */
  NULL,    /* close_connection */
@@ -176,18 +180,29 @@ static byte* archive_get_key(ARCHIVE_SHARE *share,uint *length,
    void

  RETURN
    &archive_hton OK
    0             Error
    FALSE       OK
    TRUE        Error
*/

handlerton *archive_db_init()
bool archive_db_init()
{
  archive_inited= 1;
  VOID(pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST));
  DBUG_ENTER("archive_db_init");
  if (pthread_mutex_init(&archive_mutex, MY_MUTEX_INIT_FAST))
    goto error;
  if (hash_init(&archive_open_tables, system_charset_info, 32, 0, 0,
                (hash_get_key) archive_get_key, 0, 0))
    return 0;
  return &archive_hton;
  {
    VOID(pthread_mutex_destroy(&archive_mutex));
  }
  else
  {
    archive_inited= TRUE;
    DBUG_RETURN(FALSE);
  }
error:
  have_archive_db= SHOW_OPTION_DISABLED;	// If we couldn't use handler
  archive_hton.state= SHOW_OPTION_DISABLED;
  DBUG_RETURN(TRUE);
}

/*
+1 −1
Original line number Diff line number Diff line
@@ -105,6 +105,6 @@ class ha_archive: public handler
                             enum thr_lock_type lock_type);
};

handlerton *archive_db_init(void);
bool archive_db_init(void);
bool archive_db_end(void);
+15 −4
Original line number Diff line number Diff line
@@ -109,6 +109,10 @@ static int berkeley_rollback(THD *thd, bool all);

handlerton berkeley_hton = {
  "BerkeleyDB",
  SHOW_OPTION_YES,
  "Supports transactions and page-level locking", 
  DB_TYPE_BERKELEY_DB,
  berkeley_init,
  0, /* slot */
  0, /* savepoint size */
  berkeley_close_connection,
@@ -135,10 +139,13 @@ typedef struct st_berkeley_trx_data {

/* General functions */

handlerton *berkeley_init(void)
bool berkeley_init(void)
{
  DBUG_ENTER("berkeley_init");

  if (have_berkeley_db != SHOW_OPTION_YES)
    goto error;

  if (!berkeley_tmpdir)
    berkeley_tmpdir=mysql_tmpdir;
  if (!berkeley_home)
@@ -164,7 +171,7 @@ handlerton *berkeley_init(void)
  berkeley_log_file_size= max(berkeley_log_file_size, 10*1024*1024L);

  if (db_env_create(&db_env,0))
    DBUG_RETURN(0);
    goto error;
  db_env->set_errcall(db_env,berkeley_print_error);
  db_env->set_errpfx(db_env,"bdb");
  db_env->set_noticecall(db_env, berkeley_noticecall);
@@ -194,13 +201,17 @@ handlerton *berkeley_init(void)
  {
    db_env->close(db_env,0);
    db_env=0;
    DBUG_RETURN(0);
    goto error;
  }

  (void) hash_init(&bdb_open_tables,system_charset_info,32,0,0,
		   (hash_get_key) bdb_get_key,0,0);
  pthread_mutex_init(&bdb_mutex,MY_MUTEX_INIT_FAST);
  DBUG_RETURN(&berkeley_hton);
  DBUG_RETURN(FALSE);
error:
  have_berkeley_db= SHOW_OPTION_DISABLED;	// If we couldn't use handler
  berkeley_hton.state= SHOW_OPTION_DISABLED;
  DBUG_RETURN(TRUE);
}


Loading