On importing the mysql schema from https://cgit.kde.org/ocs-apiserver.git/tree/scripts/sql/init_schema.sql umbrello does not finish the import and stays in an endless loop on a 'COMMENT' token in SQLImport::parseColumnConstraints().
Git commit 67d006cab83ff53aa3088ada99df0c1ed5b24c79 by Ralf Habacker. Committed on 19/11/2018 at 22:45:18 Pushed by habacker into branch 'Applications/18.12'. Fix 'Endless loop on importing mysql schema' FIXED-IN:2.26.90 (KDE Applications 18.11.90) M +1 -1 umbrello/codeimport/sqlimport.cpp https://commits.kde.org/umbrello/67d006cab83ff53aa3088ada99df0c1ed5b24c79
(In reply to Ralf Habacker from comment #1) > Git commit 67d006cab83ff53aa3088ada99df0c1ed5b24c79 by Ralf Habacker. > [...] > M +1 -1 umbrello/codeimport/sqlimport.cpp > > https://commits.kde.org/umbrello/67d006cab83ff53aa3088ada99df0c1ed5b24c79 Hi Ralf, @@ -313,7 +313,7 @@ SQLImport::ColumnConstraints SQLImport::parseColumnConstraints(QString &token) ColumnConstraints constraints; int index = m_srcIndex; - while(token != QLatin1String(",") && token != QLatin1String(")")) { + while(token != QLatin1String(",") && token != QLatin1String(")") && token.toLower() != QLatin1String("COMMENT")) { Shouldn't that be token.toUpper() ?
I am preparing a merge request to address this.
(In reply to Oliver Kellogg from comment #3) > I am preparing a merge request to address this. Should this go to master or release/19.12 ?
release/19.12 please, so that this fix can be included in the next version 2.30.2.
See https://invent.kde.org/kde/umbrello/merge_requests/2 Okay to merge?
Git commit cd594e1bc3db4e5272ce8712de6ba98398c2f21a by Oliver Kellogg. Committed on 10/01/2020 at 14:52. Pushed by okellogg into branch 'release/19.12'. Fix endless loop on importing mysql schema: umbrello/codeimport/sqlimport.cpp - Replace variable `index' by constant `origIndex' located inside the while-loop. - In loop condition replace QLatin1String("COMMENT") by QLatin1String("comment"). - After end of while-loop, if token contains COMMENT then advance until it contains "," or ")". FIXED-IN:2.30.2 (KDE Applications 19.12.2) M +13 -7 umbrello/codeimport/sqlimport.cpp https://invent.kde.org/kde/umbrello/commit/cd594e1bc3db4e5272ce8712de6ba98398c2f21a