From: magnus.blaudd Date: November 28 2012 1:10pm Subject: bzr push into mysql-5.1-telco-7.0 branch (magnus.blaudd:5050 to 5051) List-Archive: http://lists.mysql.com/commits/145402 Message-Id: <20121128131056.21170.76353.5051@wholphin> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 5051 magnus.blaudd@stripped 2012-11-28 [merge] Merge modified: sql/ha_ndbcluster.cc sql/ha_ndbcluster.h sql/ha_ndbcluster_glue.h 5050 Mauritz Sundell 2012-11-27 [merge] ndb - removing compiler warnings modified: storage/ndb/src/mgmsrv/Services.cpp storage/ndb/test/ndbapi/testSpj.cpp === modified file 'sql/ha_ndbcluster.cc' --- a/sql/ha_ndbcluster.cc 2012-11-12 12:53:18 +0000 +++ b/sql/ha_ndbcluster.cc 2012-11-27 11:27:02 +0000 @@ -330,24 +330,11 @@ ndbcluster_partition_flags() HA_CAN_PARTITION_UNIQUE | HA_USE_AUTO_PARTITION); } -#ifndef NDB_WITHOUT_ONLINE_ALTER static uint ndbcluster_alter_partition_flags() { return HA_PARTITION_FUNCTION_SUPPORTED; } -#else -static uint -ndbcluster_alter_table_flags(uint flags) -{ - if (flags & ALTER_DROP_PARTITION) - return 0; - else - return (HA_ONLINE_ADD_INDEX | HA_ONLINE_DROP_INDEX | - HA_ONLINE_ADD_UNIQUE_INDEX | HA_ONLINE_DROP_UNIQUE_INDEX | - HA_PARTITION_FUNCTION_SUPPORTED); -} -#endif #define NDB_AUTO_INCREMENT_RETRIES 100 #define BATCH_FLUSH_SIZE (32768) @@ -11757,13 +11744,8 @@ static int ndbcluster_init(void *p) h->show_status= ndbcluster_show_status; /* Show status */ h->alter_tablespace= ndbcluster_alter_tablespace; /* Show status */ h->partition_flags= ndbcluster_partition_flags; /* Partition flags */ -#ifndef NDB_WITHOUT_ONLINE_ALTER h->alter_partition_flags= ndbcluster_alter_partition_flags; /* Alter partition flags */ -#else - h->alter_table_flags= - ndbcluster_alter_table_flags; /* Alter table flags */ -#endif #if MYSQL_VERSION_ID >= 50501 h->fill_is_table= ndbcluster_fill_is_table; #else @@ -12290,9 +12272,7 @@ ulonglong ha_ndbcluster::table_flags(voi HA_HAS_OWN_BINLOGGING | HA_BINLOG_ROW_CAPABLE | HA_HAS_RECORDS | -#ifndef NDB_WITHOUT_ONLINE_ALTER HA_ONLINE_ALTER | -#endif 0; /* @@ -14932,7 +14912,6 @@ ha_ndbcluster::set_up_partition_info(par DBUG_RETURN(0); } -#ifndef NDB_WITHOUT_ONLINE_ALTER static HA_ALTER_FLAGS supported_alter_operations() { @@ -15724,8 +15703,8 @@ int ha_ndbcluster::alter_table_phase3(TH alter_info->data= 0; DBUG_RETURN(0); } -#endif +static bool set_up_tablespace(st_alter_tablespace *alter_info, NdbDictionary::Tablespace *ndb_ts) { @@ -15740,6 +15719,7 @@ bool set_up_tablespace(st_alter_tablespa return FALSE; } +static bool set_up_datafile(st_alter_tablespace *alter_info, NdbDictionary::Datafile *ndb_df) { @@ -15754,6 +15734,7 @@ bool set_up_datafile(st_alter_tablespace return FALSE; } +static bool set_up_logfile_group(st_alter_tablespace *alter_info, NdbDictionary::LogfileGroup *ndb_lg) { @@ -15768,6 +15749,7 @@ bool set_up_logfile_group(st_alter_table return FALSE; } +static bool set_up_undofile(st_alter_tablespace *alter_info, NdbDictionary::Undofile *ndb_uf) { @@ -15777,6 +15759,7 @@ bool set_up_undofile(st_alter_tablespace return FALSE; } +static int ndbcluster_alter_tablespace(handlerton *hton, THD* thd, st_alter_tablespace *alter_info) { === modified file 'sql/ha_ndbcluster.h' --- a/sql/ha_ndbcluster.h 2012-06-07 09:06:47 +0000 +++ b/sql/ha_ndbcluster.h 2012-11-27 11:23:39 +0000 @@ -542,7 +542,6 @@ static void set_tabname(const char *path qc_engine_callback *engine_callback, ulonglong *engine_data); -#ifndef NDB_WITHOUT_ONLINE_ALTER int check_if_supported_alter(TABLE *altered_table, HA_CREATE_INFO *create_info, HA_ALTER_INFO *alter_info, @@ -565,7 +564,6 @@ static void set_tabname(const char *path HA_CREATE_INFO *create_info, HA_ALTER_INFO *alter_info, HA_ALTER_FLAGS *alter_flags); -#endif private: #ifdef HAVE_NDB_BINLOG @@ -651,9 +649,7 @@ private: int ndb_optimize_table(THD* thd, uint delay); -#ifndef NDB_WITHOUT_ONLINE_ALTER int alter_frm(THD *thd, const char *file, NDB_ALTER_DATA *alter_data); -#endif bool check_all_operations_for_error(NdbTransaction *trans, const NdbOperation *first, === modified file 'sql/ha_ndbcluster_glue.h' --- a/sql/ha_ndbcluster_glue.h 2012-11-12 13:00:56 +0000 +++ b/sql/ha_ndbcluster_glue.h 2012-11-27 11:23:39 +0000 @@ -66,9 +66,6 @@ bool close_cached_tables(THD *thd, TABLE return close_cached_tables(thd, tables, wait_for_refresh, LONG_TIMEOUT); } -/* Online alter table not supported */ -#define NDB_WITHOUT_ONLINE_ALTER - /* Tablespace in .frm and TABLE_SHARE->tablespace not supported */ #define NDB_WITHOUT_TABLESPACE_IN_FRM No bundle (reason: useless for push emails).