You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by be...@apache.org on 2022/06/14 05:02:45 UTC

[cassandra] branch cassandra-4.0 updated (2531dd1eba -> bb5b2d2889)

This is an automated email from the ASF dual-hosted git repository.

bereng pushed a change to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git


    from 2531dd1eba remove ssl storage port from sstableloader
     new f884dda75b CQLSH unicode control character list is too liberal
     new bb5b2d2889 Merge branch 'cassandra-3.11' into cassandra-4.0

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 pylib/cqlshlib/formatting.py        | 4 ++--
 pylib/cqlshlib/test/test_unicode.py | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


[cassandra] 01/01: Merge branch 'cassandra-3.11' into cassandra-4.0

Posted by be...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

bereng pushed a commit to branch cassandra-4.0
in repository https://gitbox.apache.org/repos/asf/cassandra.git

commit bb5b2d28896328df5996cb0fc870b012315f0e80
Merge: 2531dd1eba f884dda75b
Author: Bereng <be...@gmail.com>
AuthorDate: Tue Jun 14 06:58:30 2022 +0200

    Merge branch 'cassandra-3.11' into cassandra-4.0

 pylib/cqlshlib/formatting.py        | 4 ++--
 pylib/cqlshlib/test/test_unicode.py | 4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --cc pylib/cqlshlib/test/test_unicode.py
index 836c2d9b8b,0000000000..9fc052f58a
mode 100644,000000..100644
--- a/pylib/cqlshlib/test/test_unicode.py
+++ b/pylib/cqlshlib/test/test_unicode.py
@@@ -1,75 -1,0 +1,79 @@@
 +# coding=utf-8
 +# Licensed to the Apache Software Foundation (ASF) under one
 +# or more contributor license agreements.  See the NOTICE file
 +# distributed with this work for additional information
 +# regarding copyright ownership.  The ASF licenses this file
 +# to you under the Apache License, Version 2.0 (the
 +# "License"); you may not use this file except in compliance
 +# with the License.  You may obtain a copy of the License at
 +#
 +#     http://www.apache.org/licenses/LICENSE-2.0
 +#
 +# Unless required by applicable law or agreed to in writing, software
 +# distributed under the License is distributed on an "AS IS" BASIS,
 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 +# See the License for the specific language governing permissions and
 +# limitations under the License.
 +
 +from __future__ import unicode_literals, with_statement
 +
 +import os
 +import subprocess
 +
 +from .basecase import BaseTestCase
 +from .cassconnect import (get_cassandra_connection, create_keyspace, testrun_cqlsh)
++from cqlshlib.formatting import unicode_controlchars_re
 +
 +
 +class TestCqlshUnicode(BaseTestCase):
 +
 +    @classmethod
 +    def setUpClass(cls):
 +        s = get_cassandra_connection().connect()
 +        s.default_timeout = 60.0
 +        create_keyspace(s)
 +        s.execute('CREATE TABLE t (k int PRIMARY KEY, v text)')
 +
 +        env = os.environ.copy()
 +        env['LC_CTYPE'] = 'UTF-8'
 +        cls.default_env = env
 +
 +    def test_unicode_value_round_trip(self):
 +        with testrun_cqlsh(tty=True, env=self.default_env) as c:
 +            value = 'ϑΉӁװڜ'
 +            c.cmd_and_response("INSERT INTO t(k, v) VALUES (1, '%s');" % (value,))
 +            output = c.cmd_and_response('SELECT * FROM t;')
 +            self.assertIn(value, output)
 +
 +    def test_unicode_identifier(self):
 +        col_name = 'テスト'
 +        with testrun_cqlsh(tty=True, env=self.default_env) as c:
 +            c.cmd_and_response('ALTER TABLE t ADD "%s" int;' % (col_name,))
 +            # describe command reproduces name
 +            output = c.cmd_and_response('DESC t')
 +            self.assertIn('"%s" int' % (col_name,), output)
 +            c.cmd_and_response("INSERT INTO t(k, v) VALUES (1, '値');")
 +            # results header reproduces name
 +            output = c.cmd_and_response('SELECT * FROM t;')
 +            self.assertIn(col_name, output)
 +
 +    def test_unicode_multiline_input(self):  # CASSANDRA-16400
 +        with testrun_cqlsh(tty=True, env=self.default_env) as c:
 +            value = '値'
 +            c.send("INSERT INTO t(k, v) VALUES (1, \n'%s');\n" % (value,))
 +            c.read_to_next_prompt()
 +            output = c.cmd_and_response('SELECT v FROM t;')
 +            self.assertIn(value, output)
 +
 +    def test_unicode_desc(self):  # CASSANDRA-16539
 +        with testrun_cqlsh(tty=True, env=self.default_env) as c:
 +            v1 = 'ࠑ'
 +            v2 = 'Ξ'
 +            output = c.cmd_and_response('CREATE TYPE "%s" ( "%s" int );' % (v1, v2))
 +            output = c.cmd_and_response('DESC TYPES;')
 +            self.assertIn(v1, output)
 +            output = c.cmd_and_response('DESC TYPE "%s";' %(v1,))
 +            self.assertIn(v2, output)
++
++    def test_unicode_esc(self):  # CASSANDRA-17617
++        self.assertFalse(unicode_controlchars_re.match("01"))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org