diff options
author | Sergey Petrunya <psergey@askmonty.org> | 2013-05-28 13:32:39 +0400 |
---|---|---|
committer | Sergey Petrunya <psergey@askmonty.org> | 2013-05-28 13:32:39 +0400 |
commit | 38c611ed597c69605aff7c06aadb16a99cc31e56 (patch) | |
tree | 1ecfa6da46d8535728b0cd4ccccb5ad94d40ffaf /storage/cassandra | |
parent | c00a37d11384a0c86ae0f42af971bb8691f4018b (diff) | |
download | mariadb-git-38c611ed597c69605aff7c06aadb16a99cc31e56.tar.gz |
MDEV-4001: Cassandra: server crashes in ha_cassandra::end_bulk_insert on INSERT .. SELECT with a non-existing column
- INSERT ... SELECT may call handler->end_bulk_insert() without having
called handler->start_bulk_insert(). Let Cassandra SE handle this.
Diffstat (limited to 'storage/cassandra')
-rw-r--r-- | storage/cassandra/ha_cassandra.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/storage/cassandra/ha_cassandra.cc b/storage/cassandra/ha_cassandra.cc index 403d21f75f9..b24c0adb0fb 100644 --- a/storage/cassandra/ha_cassandra.cc +++ b/storage/cassandra/ha_cassandra.cc @@ -2041,6 +2041,12 @@ void ha_cassandra::start_bulk_insert(ha_rows rows, uint flags) int ha_cassandra::end_bulk_insert() { DBUG_ENTER("ha_cassandra::end_bulk_insert"); + + if (!doing_insert_batch) + { + /* SQL layer can make end_bulk_insert call without start_bulk_insert call */ + DBUG_RETURN(0); + } /* Flush out the insert buffer */ doing_insert_batch= false; |