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

Migration sanity check on db fails on MySQL 8 #639

Closed
Wolverine80 opened this issue Nov 13, 2020 · 7 comments
Closed

Migration sanity check on db fails on MySQL 8 #639

Wolverine80 opened this issue Nov 13, 2020 · 7 comments
Assignees
Labels
bug Something isn't working as intended
Milestone

Comments

@Wolverine80
Copy link

Migrationskript auf OTOBO 10 ist ein separates issue

Originally posted by @bschmalhofer in #6 (comment)

Ist das problem eigentlich behoben? Ich versuche gerade meine OTRS6 unter Ubuntu 20.04 (mit mysql8) zu migrieren und sehe im Log dass die Migration versucht die groups Tabelle ohne Escape zu lesen und bricht dann natürlich ab.

@bschmalhofer bschmalhofer self-assigned this Nov 14, 2020
@bschmalhofer bschmalhofer added the bug Something isn't working as intended label Nov 14, 2020
@bschmalhofer bschmalhofer added this to the OTOBO 10.0.7 milestone Nov 14, 2020
@bschmalhofer
Copy link
Contributor

Hallo @Wolverine80,

die Lösung für #6 war dass in OTOBO 10.0.x die Tabelle groups nach groups_table umbenannt wurde. Diese Umbenennung ist auch ein Teil der Migrationsroutinen. Die Migration geht aber immer noch davon aus das für die Abfragen in der Quell-Datenbank kein Quoting notwendig ist. Demzufolgen gibt es wohl einen Fehler bei der Migration von OTRS 6 unter MySQL 8. Ich baue aber für OTOBO 10.0.7 noch das Quoting ein. Das wäre ja sowieso best practice.

Eine Frage noch zum Qellsystem. Dort läuft ja OTRS 6 unter MySQL 8. Ich vermute daher dass da für die groups-Tabelle Anpassungen notwendig waren. Waren diese Anpassungen bereits in OTRS 6 enthalten, oder waren das kundenspezifische Anpassungen?

Viele Grüße,
Bernhard Schmalhofer

@Wolverine80
Copy link
Author

Wolverine80 commented Nov 16, 2020

Hi,

interessanterweise trat das Problem bisher nicht auf. Die betroffenen Dateien sind nicht gepatcht. Fehler gab es erst beim Versuch zu migrieren auf Otobo.
Vielleicht bisher Glück gehabt da wir keine CustomerGroups nutzen und sonst nicht viel i der Tabelle gelesen oder geschrieben wird.

@Wolverine80
Copy link
Author

Bisher wohl wirklich Glück gehabt. Gab zwar einige Fehlermeldungen laut dem Log, aber keine großen Auswirkungen bei der Benutzung. Habe die betroffenen Dateien von Hand korrigiert und hoffe bald auf Otobo umsteigen zu können.

@bschmalhofer
Copy link
Contributor

bschmalhofer commented Nov 16, 2020

Implemented quoting of the source table names during migration.
Added the method Kernel::Systerm::DB::QuoteIdentifier() for that purpose.
TODO:

  • Test OTRS with MySQL < 8 to OTOBO with MariaDB 10
  • Test OTRS with MySQL 8 to OTOBO with MariaDB 10

@bschmalhofer bschmalhofer changed the title Migration sanatiy check on db fails on mysql8 Migration sanitiy check on db fails on mysql8 Nov 18, 2020
bschmalhofer added a commit that referenced this issue Nov 18, 2020
give a better progress indication
bschmalhofer added a commit that referenced this issue Nov 18, 2020
bschmalhofer added a commit that referenced this issue Nov 18, 2020
Issue #639: MySQL quotes with backticks, not single quotes
@bschmalhofer
Copy link
Contributor

@Wolverine80 , I have added the quoting of the source tables to OTOBO 10.0.7. I have tested it with a migration from OTRS 6 on MySQL 8 to OTOBO on MariaDB 10. For that test case I didn't bother to make OTRS 6 actually work on MySQL 8.

I think before the release on OTOBO 10.0.7 we will test a couple more migration scenarios. But in the meantime you could grab the devel version of OTOBO and test whether the fix works for you.

@bschmalhofer bschmalhofer changed the title Migration sanitiy check on db fails on mysql8 Migration sanity check on db fails on MySQL 8 Nov 18, 2020
@Wolverine80
Copy link
Author

Looks good now with the changes. A test migration was successful.

@StefanRother-OTOBO
Copy link
Contributor

Hi Wolverine80,

thanks very much for your help!

We release OTOBO 10.0.7 next week.

Have a nice day!

Stefan
Team OTOBO

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

3 participants