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

Coversion from string to time/date/timestamp does not use the locale because context pushing does not happen for PreparedStatement.setXXX methods

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.1.2.1, 10.1.3.1, 10.2.1.6, 10.2.2.0
    • Fix Version/s: None
    • Component/s: JDBC
    • Urgency:
      Normal

      Description

      In the Derby implementation, the JDBC setXXX methods on PreparedStatement does not push/pop the context manager. This is to prevent the driver from getting performance hit. But some of the setXXX methods like, SQLTimestamp.setValue(String theValue), SQLTime.setValue(String theValue), SQLDate.setValue(String theValue) look at the context manager to find out the locale of the database so they can use that locale to do the appropriate conversion from string to date/time/timestamp. But since there is no context setup done for setXXX methods, locale information can't be established by these methods and they do not use the correct locale. This behavior has been around all Derby releases.

      More information on this can be found in following thread http://www.nabble.com/PreparedStatement.setXXX-methods-do-not-set-up-ContextStack.-Is-that-right-and-if-so%2C-why--tf3337937.html#a9283354

        Activity

        Hide
        rhillegas Rick Hillegas added a comment -

        Triaged for 10.5.2: assigned normal urgency.

        Show
        rhillegas Rick Hillegas added a comment - Triaged for 10.5.2: assigned normal urgency.
        Hide
        kmarsden Kathey Marsden added a comment -

        Marked normal urgency as that seemed to be the intent from the 10.5.2 triage comments.

        Show
        kmarsden Kathey Marsden added a comment - Marked normal urgency as that seemed to be the intent from the 10.5.2 triage comments.

          People

          • Assignee:
            Unassigned
            Reporter:
            mamtas Mamta A. Satoor
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development