You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Tim Dudgeon <td...@informaticsmatters.com> on 2006/10/07 09:41:50 UTC

Re: [jira] Resolved: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality

I'm wanting to apply this patch (_v8_) to the 10.2.1.6 sources (the 
latest released version). But applying the patch to these sources fails.
What are my options?
Its important that I have a version that allows databases to be upgraded 
with future versions, so I was hoping to stick as closely to the 
released version as possible, and avoid the "this database can't be 
upgraded because it was created by a beta version of derby" problem.

Thanks

Tim


Bryan Pendleton (JIRA) wrote:
>      [ http://issues.apache.org/jira/browse/DERBY-1489?page=all ]
> 
> Bryan Pendleton resolved DERBY-1489.
> ------------------------------------
> 
>     Fix Version/s: 10.3.0.0
>        Resolution: Fixed
>        Derby Info:   (was: [Patch Available])
> 
> Thanks very much to all the reviewers, and particularly to Mamta who checked several versions of this patch.
> 
> I've committed the _v8_ version of the patch to subversion as revision 453420.
> 
> I'm marking this issue resolved; for now, we have an undocumented new feature which does not work with sqlAuthorization mode. I hope to find time soon to work on the two followon issues: DERBY-1909 to fix the sqlAuthorization problem, and DERBY-1926 to provide documentation.
> 
> 
>> Provide ALTER TABLE DROP COLUMN functionality
>> ---------------------------------------------
>>
>>                 Key: DERBY-1489
>>                 URL: http://issues.apache.org/jira/browse/DERBY-1489
>>             Project: Derby
>>          Issue Type: New Feature
>>          Components: Documentation, SQL
>>    Affects Versions: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.2.1.6, 10.1.2.1, 10.1.3.0, 10.1.3.1
>>            Reporter: Bryan Pendleton
>>         Assigned To: Bryan Pendleton
>>             Fix For: 10.3.0.0
>>
>>         Attachments: drop_column_v5_grant_tests.diff, drop_column_v6_grant_not_implemented.diff, drop_column_v7_suggestions_from_mamta.diff, drop_column_v8_restored_tests.diff, dropColumn_2.diff, dropColumn_v3_view_drop.diff, dropColumn_v4_grant_tests.diff
>>
>>
>> Provide a way to drop a column from an existing table. Possible syntax would be:
>>   ALTER TABLE tablename DROP COLUMN columnname CASCADE / RESTRICT;
>> Feature should properly handle columns which are used in constraints, views, triggers, indexes, etc.
> 


Re: [jira] Resolved: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality

Posted by Tim Dudgeon <td...@informaticsmatters.com>.
That could be it - I'm on Linux.
I'll try build from svn first.


Tim

Bryan Pendleton wrote:
>> I downloaded the 10.2.1.6 sources, and tried to apply the path to those.
>> patch -p0 < drop_column_v8_restored_tests.diff
> 
> That seems like a reasonable technique. I tried a similar, but not 
> identical,
> experiment: I took my 10.2 svn sandbox, and I ran patch -p0 <drop_...diff
> and it seemed to work fine, although I got a few "offset 10 lines" 
> messages.
> 
> I just tried some experiments with the sources from the download zip site
> http://db.apache.org/derby/releases/release-10.2.1.6.cgi
> and I think the problem may have to do with line-end characters.
> 
> Are you working on a Windows system or on a Unix system?
> 
> The files in the source release appear to have DOS line end characters and
> that seems to confuse the patch program.
> 
> Here's three suggestions:
> 1) Pull a svn client of the 10.2 branch and apply the patches to that. I've
> done it and I believe it works. Plus, that will make it easier for you to
> manage the patch process down the road with subsequent releases of the 
> 10.2 branch
> 2) If you're on a Unix system, try grabbing the sources and patching them
> on a Windows system. The line end characters may not be a problem then.
> 3) Use a tool to convert the line end characters of the files needing to be
> patched from DOS format to Unix format, then try applying the patch.
> 
> Meanwhile, I'll ask separately on the developer's list about line end 
> characters
> in the source distributions.
> 
> thanks,
> 
> bryan
> 
> 
> 
> 


