Backported CASSANDRA-5818 to cassandra-2.0

patch by Lyuben Todorov; reviewed by Mikhail Stepura
Merge branch 'cassandra-2.0' into cassandra-2.1