[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Abhishek Gupta updated CASSANDRA-8638: -- Attachment: 0002-bug-CASSANDRA-8638.patch Please review and use this patch 0002-bug-CASSANDRA-8638.patch As discussed earlier. CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: Tools Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial Labels: cqlsh, lhf Fix For: 2.1.3 Attachments: 0001-bug-CASSANDRA-8638.patch, 0002-bug-CASSANDRA-8638.patch I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Abhishek Gupta updated CASSANDRA-8638: -- Attachment: 0001-bug-CASSANDRA-8638.patch Patch for the fix CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: Tools Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial Labels: cqlsh, lhf Fix For: 2.1.3 Attachments: 0001-bug-CASSANDRA-8638.patch I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-8638: --- Reviewer: Philip Thompson (was: Sotirios Delimanolis) I don't think we need to respect the usage of a BOM as a possible word joiner, as that was deprecated in Unicode 3.2, the current version of Unicode is 7.0. I do think this patch should include the BOM for UTF-16 LE in addition to UTF-16 BE. Running multiple string.replace() calls feels inefficient. [~thobbs], what do you think? CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: Tools Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial Labels: cqlsh, lhf Fix For: 2.1.3 Attachments: 0001-bug-CASSANDRA-8638.patch I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-8638: --- Reviewer: Tyler Hobbs (was: Philip Thompson) CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: Tools Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial Labels: cqlsh, lhf Fix For: 2.1.3 Attachments: 0001-bug-CASSANDRA-8638.patch I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sotirios Delimanolis updated CASSANDRA-8638: Description: I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. (The C# driver also failed when executing the content of the script {noformat} var session = cluster.Connect (); string script = File.ReadAllText (schemaLocation); session.Execute (script); {noformat} but this can be avoided by ignoring the BOM application-side.) was: I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: API, Drivers (now out of tree) Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. (The C# driver also failed when executing the content of the script {noformat} var session = cluster.Connect (); string script = File.ReadAllText (schemaLocation); session.Execute (script); {noformat} but this can be avoided by ignoring the BOM application-side.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-8638: - Labels: cqlsh lhf (was: lhf) CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: API, Drivers (now out of tree) Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial Labels: cqlsh, lhf I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. (The C# driver also failed when executing the content of the script {noformat} var session = cluster.Connect (); string script = File.ReadAllText (schemaLocation); session.Execute (script); {noformat} but this can be avoided by ignoring the BOM application-side.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Aleksey Yeschenko updated CASSANDRA-8638: - Labels: lhf (was: ) CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: API, Drivers (now out of tree) Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial Labels: cqlsh, lhf I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. (The C# driver also failed when executing the content of the script {noformat} var session = cluster.Connect (); string script = File.ReadAllText (schemaLocation); session.Execute (script); {noformat} but this can be avoided by ignoring the BOM application-side.) -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sotirios Delimanolis updated CASSANDRA-8638: Description: I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. was: I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. (The C# driver also failed when executing the content of the script {noformat} var session = cluster.Connect (); string script = File.ReadAllText (schemaLocation); session.Execute (script); {noformat} but this can be avoided by ignoring the BOM application-side.) CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: API, Drivers (now out of tree) Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial Labels: cqlsh, lhf I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Updated] (CASSANDRA-8638) CQLSH -f option should ignore BOM in files
[ https://issues.apache.org/jira/browse/CASSANDRA-8638?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Philip Thompson updated CASSANDRA-8638: --- Component/s: (was: Drivers (now out of tree)) (was: API) Tools Fix Version/s: 2.1.3 CQLSH -f option should ignore BOM in files -- Key: CASSANDRA-8638 URL: https://issues.apache.org/jira/browse/CASSANDRA-8638 Project: Cassandra Issue Type: Improvement Components: Tools Environment: Red Hat linux Reporter: Sotirios Delimanolis Priority: Trivial Labels: cqlsh, lhf Fix For: 2.1.3 I fell in byte order mark trap trying to execute a CQL script through CQLSH. The file contained the simple (plus BOM) {noformat} CREATE KEYSPACE IF NOT EXISTS xobni WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; -- and another CREATE TABLE bucket_flags query {noformat} I executed the script {noformat} [~]$ cqlsh --file /home/selimanolis/Schema/patches/setup.cql /home/selimanolis/Schema/patches/setup.cql:2:Invalid syntax at char 1 /home/selimanolis/Schema/patches/setup.cql:2: CREATE KEYSPACE IF NOT EXISTS test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'} AND durable_writes = true; /home/selimanolis/Schema/patches/setup.cql:2: ^ /home/selimanolis/Schema/patches/setup.cql:22:ConfigurationException: ErrorMessage code=2300 [Query invalid because of configuration issue] message=Cannot add column family 'bucket_flags' to non existing keyspace 'test'. {noformat} I realized much later that the file had a BOM which was seemingly screwing with how CQLSH parsed the file. It would be nice to have CQLSH ignore the BOM when processing files. -- This message was sent by Atlassian JIRA (v6.3.4#6332)