diff options
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 94fb7e6eb5c..b3ff91cb823 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -9824,10 +9824,21 @@ bool ha_ndbcluster::check_if_incompatible_data(HA_CREATE_INFO *info, uint i; const NDBTAB *tab= (const NDBTAB *) m_table; + if (current_thd->variables.ndb_use_copying_alter_table) + { + DBUG_PRINT("info", ("On-line alter table disabled")); + DBUG_RETURN(COMPATIBLE_DATA_NO); + } + for (i= 0; i < table->s->fields; i++) { Field *field= table->field[i]; const NDBCOL *col= tab->getColumn(field->field_name); + if (!col) + { + DBUG_PRINT("info", ("Field has been renamed, copy table")); + DBUG_RETURN(COMPATIBLE_DATA_NO); + } if ((field->flags & FIELD_IN_ADD_INDEX) && col->getStorageType() == NdbDictionary::Column::StorageTypeDisk) { |