Restore COPY ... TO STDOUT behavior in cqlsh

Patch by brandonwilliams; reviewed by adelapena for CASSANDRA-18353
This commit is contained in:
Brandon Williams 2023-03-21 16:07:49 -05:00
parent a6f8dd10cd
commit 70b95d8098
2 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,5 @@
4.1.2
* Fix COPY ... TO STDOUT behavior in cqlsh (CASSANDRA-18353)
* Remove six and Py2SaferScanner merge cruft (CASSANDRA-18354)

View File

@ -86,6 +86,11 @@ def printmsg(msg, eol='\n'):
sys.stdout.flush()
# Keep arguments in sync with printmsg
def swallowmsg(msg, eol='\n'):
None
class OneWayPipe(object):
"""
A one way pipe protected by two process level locks, one for reading and one for writing.
@ -249,7 +254,7 @@ class CopyTask(object):
DEBUG = True
# do not display messages when exporting to STDOUT unless --debug is set
self.printmsg = printmsg if self.fname is not None or direction == 'from' or DEBUG else None
self.printmsg = printmsg if self.fname is not None or direction == 'from' or DEBUG else swallowmsg
self.options = self.parse_options(opts, direction)
self.num_processes = self.options.copy['numprocesses']