Merge branch 'cassandra-3.0' into trunk

This commit is contained in:
Robert Stupp 2016-04-25 10:22:47 +02:00
commit db7d07cfa4
2 changed files with 10 additions and 8 deletions

View File

@ -76,6 +76,7 @@ Merged from 2.2:
* Make deprecated repair methods backward-compatible with previous notification service (CASSANDRA-11430)
* IncomingStreamingConnection version check message wrong (CASSANDRA-11462)
Merged from 2.1:
* cqlsh COPY FROM fails with []{} chars in UDT/tuple fields/values (CASSANDRA-11633)
* clqsh: COPY FROM throws TypeError with Cython extensions enabled (CASSANDRA-11574)
* cqlsh: COPY FROM ignores NULL values in conversion (CASSANDRA-11549)

View File

@ -1786,15 +1786,16 @@ class ImportConversion(object):
level = 0
quote = False
for i, c in enumerate(val):
if c == '{' or c == '[' or c == '(':
level += 1
elif c == '}' or c == ']' or c == ')':
level -= 1
elif c == '\'':
if c == '\'':
quote = not quote
elif c == sep and level == 1 and not quote:
ret.append(val[last:i])
last = i + 1
elif not quote:
if c == '{' or c == '[' or c == '(':
level += 1
elif c == '}' or c == ']' or c == ')':
level -= 1
elif c == sep and level == 1:
ret.append(val[last:i])
last = i + 1
else:
if last < len(val) - 1:
ret.append(val[last:-1])