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

JDBC connection should catch malformed URLs better

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Normal
    • Resolution: Duplicate
    • None
    • None
    • None

    Description

      Some problems with the current connection handing:

      • host-less URLs are assumed to be localhost, when this is more commonly the result of a malformed URL (exhibit A: the current JdbcDriverTest connection)
      • there is no standard syntax for user/password in the url; attempting to support this will result in more malformed URLs. most (all?) other JDBC drivers force you to use the user/pass or properties constructors instead.
      • finally, a malformed URL can result in a very confusing InvalidRequestException if you manage to end up with garbage in the "path" component (which becomes keyspace): we send USE X to the server and if there are non-alphanumeric characters there we will get back a cryptic antlr parse failure ("line 1:28 no viable alternative at character 'K'")

      Attachments

        1. 2859.txt
          5 kB
          Jonathan Ellis

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jbellis Jonathan Ellis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: