Commit ab6830a0 authored by unknown's avatar unknown
Browse files

Merge zim.(none):/home/brian/mysql/merge-5.1

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


sql/mysql_priv.h:
  Auto merged
sql/share/errmsg.txt:
  Auto merged
sql/sql_show.cc:
  Auto merged
sql/handler.h:
  Merge from G's work
sql/sql_cursor.cc:
  Merge from G's work
storage/csv/ha_tina.cc:
  Merge of G's work
storage/innobase/handler/ha_innodb.cc:
  Merge of G's work
storage/innobase/handler/ha_innodb.h:
  Merge of G's work
storage/myisam/ha_myisam.cc:
  Merge of G's work
parents a4ac09c1 40bf7b0a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -225,6 +225,7 @@ extern int heap_indexes_are_disabled(HP_INFO *info);
extern void heap_update_auto_increment(HP_INFO *info, const byte *record);
ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, key_range *min_key,
                               key_range *max_key);
int hp_panic(enum ha_panic_function flag);
int heap_rkey(HP_INFO *info, byte *record, int inx, const byte *key, 
              uint key_len, enum ha_rkey_function find_flag);
extern gptr heap_find(HP_INFO *info,int inx,const byte *key);
+3 −3
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ create table t1 (a int)
engine = csv
partition by list (a)
(partition p0 values in (null));
ERROR HY000: CSV handler cannot be used in partitioned tables
ERROR HY000: Engine cannot be used in partitioned tables
create table t1 (a bigint)
partition by range (a)
(partition p0 values less than (0xFFFFFFFFFFFFFFFF),
@@ -102,7 +102,7 @@ create table t1 (a int)
engine = csv
partition by list (a)
(partition p0 values in (null));
ERROR HY000: CSV handler cannot be used in partitioned tables
ERROR HY000: Engine cannot be used in partitioned tables
create table t1 (a int)
partition by key(a)
(partition p0 engine = MEMORY);
@@ -1054,7 +1054,7 @@ drop table t1;
create table t1 (a int)
partition by key (a)
(partition p0 engine = MERGE);
ERROR HY000: MyISAM Merge handler cannot be used in partitioned tables
ERROR HY000: Engine cannot be used in partitioned tables
create table t1 (a varchar(1))
partition by key (a)
as select 'a';
+40 −25
Original line number Diff line number Diff line
@@ -75,17 +75,25 @@ static const int max_transactions= 3; // should really be 2 but there is a trans
static uint ndbcluster_partition_flags();
static uint ndbcluster_alter_table_flags(uint flags);
static int ndbcluster_init(void *);
static int ndbcluster_end(ha_panic_function flag);
static bool ndbcluster_show_status(THD*,stat_print_fn *,enum ha_stat_type);
static int ndbcluster_alter_tablespace(THD* thd, st_alter_tablespace *info);
static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables, COND *cond);

handlerton *ndbcluster_hton;

