This is an automated email from the ASF dual-hosted git repository.
aleksey pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/cassandra.git
The following commit(s) were added to refs/heads/trunk by this push:
new 08b2192 Fix AlterTableStatement dropped type validation order
08b2192 is described below
commit 08b2192da0eb6deddcd8f79cd180d069442223ae
Author: Aleksey Yeshchenko <[email protected]>
AuthorDate: Tue Jul 9 16:05:45 2019 +0100
Fix AlterTableStatement dropped type validation order
patch by Aleksey Yeschenko; reviewed by Sam Tunnicliffe for
CASSANDRA-15203
---
CHANGES.txt | 1 +
.../apache/cassandra/cql3/statements/schema/AlterTableStatement.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/CHANGES.txt b/CHANGES.txt
index e234df1..dfdc017 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -1,4 +1,5 @@
4.0
+ * Fix AlterTableStatement dropped type validation order (CASSANDRA-15203)
* Update Netty dependencies to latest, clean up SocketFactory
(CASSANDRA-15195)
* Native Transport - Apply noSpamLogger to ConnectionLimitHandler
(CASSANDRA-15167)
* Reduce heap pressure during compactions (CASSANDRA-14654)
diff --git
a/src/java/org/apache/cassandra/cql3/statements/schema/AlterTableStatement.java
b/src/java/org/apache/cassandra/cql3/statements/schema/AlterTableStatement.java
index c348cc4..6410e67 100644
---
a/src/java/org/apache/cassandra/cql3/statements/schema/AlterTableStatement.java
+++
b/src/java/org/apache/cassandra/cql3/statements/schema/AlterTableStatement.java
@@ -166,7 +166,7 @@ public abstract class AlterTableStatement extends
AlterSchemaStatement
{
// After #8099, not safe to re-add columns of incompatible
types - until *maybe* deser logic with dropped
// columns is pushed deeper down the line. The latter would
still be problematic in cases of schema races.
- if (!droppedColumn.type.isValueCompatibleWith(type))
+ if (!type.isValueCompatibleWith(droppedColumn.type))
{
throw ire("Cannot re-add previously dropped column '%s' of
type %s, incompatible with previous type %s",
name,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]