Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-11231

SchemaBootstrap SQL Script execution cannot handle complex SQL statements

    Details

      Description

      The SchemaBootstrap class executes statements using the ";" (semicolon) character exclusively as a separator to determine when a statement is "complete" and then execute the statement buffer.

      This can be problematic when adding triggers, functions, stored procedures, etc., for applications with special needs, since the semicolon is usually an intrinsic part of the syntax that cannot be removed (in the manner that the SchemaBootstrap class removes it) without breaking the syntax.

      I would recommend the addition of two "controller" statements (like --INCLUDE or --ASSIGN) to allow the temporary (per-statement) definition of a separator, i.e. such as:

      --SET-DELIMETER: /
      create or replace ...
      sql with ;
      more ;
      blablabla ;
      end; /
      
      back-to-normal-sql;
      

      This would be equivalent to the "delimiter X" statement some SQL languages support, and would avoid having to employ a more complex SQL parser in order to support the execution of these complex statements.

        Attachments

          Issue Links

            Structure

              Activity

                People

                • Assignee:
                  closedbugs Closed Bugs (Inactive)
                  Reporter:
                  diego.rivera@armedia.com Diego Rivera (Inactive)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 4 hours Original Estimate - 4 hours
                    4h
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day
                    1d

                      Structure Helper Panel