You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by al...@apache.org on 2019/07/10 13:50:35 UTC
[cassandra] branch trunk updated: Fix AlterTableStatement dropped
type validation order
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 <al...@apache.org>
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: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org