static handler *ndbcluster_create_handler(TABLE_SHARE *table,
static int ndbcluster_end(handlerton *hton, ha_panic_function flag);
static bool ndbcluster_show_status(handlerton *hton, THD*,
                                   stat_print_fn *,
                                   enum ha_stat_type);
static int ndbcluster_alter_tablespace(handlerton *hton,
                                       THD* thd, 
                                       st_alter_tablespace *info);
static int ndbcluster_fill_files_table(handlerton *hton,
                                       THD *thd, 
                                       TABLE_LIST *tables, 
                                       COND *cond);

static handlerton *ndbcluster_hton;

static handler *ndbcluster_create_handler(handlerton *hton,
                                          TABLE_SHARE *table,
                                          MEM_ROOT *mem_root)
{
  return new (mem_root) ha_ndbcluster(table);
  return new (mem_root) ha_ndbcluster(hton, table);
}

static uint ndbcluster_partition_flags()
@@ -4201,7 +4209,7 @@ int ha_ndbcluster::start_stmt(THD *thd, thr_lock_type lock_type)
  Commit a transaction started in NDB
 */

static int ndbcluster_commit(THD *thd, bool all)
static int ndbcluster_commit(handlerton *hton, THD *thd, bool all)
{
  int res= 0;
  Thd_ndb *thd_ndb= get_thd_ndb(thd);
@@ -4252,7 +4260,7 @@ static int ndbcluster_commit(THD *thd, bool all)
  Rollback a transaction started in NDB
 */

static int ndbcluster_rollback(THD *thd, bool all)
static int ndbcluster_rollback(handlerton *hton, THD *thd, bool all)
{
  int res= 0;
  Thd_ndb *thd_ndb= get_thd_ndb(thd);
@@ -5552,8 +5560,8 @@ void ha_ndbcluster::get_auto_increment(ulonglong offset, ulonglong increment,
                HA_HAS_OWN_BINLOGGING | \
                HA_HAS_RECORDS

ha_ndbcluster::ha_ndbcluster(TABLE_SHARE *table_arg):
  handler(ndbcluster_hton, table_arg),
ha_ndbcluster::ha_ndbcluster(handlerton *hton, TABLE_SHARE *table_arg):
  handler(hton, table_arg),
  m_active_trans(NULL),
  m_active_cursor(NULL),
  m_table(NULL),
@@ -5816,7 +5824,7 @@ int ha_ndbcluster::check_ndb_connection(THD* thd)
}


static int ndbcluster_close_connection(THD *thd)
static int ndbcluster_close_connection(handlerton *hton, THD *thd)
{
  Thd_ndb *thd_ndb= get_thd_ndb(thd);
  DBUG_ENTER("ndbcluster_close_connection");
@@ -5833,8 +5841,10 @@ static int ndbcluster_close_connection(THD *thd)
  Try to discover one table from NDB
 */

int ndbcluster_discover(THD* thd, const char *db, const char *name,
                        const void** frmblob, uint* frmlen)
int ndbcluster_discover(handlerton *hton, THD* thd, const char *db, 
                        const char *name,
                        const void** frmblob, 
                        uint* frmlen)
{
  int error= 0;
  NdbError ndb_error;
@@ -5914,7 +5924,8 @@ int ndbcluster_discover(THD* thd, const char *db, const char *name,

 */

int ndbcluster_table_exists_in_engine(THD* thd, const char *db,
int ndbcluster_table_exists_in_engine(handlerton *hton, THD* thd, 
                                      const char *db,
                                      const char *name)
{
  Ndb* ndb;
@@ -6014,7 +6025,7 @@ int ndbcluster_drop_database_impl(const char *path)
  DBUG_RETURN(ret);      
}

static void ndbcluster_drop_database(char *path)
static void ndbcluster_drop_database(handlerton *hton, char *path)
{
  THD *thd= current_thd;
  DBUG_ENTER("ndbcluster_drop_database");
@@ -6175,7 +6186,9 @@ int ndbcluster_find_all_files(THD *thd)
  DBUG_RETURN(-(skipped + unhandled));
}

int ndbcluster_find_files(THD *thd,const char *db,const char *path,
int ndbcluster_find_files(handlerton *hton, THD *thd,
                          const char *db,
                          const char *path,
                          const char *wild, bool dir, List<char> *files)
{
  DBUG_ENTER("ndbcluster_find_files");
@@ -6285,7 +6298,7 @@ int ndbcluster_find_files(THD *thd,const char *db,const char *path,
    DBUG_PRINT("info", ("%s existed on disk", name));     
    // The .ndb file exists on disk, but it's not in list of tables in ndb
    // Verify that handler agrees table is gone.
    if (ndbcluster_table_exists_in_engine(thd, db, file_name) == 0)    
    if (ndbcluster_table_exists_in_engine(hton, thd, db, file_name) == 0)    
    {
      DBUG_PRINT("info", ("NDB says %s does not exists", file_name));     
      it.remove();
@@ -6539,7 +6552,7 @@ static int ndbcluster_init(void *p)
  DBUG_RETURN(TRUE);
}

static int ndbcluster_end(ha_panic_function type)
static int ndbcluster_end(handlerton *hton, ha_panic_function type)
{
  DBUG_ENTER("ndbcluster_end");

@@ -6623,7 +6636,7 @@ void ndbcluster_print_error(int error, const NdbOperation *error_op)
  share.db.length= 0;
  share.table_name.str= (char *) tab_name;
  share.table_name.length= strlen(tab_name);
  ha_ndbcluster error_handler(&share);
  ha_ndbcluster error_handler(ndbcluster_hton, &share);
  error_handler.print_error(error, MYF(0));
  DBUG_VOID_RETURN;
}
@@ -9703,7 +9716,7 @@ char* ha_ndbcluster::get_tablespace_name(THD *thd)
  Implements the SHOW NDB STATUS command.
*/
bool
ndbcluster_show_status(THD* thd, stat_print_fn *stat_print,
ndbcluster_show_status(handlerton *hton, THD* thd, stat_print_fn *stat_print,
                       enum ha_stat_type stat_type)
{
  char buf[IO_SIZE];
@@ -10167,7 +10180,7 @@ bool set_up_undofile(st_alter_tablespace *info,
  return false;
}

int ndbcluster_alter_tablespace(THD* thd, st_alter_tablespace *info)
int ndbcluster_alter_tablespace(handlerton *hton, THD* thd, st_alter_tablespace *info)
{
  DBUG_ENTER("ha_ndbcluster::alter_tablespace");

@@ -10428,7 +10441,9 @@ bool ha_ndbcluster::get_no_parts(const char *name, uint *no_parts)
  DBUG_RETURN(TRUE);
}

static int ndbcluster_fill_files_table(THD *thd, TABLE_LIST *tables,
static int ndbcluster_fill_files_table(handlerton *hton, 
                                       THD *thd, 
                                       TABLE_LIST *tables,
                                       COND *cond)
{
  TABLE* table= tables->table;
+1 −1
Original line number Diff line number Diff line
@@ -627,7 +627,7 @@ class Thd_ndb
class ha_ndbcluster: public handler
{
 public:
  ha_ndbcluster(TABLE_SHARE *table);
  ha_ndbcluster(handlerton *hton, TABLE_SHARE *table);
  ~ha_ndbcluster();

  int ha_initialise();
+4 −2
Original line number Diff line number Diff line
@@ -506,7 +506,7 @@ ndbcluster_binlog_index_purge_file(THD *thd, const char *file)
}

static void
ndbcluster_binlog_log_query(THD *thd, enum_binlog_command binlog_command,
ndbcluster_binlog_log_query(handlerton *hton, THD *thd, enum_binlog_command binlog_command,
                            const char *query, uint query_length,
                            const char *db, const char *table_name)
{
@@ -637,7 +637,9 @@ static void ndbcluster_reset_slave(THD *thd)
/*
  Initialize the binlog part of the ndb handlerton
*/
static int ndbcluster_binlog_func(THD *thd, enum_binlog_func fn, void *arg)
static int ndbcluster_binlog_func(handlerton *hton, THD *thd, 
                                  enum_binlog_func fn, 
                                  void *arg)
{
  switch(fn)
  {
Loading