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

dblook garbles string literals in views, triggers and check constraints

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 10.10.1.1
    • Fix Version/s: None
    • Component/s: Tools
    • Labels:
      None
    • Issue & fix info:
      Repro attached
    • Bug behavior facts:
      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

            • Assignee:
              Unassigned
              Reporter:
              knutanders Knut Anders Hatlen
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: