Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Do not write version into tblVersion on failure
#1
Hi,

I just updated my 3.3.10 installation to 3.4.0. During the update script an error (a table could not be created) occurred, so the installer brought me back to the start page.

After starting the installation again the installer said that the database is already up to date and the installation has been successfully completed.

In fact this was not the case due to the error occurred i mentioned above.

Is it possible to write the version information only on success?

Daniel
Reply
#2
(12-17-2012, 01:11 AM)Daniel Wrote: Hi,

I just updated my 3.3.10 installation to 3.4.0. During the update script an error (a table could not be created) occurred, so the installer brought me back to the start page.

After starting the installation again the installer said that the database is already up to date and the installation has been successfully completed.

In fact this was not the case due to the error occurred i mentioned above.

Is it possible to write the version information only on success?

Even if the version wasn't set, there will be a problem afterwards, depending on what causes the error. The database update script should not be run twice, because the sql statements cannot always run twice without causing errors. The database update script needs to be much smarter.

Uwe
Reply
#3
(12-17-2012, 01:41 PM)steinm Wrote:
(12-17-2012, 01:11 AM)Daniel Wrote: Hi,

I just updated my 3.3.10 installation to 3.4.0. During the update script an error (a table could not be created) occurred, so the installer brought me back to the start page.

After starting the installation again the installer said that the database is already up to date and the installation has been successfully completed.

In fact this was not the case due to the error occurred i mentioned above.

Is it possible to write the version information only on success?

Even if the version wasn't set, there will be a problem afterwards, depending on what causes the error. The database update script should not be run twice, because the sql statements cannot always run twice without causing errors. The database update script needs to be much smarter.

Uwe

Agree. I'm not sure if it is possible to stop the script on failure and remove the part already done so that this is not running twice.

Another way (but i'm also not sure if this works) may be flagging each table on success, so the script is able to see that this table was already updated.

Daniel
Reply
#4
(12-17-2012, 01:55 PM)Daniel Wrote:
(12-17-2012, 01:41 PM)steinm Wrote:
(12-17-2012, 01:11 AM)Daniel Wrote: Hi,

I just updated my 3.3.10 installation to 3.4.0. During the update script an error (a table could not be created) occurred, so the installer brought me back to the start page.

After starting the installation again the installer said that the database is already up to date and the installation has been successfully completed.

In fact this was not the case due to the error occurred i mentioned above.

Is it possible to write the version information only on success?

Even if the version wasn't set, there will be a problem afterwards, depending on what causes the error. The database update script should not be run twice, because the sql statements cannot always run twice without causing errors. The database update script needs to be much smarter.

Uwe

Agree. I'm not sure if it is possible to stop the script on failure and remove the part already done so that this is not running twice.

Another way (but i'm also not sure if this works) may be flagging each table on success, so the script is able to see that this table was already updated.
That might not be sufficient. Updates of a table may fail partially. So actually each sql statement must be flagged.

Uwe
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)