db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3043) 'Schema <schemaname> does not exist' when constraint used in table definition
Date Tue, 14 Oct 2008 01:49:44 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Bryan Pendleton updated DERBY-3043:
-----------------------------------

    Attachment: setSchemaName.diff

Thanks Dag, I agree with your analysis.

The fix that I've been considering is attached, as 'setSchemaName.diff'.

I still need to write regression tests, but the attached diff should show the
idea that I'm pursuing, which is to ensure that when CreateTableNode
goes to bind the check constraints, that it passes a FromList with a
FromBaseTable which has a fully-qualified table name: if the user specified
a schema name in the statement, as you observe, that schema name will
be used, while if the user did not specify a schema name, the new code
will fetch the schema name from the current schema descriptor and use that.

In my ad-hoc testing, it resolves the problem and does not appear to
introduce any new problems. I intend to write more tests and attach an
updated diff later, but any comments on the current patch proposal are most welcome.

> 'Schema <schemaname> does not exist' when constraint used in table definition
> -----------------------------------------------------------------------------
>
>                 Key: DERBY-3043
>                 URL: https://issues.apache.org/jira/browse/DERBY-3043
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.1.4
>         Environment: Mac OS 10
>            Reporter: geoff hendrey
>            Assignee: Bryan Pendleton
>         Attachments: setSchemaName.diff
>
>
> https://issues.apache.org/jira/browse/DERBY-568#action_12524420
> In the response to my original comment post, which you can find via the permalink above,
I was encouraged to file this as a new issue.
> verified this back to 10.1.2.1 with the following ij script.
> connect 'jdbc:derby:wombat;create=true;user=blogs';
> CREATE TABLE BLOGSCOM__BLOGS__USERS(PK INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY,username
VARCHAR(16) NOT NULL CONSTRAINT BLOGSCOM__BLOGS__USERS_UNIQUE_username UNIQUE CONSTRAINT BLOGSCOM__BLOGS__USERS_PASSWORD_username
CHECK(LENGTH(username)>7),password VARCHAR (32672) NOT NULL , PRIMARY KEY(PK));

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message