db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-3043) 'Schema <schemaname> does not exist' when constraint used in table definition
Date Wed, 29 Oct 2008 23:10:46 GMT

    [ https://issues.apache.org/jira/browse/DERBY-3043?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12643693#action_12643693
] 

Dag H. Wanvik commented on DERBY-3043:
--------------------------------------

Hi Bryan,

cf my comment above, regarding  DERBY-3266, which happened about the same time as your patch:
I noticed that your patch went in with the call to getSchemaDescriptor to the non-arg version
(code now moved to DDLStatementNode by Rick's patch to DERBY-481):
 
+        if (tableName.getSchemaName() == null)
+        { tableName.setSchemaName(getSchemaDescriptor().getSchemaName()); }

Other calls to getSchemaDescriptor inside createTableNode now use this variant:

		SchemaDescriptor sd = getSchemaDescriptor(
			tableType != TableDescriptor.GLOBAL_TEMPORARY_TABLE_TYPE,
			true);

Did you decide it's safe to use the non-arg version?


> '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
>             Fix For: 10.4.2.1, 10.5.0.0
>
>         Attachments: reorderWorkaroundTests.diff, setSchemaName.diff, withSimpleTest.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