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

Need invalid exception when submitting a prepared statement with too many markers

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.2.13, 2.0.4
    • None
    • None
    • [cqlsh 2.3.0 | Cassandra 1.2.4 | CQL spec 3.0.0 | Thrift protocol 19.35.0]

    Description

      Binary protocol uses a short value so this places a limit of 16K on the number of bound variable, would be nice to see an InvalidException at prepared time if statement contains more markers than supported (thank you to pcmanus pointing this out on IRC channel).

      Currently, no error is given until you try to execute the query and get the following (which is misleading because the bound # is much smaller than the limit):

      com.datastax.driver.core.exceptions.InvalidQueryException: there were 135000 markers in CQL but 3928 bound variables

      Attachments

        1. 5598-cassandra-2.0.patch
          0.8 kB
          Lyuben Todorov

        Activity

          People

            lyubent Lyuben Todorov
            annesull Anne Sullivan
            Lyuben Todorov
            Sylvain Lebresne
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: