cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tyler Hobbs (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-2993) Issues with parameters being escaped correctly in Python CQL
Date Mon, 08 Aug 2011 19:50:26 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-2993?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tyler Hobbs updated CASSANDRA-2993:
-----------------------------------

    Attachment: 2993-system-test.txt
                2993-cql-grammar.txt
                2993-pycql.txt

I think this is primarily an issue with multiline string literals, both in the CQL grammar
and in the python driver.

2993-pycql.txt updates the python cql driver regex to handle multiline SELECT clauses.

2993-cql-grammar.txt makes the STRING_LITERAL token include '\r' and '\n'.

2993-system-test.txt adds a system test for multiline keys, names, and values.

> Issues with parameters being escaped correctly in Python CQL
> ------------------------------------------------------------
>
>                 Key: CASSANDRA-2993
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2993
>             Project: Cassandra
>          Issue Type: Bug
>         Environment: Python CQL
>            Reporter: Blake Visin
>            Assignee: Tyler Hobbs
>              Labels: CQL, parameter, python
>         Attachments: 2993-cql-grammar.txt, 2993-pycql.txt, 2993-system-test.txt
>
>
> When using parameterised queries in Python CQL strings are not being escaped correctly.
> Query and Parameters:
> {code}
> 'UPDATE sites SET :col = :val WHERE KEY = :site_id'
> {'col': 'feed_stats:1312493736688033024',
>  'site_id': '899d15e8-bd4a-11e0-bc8c-001fe14cba06',
>  'val': "(dp0\nS'1'\np1\n(lp2\nI1\naI2\naI3\naI4\nasS'0'\np3\n(lp4\nI1\naI2\naI3\naI4\nasS'3'\np5\n(lp6\nI1\naI2\naI3\naI4\nasS'2'\np7\n(lp8\nI1\naI2\naI3\naI4\nas."}
> {code}
> Query trying to be executed after processing parameters
> {code}     
> "UPDATE sites SET 'feed_stats:1312493736688033024' = '(dp0\nS''1''\np1\n(lp2\nI1\naI2\naI3\naI4\nasS''0''\np3\n(lp4\nI1\naI2\naI3\naI4\nasS''3''\np5\n(lp6\nI1\naI2\naI3\naI4\nasS''2''\np7\n(lp8\nI1\naI2\naI3\naI4\nas.'
WHERE KEY = '899d15e8-bd4a-11e0-bc8c-001fe14cba06'"
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message