Loading include/heap.h +1 −0 Original line number Diff line number Diff line Loading @@ -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); Loading mysql-test/r/partition.result +3 −3 Original line number Diff line number Diff line Loading @@ -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), Loading Loading @@ -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); Loading Loading @@ -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'; Loading sql/ha_ndbcluster.cc +37 −22 Original line number Diff line number Diff line Loading @@ -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); 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); handlerton *ndbcluster_hton; static handler *ndbcluster_create_handler(TABLE_SHARE *table, 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() Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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), Loading Loading @@ -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"); Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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"); Loading Loading @@ -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"); Loading Loading @@ -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(); Loading Loading @@ -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"); Loading Loading @@ -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; } Loading Loading @@ -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]; Loading Loading @@ -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"); Loading Loading @@ -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; Loading sql/ha_ndbcluster.h +1 −1 Original line number Diff line number Diff line Loading @@ -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(); Loading sql/ha_ndbcluster_binlog.cc +4 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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 Loading
include/heap.h +1 −0 Original line number Diff line number Diff line Loading @@ -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); Loading
mysql-test/r/partition.result +3 −3 Original line number Diff line number Diff line Loading @@ -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), Loading Loading @@ -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); Loading Loading @@ -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'; Loading
sql/ha_ndbcluster.cc +37 −22 Original line number Diff line number Diff line Loading @@ -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); 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); handlerton *ndbcluster_hton; static handler *ndbcluster_create_handler(TABLE_SHARE *table, 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() Loading Loading @@ -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); Loading Loading @@ -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); Loading Loading @@ -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), Loading Loading @@ -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"); Loading @@ -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; Loading Loading @@ -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; Loading Loading @@ -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"); Loading Loading @@ -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"); Loading Loading @@ -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(); Loading Loading @@ -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"); Loading Loading @@ -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; } Loading Loading @@ -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]; Loading Loading @@ -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"); Loading Loading @@ -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; Loading
sql/ha_ndbcluster.h +1 −1 Original line number Diff line number Diff line Loading @@ -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(); Loading
sql/ha_ndbcluster_binlog.cc +4 −2 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading @@ -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