diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2012-08-28 12:53:33 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2012-08-28 12:53:33 +0400 |
commit | 869826d770e844608e5871a40610f676b8e0754b (patch) | |
tree | 0c81de2c99d9377fcb6ad9f2ae1a0ffdabb71ac6 /storage | |
parent | 8eb16159e19b38e67728fca7c7f316f921a2c7e0 (diff) | |
download | mariadb-git-869826d770e844608e5871a40610f676b8e0754b.tar.gz |
MDEV-480: TRUNCATE TABLE on a Cassandra table does not remove rows
- Remove HTON_CAN_RECREATE flag, re-create won't delete rows in cassandra.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/cassandra/ha_cassandra.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/storage/cassandra/ha_cassandra.cc b/storage/cassandra/ha_cassandra.cc index 9e94c848988..5b1a411be6a 100644 --- a/storage/cassandra/ha_cassandra.cc +++ b/storage/cassandra/ha_cassandra.cc @@ -142,7 +142,12 @@ static int cassandra_init_func(void *p) cassandra_hton->state= SHOW_OPTION_YES; cassandra_hton->create= cassandra_create_handler; - cassandra_hton->flags= HTON_CAN_RECREATE; + /* + Don't specify HTON_CAN_RECREATE in flags. re-create is used by TRUNCATE + TABLE to create an *empty* table from scratch. Cassandra table won't be + emptied if re-created. + */ + cassandra_hton->flags= 0; cassandra_hton->table_options= cassandra_table_option_list; //cassandra_hton->field_options= example_field_option_list; cassandra_hton->field_options= NULL; |