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

Warn about unqualified prepared statement only if it is a select, update, delete, insert

    XMLWordPrintableJSON

Details

    • Code
    • Normal
    • Normal
    • Adhoc Test
    • All
    • None
    • Hide

      CI and manual cassandra-stress execution

      Show
      CI and manual cassandra-stress execution

    Description

      Hi, 

      We get the following warnings when we use prepared statements with "create keyspace ... " or "drop keyspace" statements.

      "

      USE <keyspace> with prepared statements is considered to be an anti-pattern due to ambiguity in non-qualified table names. Please consider removing instances of Session#setKeyspace(<keyspace>), Session#execute("USE <keyspace>") and cluster.newSession(<keyspace>) from your code, and always use fully qualified table names (e.g. <keyspace>.<table>). Keyspace used: null, statement keyspace: null, statement id: 8153d922390fdf9a9963bfeda85b2f3b at 

      "

      Such statements are already full-qualified. So, why are we getting this warning? 

      Regards
      Mohammad

      Attachments

        Issue Links

          Activity

            People

              smiklosovic Stefan Miklosovic
              Aburadeh Mohammad Aburadeh
              Stefan Miklosovic
              Benjamin Lerer
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m