mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Merge baker@bk-internal.mysql.com:/home/bk/mysql-5.1
into zim.(none):/home/brian/mysql/arch-5.1
This commit is contained in:
@@ -23,9 +23,6 @@
|
||||
|
||||
#include "mysql_priv.h"
|
||||
#include "rpl_filter.h"
|
||||
#include "ha_heap.h"
|
||||
#include "ha_myisam.h"
|
||||
#include "ha_myisammrg.h"
|
||||
|
||||
|
||||
#include <myisampack.h>
|
||||
@@ -40,10 +37,6 @@
|
||||
#include "ha_partition.h"
|
||||
#endif
|
||||
|
||||
#ifdef WITH_INNOBASE_STORAGE_ENGINE
|
||||
#include "ha_innodb.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
While we have legacy_db_type, we have this array to
|
||||
check for dups and to find handlerton from legacy_db_type.
|
||||
@@ -437,6 +430,12 @@ int ha_initialize_handlerton(st_plugin_int *plugin)
|
||||
savepoint_alloc_size+= tmp;
|
||||
hton->slot= total_ha++;
|
||||
hton2plugin[hton->slot]=plugin;
|
||||
/* This is just a temp need until plugin/engine startup is fixed */
|
||||
if (plugin->plugin->status_vars)
|
||||
{
|
||||
add_status_vars(plugin->plugin->status_vars);
|
||||
}
|
||||
|
||||
if (hton->prepare)
|
||||
total_ha_2pc++;
|
||||
break;
|
||||
@@ -2706,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);
|
||||
@@ -3516,7 +3538,7 @@ int handler::ha_reset()
|
||||
/* Check that we have called all proper delallocation functions */
|
||||
DBUG_ASSERT((byte*) table->def_read_set.bitmap +
|
||||
table->s->column_bitmap_size ==
|
||||
(char*) table->def_write_set.bitmap);
|
||||
(byte*) table->def_write_set.bitmap);
|
||||
DBUG_ASSERT(bitmap_is_set_all(&table->s->all_set));
|
||||
DBUG_ASSERT(table->key_read == 0);
|
||||
/* ensure that ha_index_end / ha_rnd_end has been called */
|
||||
|
||||
Reference in New Issue
Block a user