Repository: cassandra Updated Branches: refs/heads/trunk 30812dd91 -> f9693d542
cqlsh: quote column names in COPY FROM inserts Patch by Tyler Hobbs; reviewed by Aleksey Yeschenko for CASSANDRA-9080 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/cb8cb5f9 Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/cb8cb5f9 Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/cb8cb5f9 Branch: refs/heads/trunk Commit: cb8cb5f99df2f9f162c206921210b1c9c871eeb1 Parents: 1c0a8d5 Author: Tyler Hobbs <[email protected]> Authored: Tue Apr 7 16:26:42 2015 -0500 Committer: Tyler Hobbs <[email protected]> Committed: Tue Apr 7 16:26:42 2015 -0500 ---------------------------------------------------------------------- CHANGES.txt | 1 + bin/cqlsh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb8cb5f9/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 1eca920..69f96ba 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 2.1.5 + * cqlsh: quote column names when needed in COPY FROM inserts (CASSANDRA-9080) * Add generate-idea-files target to build.xml (CASSANDRA-9123) * Do not load read meter for offline operations (CASSANDRA-9082) * cqlsh: Make CompositeType data readable (CASSANDRA-8919) http://git-wip-us.apache.org/repos/asf/cassandra/blob/cb8cb5f9/bin/cqlsh ---------------------------------------------------------------------- diff --git a/bin/cqlsh b/bin/cqlsh index a2ea41f..bd72a4a 100755 --- a/bin/cqlsh +++ b/bin/cqlsh @@ -1587,7 +1587,7 @@ class Shell(cmd.Cmd): query = 'INSERT INTO %s.%s (%s) VALUES (%%s)' % ( protect_name(ks), protect_name(cf), - ', '.join(columns)) + ', '.join(protect_names(columns))) # we need to handle some types specially should_escape = [t in ('ascii', 'text', 'timestamp', 'date', 'time', 'inet') for t in cqltypes]
