diff options
author | Mats Kindahl <mats@sun.com> | 2008-10-23 21:27:09 +0200 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2008-10-23 21:27:09 +0200 |
commit | 32c161f3ea7314051090fb02eca03ef347394010 (patch) | |
tree | 09212d65be943c6c5dfd6d6a834841683d81f9f8 /sql/ha_ndbcluster.cc | |
parent | 3be6d967c5d04fa6dbeab1c25f28673d3abf8433 (diff) | |
parent | e291aab7da9587f742291e7cc5e10e568846066e (diff) | |
download | mariadb-git-32c161f3ea7314051090fb02eca03ef347394010.tar.gz |
Merging 5.1 main into 5.1-rpl
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index c97ed6fada8..3454f3558e8 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -9977,34 +9977,23 @@ bool ha_ndbcluster::check_if_incompatible_data(HA_CREATE_INFO *create_info, if (table_changes != IS_EQUAL_YES) DBUG_RETURN(COMPATIBLE_DATA_NO); - /** - * Changing from/to primary key - * - * This is _not_ correct, but check_if_incompatible_data-interface - * doesnt give more info, so I guess that we can't do any - * online add index if not using primary key - * - * This as mysql will handle a unique not null index as primary - * even wo/ user specifiying it... :-( - * - */ - if ((table_share->primary_key == MAX_KEY && pk) || - (table_share->primary_key != MAX_KEY && !pk) || - (table_share->primary_key == MAX_KEY && !pk && ai)) - { - DBUG_RETURN(COMPATIBLE_DATA_NO); - } - /* Check that auto_increment value was not changed */ if ((create_info->used_fields & HA_CREATE_USED_AUTO) && create_info->auto_increment_value != 0) + { + DBUG_PRINT("info", ("auto_increment value changed")); DBUG_RETURN(COMPATIBLE_DATA_NO); + } /* Check that row format didn't change */ if ((create_info->used_fields & HA_CREATE_USED_AUTO) && get_row_type() != create_info->row_type) + { + DBUG_PRINT("info", ("row format changed")); DBUG_RETURN(COMPATIBLE_DATA_NO); + } + DBUG_PRINT("info", ("new table seems compatible")); DBUG_RETURN(COMPATIBLE_DATA_YES); } |