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

dblook garbles string literals in views, triggers and check constraints

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 10.10.1.1
    • None
    • Tools
    • None
    • Repro attached
    • Wrong query result

    Description

      dblooks replaces newlines with spaces in CHECK constraints, VIEWs and TRIGGERs. That is not the right thing to do if the newline is part of a string literal or an identifier. Look for callers of dblook.removeNewlines().

      For example, create a view like this:

      create view v as values 'Line #1
      Line #2
      Line #3';

      Then run dblook on the database, and you'll see the following:

      – ----------------------------------------------
      – DDL Statements for views
      – ----------------------------------------------

      SET SCHEMA "APP";
      create view v as values 'Line #1 Line #2 Line #3';

      Notice that the string literal has been transformed from three lines to a single line, so it's not an equivalent view.

      Attachments

        Activity

          People

            Unassigned Unassigned
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: