Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-10755

PreparedStatement is the same id for different Japanese katakana characters with same length

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 2.1.12, 2.2.4, 3.0.1
    • Component/s: Legacy/CQL
    • Environment:

      cassandra-2.1.8, java driver 2.1.5, ubuntu 14.04

    • Severity:
      Normal

      Description

      String q1 = "UPDATE table SET value='タニャア' WHERE key=? AND key2=?";
      String q2 = "UPDATE table SET value='ャアタニ' WHERE key=? AND key2=?";

      when using session.prepare().

      q1 and q2 will return the prepared-statement with the same prepared ID, but the query in prepared-statement is correct.

      So if I update using q1 first, all later q2 will not be able to update.( It's means , it still updates q1)

      Please note that the Japanese katakana is the same length in q1 and q2.
      I know it's a bad use case for putting value into prepared-query itself.

      Is it related to how Cassandra cache prepared statement?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                spod Stefan Podkowinski
                Reporter:
                jasonstack ZhaoYang
                Authors:
                Stefan Podkowinski
                Reviewers:
                Sylvain Lebresne
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: