Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 7.0.4 -> 8.0.0 fails with MySQL Syntax error #14003

Closed
jojomi opened this issue Feb 9, 2015 · 25 comments
Closed

Update 7.0.4 -> 8.0.0 fails with MySQL Syntax error #14003

jojomi opened this issue Feb 9, 2015 · 25 comments
Labels
Milestone

Comments

@jojomi
Copy link

jojomi commented Feb 9, 2015

I followed this idea to circumvent the update problems with the Debian package: #13992 (comment)

On running sudo -u www-data php /var/www/owncloud/occ upgrade I get:

An exception occurred while executing 'ALTER TABLE oc_appconfig_8x7jr6mhsg7k5 RENAME INDEX appconfig_config_key_index TO oc_6kz2t44isgfiv':

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INDEX appconfig_config_key_index TO oc_6kz2t44isgfiv' at line 1

The trailing numbers in the table name and the index name change on every new invocation and keep failing.
Can anyone give a hint what might have gone wrong here?

@DeepDiver1975
Copy link
Member

hmmm - where is that rename coming from?

Related to our migration testing? @icewind1991 please have a look - THX

@DeepDiver1975 DeepDiver1975 added this to the 8.0.1-next-maintenance milestone Feb 9, 2015
@DeepDiver1975
Copy link
Member

@jojomi in case you have a backup of your data (which you for sure have 🙊 ) - you coud try to skip the migration testing by appending the command line option --skip-migration-test

@jojomi
Copy link
Author

jojomi commented Feb 9, 2015

That command line option fixed it for me:

# sudo -u www-data php /var/www/owncloud/occ upgrade --skip-migration-test
Turned on maintenance mode
Updated database
Turned off maintenance mode
Update successful

Files are still there, so seem to be the other data. Fingers crossed!

Thank you :)

@trampi
Copy link

trampi commented Feb 9, 2015

@jojomi: you are using mariadb 10, right?

@DeepDiver1975: I already discussed this in irc. Doctrine dbal 2.5.0 wrongly assumes that mariadb10 supports mysql 5.7 features.

See:
doctrine/migrations#196
doctrine/dbal#742
https://github.com/doctrine/dbal/releases
#13071
#13303

@wallenium
Copy link

Same issue on my server, i am running mariaDB 10

@DeepDiver1975
Copy link
Member

we are working on integration of doctrine 2.5.1 for OC8.1 - we are running into some other issues there .... see #13537

@wallenium
Copy link

so we have to wait for 8.1? to skip the migration test does not seem to be the safe way for the data ;)

@trampi
Copy link

trampi commented Feb 9, 2015

@wallenium: backing up and trying with skip in a test environment? :-)

@VicDeo
Copy link
Member

VicDeo commented Feb 9, 2015

@wallenium it is safe in case you have a backup to revert to.

@wallenium
Copy link

Would be an option, but time intensive ;) Waiting seems to be the better solution, as there seems to be a couple of other bugs, too ;)

@jojomi
Copy link
Author

jojomi commented Feb 9, 2015

Yes, I am using MariaDB 10.

@DeepDiver1975
Copy link
Member

Would be an option, but time intensive ;) Waiting seems to be the better solution, as there seems to be a couple of other bugs, too ;)

8.1 is scheduled for May ... shipping 2.5.1 with 8.0.1 (delivery in March) is currently out of scope.

@DeepDiver1975
Copy link
Member

Would be an option, but time intensive ;)

Well - you know - backups are always recommended ... don't blame us if data got eaten 🙊

@wallenium
Copy link

I know. i have backups ;) i cloned the system and tried to upgrade, upgrade was successful, seems to work. Thanks for your help.

@deekayen
Copy link

deekayen commented Feb 9, 2015

I was able to bypass this table alter query error with the --skip-migration-test flag and am using MariaDB 10.0.16.

An exception occurred while executing 'ALTER TABLE oc_oc_appconfig_l3h0qk9vmxu2a RENAME INDEX appconfig_config_key_index TO oc_xd5q455qah20r': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INDEX appconfig_config_key_index TO oc_xd5q455qah20r' at line 1

@ghost
Copy link

ghost commented Feb 9, 2015

Anyone have an account at the forums and could post that there? I see tons of duplicate posts there about this issue. 🙊

@karlitschek
Copy link
Contributor

@DeepDiver1975 is it possible to add a check or a warning for 8.0.1 ?

@PVince81
Copy link
Contributor

Upgrading from 7.0.4 to 8.0.0~beta2 (and then later to 8.0.0 final) worked for me on my server with mariadb-5.5.33-2.2.x86_64 on openSUSE 13.1 x86_64

@merylen
Copy link

merylen commented Feb 10, 2015

--skip-migration-test did it for me

@DeepDiver1975
Copy link
Member

@DeepDiver1975 is it possible to add a check or a warning for 8.0.1 ?

Will have a look at this once we are sure we cannot ship dbal 2.5.1 for 8.0.1

@ghost
Copy link

ghost commented Feb 10, 2015

@PVince81

Upgrading from 7.0.4 to 8.0.0~beta2 (and then later to 8.0.0 final) worked for me on my server with mariadb-5.5.33-2.2.x86_64 on openSUSE 13.1 x86_64

The issue here only appears with MariaDB 10.x

@DeepDiver1975
Copy link
Member

Worst case we cherry-pick this patch - https://github.com/doctrine/dbal/pull/742/commits
... or ask users who run into this issue to apply this patch manually

@deg0nz
Copy link

deg0nz commented Feb 19, 2015

--skip-migration-test did it for me too (took a while, but it worked)

@jaakristioja
Copy link

Applying https://github.com/doctrine/dbal/pull/742/commits to 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php the trick for my ownCloud setup. Thanks! 👍

@LukasReschke
Copy link
Member

#14515 says it should fix this issue.

It would be awesome if people that experience this bug could test and verify the behaviour and report it back.

For now I'm closing the issue. Thanks for reporting issues back!

@lock lock bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests