Derby
  1. Derby
  2. DERBY-5280

Large batch of DDL in a database procedure dies on a transaction severity error.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 10.8.1.2, 10.9.1.0
    • Fix Version/s: 10.8.2.2, 10.9.1.0
    • Component/s: SQL
    • Labels:
      None
    • Urgency:
      Normal
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      Regression

      Description

      The batch of DDL run by the procedure which registers database metadata functions now dies with the following error:

      ERROR 40XC0: Dead statement. This may be caused by catching a transaction severity error inside this statement.

      A process of binary search shows that this problem was introduced by revision 1086920 as part of the work on DERBY-5161.

      The bug can be reproduced by compiling the DBMDWrapper class attached to DERBY-3973 and then running the following script:

      connect 'jdbc:derby:memory:db;create=true';

      create procedure registerPublicStaticMethods( in connectionURL varchar( 200 ), in printSQL boolean )
      language java parameter style java modifies sql data
      external name 'DBMDWrapper.registerPublicStaticMethods';

      call registerPublicStaticMethods( 'jdbc:default:connection', false );

      If you change the second argument to registerPublicStaticMethods to true, then you will see all of the DDL being issued by the database procedure. The procedure runs fine in 10.7 but fails with this error in 10.8.

      1. junit-repro.diff
        2 kB
        Knut Anders Hatlen
      2. d5280.diff
        3 kB
        Knut Anders Hatlen

        Issue Links

          Activity

            People

            • Assignee:
              Knut Anders Hatlen
              Reporter:
              Rick Hillegas
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development