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

Valid statements rejected if Derby has not implicitly created the current user's schema.

    XMLWordPrintableJSON

Details

    • Normal
    • Repro attached
    • Seen in production

    Description

      There are many examples of statements failing because Derby has not implicitly created the schema associated with the current user. You don't see this if the schema is the default APP schema. But if the user is anyone other than APP, then various statements can fail. Maybe we should implicitly create a schema even if the user isn't APP. Right now, you get an error like this:

      ERROR 42Y07: Schema 'ROOT' does not exist

      The following script shows an example of this problem:

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

      create table licreq( domain varchar( 10 ) );

      connect 'jdbc:derby:memory:db;user=root';

      – fails
      ALTER TABLE esq.licreq ADD COLUMN u_domain GENERATED ALWAYS AS (UPPER(domain));

      connect 'jdbc:derby:memory:db;user=app';

      – succeeds
      ALTER TABLE esq.licreq ADD COLUMN u_domain GENERATED ALWAYS AS (UPPER(domain));

      Attachments

        1. derby-6361-01-aa-createDefaultSchema.diff
          2 kB
          Richard N. Hillegas
        2. d6361-ignore-missing-schema.diff
          5 kB
          Knut Anders Hatlen

        Issue Links

          Activity

            People

              rhillegas Richard N. Hillegas
              rhillegas Richard N. Hillegas
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: