View Issue Details

IDProjectCategoryView StatusLast Update
0000948SymmetricDSBugpublic2014-02-02 20:53
ReporterrottenAssigned Tochenson 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version3.1.11 
Target Version3.2.0Fixed in Version3.2.0 
Summary0000948: Fix upgrade to sym_trigger_hist to not blow away sequences
DescriptionWhen upgrading to 3.2.0 build 52 (from 2.5.13) (against Oracle) the DDL processes include dropping and then recreating the SYM_TRIGGER_RIGGER_HIST_ID sequence.

Unfortunately, because SYM_TRIGGER_HIST still has all of the old data in it, new triggers cause primary key constraints until the sequence is incremented past the previous maximum value.

If the sequence really has to be dropped and re-created, I suggest setting a start value larger than the max(TRIGGER_HIST_ID) value.

Either that or looping through nextval until the result returned is greater than max(TRIGGER_HIST_ID).

The problem is when you start up 3.2.0 for the first time, it drops all of the old triggers. Then it can't replace them. So you start losing data changes until you can get the sequence incremented and the triggers rebuilt.

A work around is after the DDL updates are applied, to increment the sequence manually before the first start up.

TagsNo tags attached.

Activities

rotten

2012-12-12 12:08

reporter   ~0000103

This is true for the sym_data sequence SEQ_SYM_DATA_DATA_ID as well.

No new data can be added to sym data until it is incremented past the max(data_id).

chenson

2012-12-16 12:31

administrator   ~0000113

Prepare for release

Related Changesets

SymmetricDS: master d72b6aa9

2012-12-13 10:13:03

chenson

Details Diff
0000948: Fix upgrade to sym_trigger_hist to not blow away sequences
Also commented out sym_file_sync for the 3.2 release prevented drops and create sequences from causing an upgrade to fail.

0000948
mod - symmetric-core/src/main/java/org/jumpmind/symmetric/db/AbstractSymmetricDialect.java Diff File
mod - symmetric-core/src/main/resources/symmetric-schema.xml Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/alter/ModelComparator.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDatabasePlatform.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/AbstractDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/firebird/FirebirdDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/interbase/InterbaseDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/oracle/OracleDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/postgresql/PostgreSqlDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/platform/sqlite/SqliteDdlBuilder.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/sql/ISqlResultsListener.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/sql/ISqlTemplate.java Diff File
mod - symmetric-db/src/main/java/org/jumpmind/db/sql/SqlScript.java Diff File
mod - symmetric-jdbc/src/main/java/org/jumpmind/db/sql/JdbcSqlTemplate.java Diff File

Issue History

Date Modified Username Field Change
2012-12-12 11:42 rotten New Issue
2012-12-12 12:08 rotten Note Added: 0000103
2012-12-13 10:11 chenson Fixed in Version => 3.2.0
2012-12-13 10:11 chenson Target Version => 3.2.0
2012-12-13 10:11 chenson Summary 3.2.0 build 52 upgrade breaks trigger_hist sequence => Fix upgrade to sym_trigger_hist to not blow away sequences
2012-12-13 10:13 chenson Status new => resolved
2012-12-13 10:13 chenson Resolution open => fixed
2012-12-13 10:13 chenson Assigned To => chenson
2012-12-16 12:31 chenson Note Added: 0000113
2012-12-16 12:31 chenson Status resolved => closed
2014-02-02 20:53 Changeset attached => SymmetricDS trunk r6670
2015-07-30 21:49 chenson Changeset attached => SymmetricDS master d72b6aa9