Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3438

Allow SQL query text to be null in StatementKey

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 10.4.1.3
    • 10.4.1.3
    • JDBC, Network Client
    • None

    Description

      Because the SQL isn't checked before the cache is queried, StatementKey should allow the SQL query text to be null.
      This simplifies handling this exceptional situations, hopefully without complications.
      What will happen is, the cache is queried, null is returned (no match) and then prepare will fail in the driver. Because the statement is never prepared, it will never be inserted into the cached, nor (incorrectly) fetched from the cache in the first step.

      Of course, one could also explicitly check for null in either the Logical(Prepared|Callable)Statement[40], StatementKeyFactory or StatementCacheInteractor.
      However, the proposed change is small, isolated to one class and makes the exceptional case be handled by the normal code path.

      Attachments

        1. derby-3438-1a-allow_sql_null.diff
          2 kB
          Kristian Waagan

        Issue Links

          Activity

            People

              kristwaa Kristian Waagan
              kristwaa Kristian Waagan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: