core icon indicating copy to clipboard operation
core copied to clipboard

upgrade script ignores failing

Open felixboehm opened this issue 13 years ago • 5 comments

While testing some index setups for faster updates I made mistakes leading to an error during the update. But the upgrade script just ignored that there were errors and completed with "Update successful". After fixing the error I couldn't update anymore, as even the version number was changed to the new version.

The behavior should be: If an error is occurring during update, the update must be failing. The version number may not be updated until the update is successful. Best error handling: The update changes should be reverted, if possible.

Console output from the update

php upgrade.php Turned on maintenance mode Failed to update database structure (MDB2 Error: unknown error, _doQuery: [Error message: Could not execute statement] [Last executed query: CREATE INDEX properties_userid_path_name_index ON oc_properties (userid, propertypath, propertyname)] [Native code: 1071] [Native message: Specified key was too long; max key length is 1000 bytes] ) Turned off maintenance mode Update successful

System infos: debian, mysql Update from 5.0.9 to 5.0.11

felixboehm avatar Sep 26 '13 15:09 felixboehm

@karlitschek something to take care about for oc6 as well

DeepDiver1975 avatar Oct 16 '13 20:10 DeepDiver1975

@ringmaster Can you have a look here please?

karlitschek avatar Oct 17 '13 09:10 karlitschek

@ringmaster What do you think?

karlitschek avatar Oct 24 '13 10:10 karlitschek

Were the errors during update caused by changes made in the database that were done by a user? I'm not sure ownCloud should account for that expectation.

Otherwise, is the intent to allow the ownCloud upgrade to roll back if it fails to execute?

ringmaster avatar Oct 24 '13 12:10 ringmaster

I’m closing this issue because it has been inactive for a few months. This probably means that the issue is not reproducible or it has been fixed in a newer version.

Please reopen if you still encounter this issue with the latest stable version and then please use the issue template. You an also contribute directly by providing a patch – see the developer manual. :)

Thank you!

jancborchardt avatar Feb 26 '14 11:02 jancborchardt