[
https://issues.apache.org/jira/browse/CLOUDSTACK-10278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16420379#comment-16420379
]
ASF subversion and git services commented on CLOUDSTACK-10278:
--------------------------------------------------------------
Commit 7647e104b28a9fd0ee3dbdc7b2fa2db8bd29fb73 in cloudstack's branch
refs/heads/master from ernjvr
[ https://gitbox.apache.org/repos/asf?p=cloudstack.git;h=7647e10 ]
CLOUDSTACK-10278 idempotent column addition (#2449)
* CLOUDSTACK-10278 - WIP: need to test this script before create a pull request
* CLOUDSTACK-10278 - added more idempotent stored procs and moved all lines,
that end with a semicolon in existing proc, onto one line because
com/cloud/utils/db/ScriptRunner.java executes the sql as soon as it reads in
line with a semicolon delimeter at the end.
* CLOUDSTACK-10278 - changed more sql statements to call idempotent stored procs
* CLOUDSTACK-10278 - WIP: need to test this script before create a pull request
* CLOUDSTACK-10278 - added more idempotent stored procs and moved all lines,
that end with a semicolon in existing proc, onto one line because
com/cloud/utils/db/ScriptRunner.java executes the sql as soon as it reads in
line with a semicolon delimeter at the end.
* CLOUDSTACK-10278 - changed more sql statements to call idempotent stored procs
> Adding a SQL table column is not Idempotent
> -------------------------------------------
>
> Key: CLOUDSTACK-10278
> URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10278
> Project: CloudStack
> Issue Type: Bug
> Security Level: Public(Anyone can view this level - this is the
> default.)
> Components: Install and Setup
> Affects Versions: 4.10.0.0, 4.11.0.0
> Reporter: Ernie Janse van Rensburg
> Assignee: Ernie Janse van Rensburg
> Priority: Major
> Original Estimate: 4h
> Remaining Estimate: 4h
>
> The SQL code to add a new column to a table in the
> META-INF/db/schema-41000to41100.sql script is not written in an idempotent
> way. When the upgrade is re-run, the code above causes a SQL error as
> reported on the user mailing list:
> ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> Error executing: ALTER TABLE cloud.network_offerings ADD COLUMN for_vpc
> INT(1) NOT NULL DEFAULT 0
> This is a more generic problem for every version due to to the fact that it
> is not idempotent
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)