Re: [jira] Resolved: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality

Posted by Bryan Pendleton <bp...@amberpoint.com>.
> I downloaded the 10.2.1.6 sources, and tried to apply the path to those. 
> 
> patch -p0 < drop_column_v8_restored_tests.diff

That seems like a reasonable technique. I tried a similar, but not identical,
experiment: I took my 10.2 svn sandbox, and I ran patch -p0 <drop_...diff
and it seemed to work fine, although I got a few "offset 10 lines" messages.

I just tried some experiments with the sources from the download zip site
http://db.apache.org/derby/releases/release-10.2.1.6.cgi
and I think the problem may have to do with line-end characters.

Are you working on a Windows system or on a Unix system?

The files in the source release appear to have DOS line end characters and
that seems to confuse the patch program.

Here's three suggestions:
1) Pull a svn client of the 10.2 branch and apply the patches to that. I've
done it and I believe it works. Plus, that will make it easier for you to
manage the patch process down the road with subsequent releases of the 10.2 branch
2) If you're on a Unix system, try grabbing the sources and patching them
on a Windows system. The line end characters may not be a problem then.
3) Use a tool to convert the line end characters of the files needing to be
patched from DOS format to Unix format, then try applying the patch.

Meanwhile, I'll ask separately on the developer's list about line end characters
in the source distributions.

thanks,

bryan




Re: [jira] Resolved: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality

Posted by Tim Dudgeon <td...@informaticsmatters.com>.
I downloaded the 10.2.1.6 sources, and tried to apply the path to those. 
e.g.

patch -p0 < drop_column_v8_restored_tests.diff


I'm no expert here, so am probably doing it all wrong :-(

Tim


Bryan Pendleton wrote:
> Tim Dudgeon wrote:
>> I'm wanting to apply this patch (_v8_) to the 10.2.1.6 sources (the 
>> latest released version). But applying the patch to these sources fails.
> 
> Hi Tim,
> 
> I'm not sure what process you used to apply the patch to your sources.
> Did you follow the scheme outlined in
> http://wiki.apache.org/db-derby/MoveAChangeBetweenBranches
> 
> In this case, I think the command to use is:
> 
> svn merge -r 453419:453420 
> https://svn.apache.org/repos/asf/db/derby/code/trunk/
> 
> I just tried this, and the patch appeared to merge back to the 10.2 
> codeline
> without complaint and the resulting build was clean (I didn't run any 
> tests,
> just verified that I could build the code and the svn diff looked 
> reasonable).
> 
> Note that you issue this command with your current directory set to your
> 10.2 sandbox.
> 
> Hope this helps, and please let us know your experiences with the 
> modified code!
> 
> thanks,
> 
> bryan
> 
> 


Re: [jira] Resolved: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality

Posted by Bryan Pendleton <bp...@amberpoint.com>.
Tim Dudgeon wrote:
> I'm wanting to apply this patch (_v8_) to the 10.2.1.6 sources (the 
> latest released version). But applying the patch to these sources fails.

Hi Tim,

I'm not sure what process you used to apply the patch to your sources.
Did you follow the scheme outlined in
http://wiki.apache.org/db-derby/MoveAChangeBetweenBranches

In this case, I think the command to use is:

svn merge -r 453419:453420 https://svn.apache.org/repos/asf/db/derby/code/trunk/

I just tried this, and the patch appeared to merge back to the 10.2 codeline
without complaint and the resulting build was clean (I didn't run any tests,
just verified that I could build the code and the svn diff looked reasonable).

Note that you issue this command with your current directory set to your
10.2 sandbox.

Hope this helps, and please let us know your experiences with the modified code!

thanks,

bryan