Commit 9f9c3364 authored by unknown's avatar unknown
Browse files

Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1-arch

into  zim.(none):/home/brian/mysql/arch-5.1


sql/handler.cc:
  Auto merged
parents 6df61606 ac11ba6c
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -227,12 +227,6 @@ extern my_bool innobase_log_archive,
	innobase_use_native_aio,
	innobase_file_per_table, innobase_locks_unsafe_for_binlog,
	innobase_create_status_file;
extern my_bool innobase_very_fast_shutdown;	/* set this to 1 just before
						calling innobase_end() if
						you want InnoDB to shut down
						without flushing the buffer
						pool: this is equivalent to
						a 'crash' */
extern "C" {
extern ulong srv_max_buf_pool_modified_pct;
extern ulong srv_max_purge_lag;
+1 −0
Original line number Diff line number Diff line
@@ -6387,6 +6387,7 @@ static int ndbcluster_init()
    ndbcluster_binlog_init_handlerton();
#endif
    h.flags=            HTON_CAN_RECREATE | HTON_TEMPORARY_NOT_SUPPORTED;
    h.discover=         ndbcluster_discover;
  }

  if (have_ndbcluster != SHOW_OPTION_YES)
+27 −4
Original line number Diff line number Diff line
@@ -2705,18 +2705,41 @@ int ha_change_key_cache(KEY_CACHE *old_key_cache,
    >0 : error.  frmblob and frmlen may not be set
*/

typedef struct st_discover_args
{
  const char *db;
  const char *name;
  const void** frmblob; 
  uint* frmlen;
};

static my_bool discover_handlerton(THD *thd, st_plugin_int *plugin,
                                   void *arg)
{
  st_discover_args *vargs= (st_discover_args *)arg;
  handlerton *hton= (handlerton *)plugin->data;
  if (hton->state == SHOW_OPTION_YES && hton->discover &&
      (!(hton->discover(thd, vargs->db, vargs->name, vargs->frmblob, vargs->frmlen))))
    return TRUE;

  return FALSE;
}

int ha_discover(THD *thd, const char *db, const char *name,
		const void **frmblob, uint *frmlen)
{
  int error= -1; // Table does not exist in any handler
  DBUG_ENTER("ha_discover");
  DBUG_PRINT("enter", ("db: %s, name: %s", db, name));
  st_discover_args args= {db, name, frmblob, frmlen};

  if (is_prefix(name,tmp_file_prefix)) /* skip temporary tables */
    DBUG_RETURN(error);
#ifdef WITH_NDBCLUSTER_STORAGE_ENGINE
  if (have_ndbcluster == SHOW_OPTION_YES)
    error= ndbcluster_discover(thd, db, name, frmblob, frmlen);
#endif

  if (plugin_foreach(thd, discover_handlerton,
                 MYSQL_STORAGE_ENGINE_PLUGIN, &args))
    error= 0;

  if (!error)
    statistic_increment(thd->status_var.ha_discover_count,&LOCK_status);
  DBUG_RETURN(error);
+2 −1
Original line number Diff line number Diff line
@@ -667,6 +667,8 @@ struct handlerton
   enum handler_create_iterator_result
     (*create_iterator)(enum handler_iterator_type type,
                        struct handler_iterator *fill_this_in);
   int (*discover)(THD* thd, const char *db, const char *name,
                           const void** frmblob, uint* frmlen);
};


@@ -1589,7 +1591,6 @@ class handler :public Sql_alloc

	/* Some extern variables used with handlers */

extern handlerton *sys_table_types[];
extern const char *ha_row_type[];
extern TYPELIB tx_isolation_typelib;
extern TYPELIB myisam_stats_method_typelib;
+1 −8
Original line number Diff line number Diff line
@@ -357,9 +357,7 @@ my_bool opt_show_slave_auth_info, opt_sql_bin_update = 0;
my_bool opt_log_slave_updates= 0;
my_bool	opt_innodb;
#ifdef WITH_INNOBASE_STORAGE_ENGINE
extern uint innobase_init_flags, innobase_lock_type;
extern uint innobase_flush_log_at_trx_commit;
extern ulong innobase_cache_size, innobase_fast_shutdown;
extern ulong innobase_fast_shutdown;
extern ulong innobase_large_page_size;
extern char *innobase_home, *innobase_tmpdir, *innobase_logdir;
extern long innobase_lock_scan_time;
@@ -383,11 +381,6 @@ extern my_bool innobase_log_archive,
               innobase_use_native_aio,
               innobase_file_per_table, innobase_locks_unsafe_for_binlog,
               innobase_create_status_file;
extern my_bool innobase_very_fast_shutdown; /* set this to 1 just before
                                            calling innobase_end() if you want
                                            InnoDB to shut down without
                                            flushing the buffer pool: this
                                            is equivalent to a 'crash' */
extern "C" {
extern ulong srv_max_buf_pool_modified_pct;
extern ulong srv_max_purge_lag;
Loading