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

Prepared statements from default keyspace are broken

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 1.2.5
    • None
    • None
    • Windows 8 x64, java 1.7.0_11 x64

    • Normal

    Description

      Tested under CQL 3 binary protocol.
      Preparing a statement from the default keyspace of the connection (statement scoped with keyspace) and then running it will always throw the error "no keyspace has been specified".

      Exec: CREATE KEYSPACE Tests WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1}
      
      Exec: CREATE TABLE Tests.AllTypes (a int, b int, primary key (a))
      
      Prepare: insert into Tests.AllTypes (a, b) values (?, ?)
      

      Exec prepared statement and exception "no keyspace has been specified" is thrown.

      Doing a use Tests before preparing the statement solves the issue.
      This used to work in 1.2.3.

      Attachments

        1. 5468.txt
          0.8 kB
          Aleksey Yeschenko

        Activity

          People

            aleksey Aleksey Yeschenko
            pchalamet Pierre Chalamet
            Aleksey Yeschenko
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: