Derby
  1. Derby
  2. DERBY-4110

When deleting rows from a table name with its synonym name, Derby throws SQLSTATE 42X04.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.4.1.3
    • Fix Version/s: 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Urgency:
      Normal

      Description

      Getting an error (using Derby 10.4.1.3) when deleting records from a table using a qualified synonymn name.
      Table Name is ABC_PROCESS_INVOCATION_XML and the synonmyn name is SYN_ABC_P_I_X

      The query being fired was
      "Delete from SYN_ABC_P_I_X where ID = ? "

      from the error log
      ---------------
      Caused by: ERROR 42X04: Column 'APP.ABC_PROCESS_INVOCATION_XML.ID' is either not in any table in the FROM list or appears within a join specification and is outside the scope of the join specification or appears in a HAVING clause and is not in the GROUP BY list. If this is a CREATE or ALTER TABLE statement then 'APP.ABC_PROCESS_INVOCATION_XML.ID' is not a column in the target table.
      ---------------

      After going thru few earlier bugs, a similar bug has been logged earlier bug DERBY-1784
      http://issues.apache.org/jira/browse/DERBY-1784

      But looks like the fix did not make its way to 10.4.1.3?

      1. repro.sql
        0.4 kB
        Bryan Pendleton
      2. patch.diff
        2 kB
        Bryan Pendleton

        Activity

        Lakshmi Prasanna created issue -
        Rick Hillegas made changes -
        Field Original Value New Value
        Urgency Urgent Normal
        Bryan Pendleton made changes -
        Assignee Bryan Pendleton [ bryanpendleton ]
        Bryan Pendleton made changes -
        Attachment repro.sql [ 12426125 ]
        Bryan Pendleton made changes -
        Attachment patch.diff [ 12428790 ]
        Bryan Pendleton made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 10.6.0.0 [ 12313727 ]
        Resolution Fixed [ 1 ]
        Knut Anders Hatlen made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Gavin made changes -
        Workflow jira [ 12457097 ] Default workflow, editable Closed status [ 12802731 ]

          People

          • Assignee:
            Bryan Pendleton
            Reporter:
            Lakshmi Prasanna
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development