UpdateSchemaFromV7ToV8 fails

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
I was happy to notice that KDE Neon had upgraded the Digikam to the
latest 5.1 version from previous 4.x.

I have my picture collection on nfs share, and metadata is stored on
MySql server. However, the schema upgrade didn't succeed. This is the
debug data that is printed to the console:

mkujanpa@earth:~$ digikam
digikam.general: AlbumWatch use QFileSystemWatcher
QFileSystemWatcher::removePaths: list is empty
digikam.general: Database Parameters:
    Type:                     "QMYSQL"
    DB Core Name:             "digikamdb"
    DB Thumbs Name:           "digikamthumbdb"
    DB Face Name:             "digikamfacedb"
    Connect Options:          ""
    Host Name:                "neptunus"
    Host port:                3306
    Internal Server:          false
    Internal Server Path:     ""
    Internal Server Serv Cmd: ""
    Internal Server Init Cmd: ""
    Username:                 "digikam"
    Password:                 "XXXXXXXXX"

digikam.dbengine: Loading SQL code from config file
"/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
  ""
Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
key was too long; max key length is 767 bytes" 1071 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [
"UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n            
                            ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
(albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
CASCADE,\n                                        ADD UNIQUE (albumRoot,
relativePath(255)),\n                                        ENGINE
InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

I didn't have any table for faces before, so I added the name
"digikamfacedb" on initial parameter dialog. The localized error message
is translated about as "QMYSQL: Failed to execute the query".

Do you have any tips how I could proceed? I'm happy to test any
modifications to /usr/share/digikam/database/dbconfig.xml if you have
any suggestions what could be wrong there (or on my db).

--
Mikki


Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
Mikael Kujanpää kirjoitti 27.08.2016 12:09:
> I was happy to notice that KDE Neon had upgraded the Digikam to the
> latest 5.1 version from previous 4.x.
>
> I have my picture collection on nfs share, and metadata is stored on
> MySql server. However, the schema upgrade didn't succeed.
[...]

Any ideas on this? If I'm asking on wrong place, please guide me where
this issue should be discussed. Or do you want that I simply create new
bug of it?

--
Mikki


Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Gilles Caulier-4
See this file which have been typically fixed with 5.1.0 : https://bugs.kde.org/show_bug.cgi?id=366445

Gilles Caulier

2016-08-28 23:06 GMT+02:00 Mikael Kujanpää <[hidden email]>:
Mikael Kujanpää kirjoitti 27.08.2016 12:09:
I was happy to notice that KDE Neon had upgraded the Digikam to the
latest 5.1 version from previous 4.x.

I have my picture collection on nfs share, and metadata is stored on
MySql server. However, the schema upgrade didn't succeed.
[...]

Any ideas on this? If I'm asking on wrong place, please guide me where this issue should be discussed. Or do you want that I simply create new bug of it?

--
Mikki



Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
Gilles Caulier kirjoitti 29.08.2016 00:39:
> See this file which have been typically fixed with 5.1.0 :
> https://bugs.kde.org/show_bug.cgi?id=366445 [1]

Thank you lot for your suggestion. I was under impression that those
changes were already included to the version 5.1.0, but apparently they
weren't. However, those modifications didn't make any difference. I
replaced my /usr/share/digikam/database/dbconfig.xml with the attached
version and this is what I got when running digikam executable:

"Specified key was too long; max key length is 767 bytes" 1071 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [
"UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n\t\t    ADD
CONSTRAINT Albums_AlbumRoots FOREIGN KEY (albumRoot) REFERENCES
AlbumRoots (id) ON DELETE CASCADE ON UPDATE CASCADE,\n\t\t    ADD UNIQUE
(albumRoot, relativePath(255)),\n\t\t    ENGINE InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

What I googled about "Specified key was too long" error, it has
something to do with UTF-8 collated database fields. Could this kind of
error happen because I have some entries with long filepaths (although
even the longest should be only about ~50 chars total), or is this
purely related to the db schema? But I guess this is db content related,
because otherwise this issue should happen to everyone upgrading their
MySql db.

--
Mikki
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Maik Qualmann-2
Please can you try this attached dbconfig.xml file?

Maik

On Montag, 29. August 2016 21:08:20 CEST Mikael Kujanpää wrote:

> Gilles Caulier kirjoitti 29.08.2016 00:39:
> > See this file which have been typically fixed with 5.1.0 :
> > https://bugs.kde.org/show_bug.cgi?id=366445 [1]
>
> Thank you lot for your suggestion. I was under impression that those
> changes were already included to the version 5.1.0, but apparently they
> weren't. However, those modifications didn't make any difference. I
> replaced my /usr/share/digikam/database/dbconfig.xml with the attached
> version and this is what I got when running digikam executable:
>
> "Specified key was too long; max key length is 767 bytes" 1071 2
> Bound values:  ()
> digikam.dbengine: Error while executing DBAction [
> "UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n\t\t    ADD
> CONSTRAINT Albums_AlbumRoots FOREIGN KEY (albumRoot) REFERENCES
> AlbumRoots (id) ON DELETE CASCADE ON UPDATE CASCADE,\n\t\t    ADD UNIQUE
> (albumRoot, relativePath(255)),\n\t\t    ENGINE InnoDB;" ]
> digikam.coredb: Core database: schema update to V 8 failed!
> digikam.coredb: Core database: cannot process schema initialization
>
> What I googled about "Specified key was too long" error, it has
> something to do with UTF-8 collated database fields. Could this kind of
> error happen because I have some entries with long filepaths (although
> even the longest should be only about ~50 chars total), or is this
> purely related to the db schema? But I guess this is db content related,
> because otherwise this issue should happen to everyone upgrading their
> MySql db.

--
Gruß Maik

dbconfig.xml (126K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Maik Qualmann
In reply to this post by Mikael Kujanpää
Please can you try this attached dbconfig.xml file?

Maik

On Montag, 29. August 2016 21:08:20 CEST Mikael Kujanpää wrote:

> Gilles Caulier kirjoitti 29.08.2016 00:39:
> > See this file which have been typically fixed with 5.1.0 :
> > https://bugs.kde.org/show_bug.cgi?id=366445 [1]
>
> Thank you lot for your suggestion. I was under impression that those
> changes were already included to the version 5.1.0, but apparently they
> weren't. However, those modifications didn't make any difference. I
> replaced my /usr/share/digikam/database/dbconfig.xml with the attached
> version and this is what I got when running digikam executable:
>
> "Specified key was too long; max key length is 767 bytes" 1071 2
> Bound values:  ()
> digikam.dbengine: Error while executing DBAction [
> "UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n\t\t    ADD
> CONSTRAINT Albums_AlbumRoots FOREIGN KEY (albumRoot) REFERENCES
> AlbumRoots (id) ON DELETE CASCADE ON UPDATE CASCADE,\n\t\t    ADD UNIQUE
> (albumRoot, relativePath(255)),\n\t\t    ENGINE InnoDB;" ]
> digikam.coredb: Core database: schema update to V 8 failed!
> digikam.coredb: Core database: cannot process schema initialization
>
> What I googled about "Specified key was too long" error, it has
> something to do with UTF-8 collated database fields. Could this kind of
> error happen because I have some entries with long filepaths (although
> even the longest should be only about ~50 chars total), or is this
> purely related to the db schema? But I guess this is db content related,
> because otherwise this issue should happen to everyone upgrading their
> MySql db.


dbconfig.xml (126K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
In reply to this post by Mikael Kujanpää
Maik Qualmann kirjoitti 29.08.2016 22:07:
> Please can you try this attached dbconfig.xml file?

Thanks for your file. Unfortunately, no luck:

mkujanpa@earth:~$ digikam
digikam.general: AlbumWatch use QFileSystemWatcher
QFileSystemWatcher::removePaths: list is empty
digikam.general: Database Parameters:
    Type:                     "QMYSQL"
    DB Core Name:             "digikamdb"
    DB Thumbs Name:           "digikamthumbdb"
    DB Face Name:             "digikamfacedb"
    Connect Options:          ""
    Host Name:                "neptunus"
    Host port:                3306
    Internal Server:          false
    Internal Server Path:     ""
    Internal Server Serv Cmd: ""
    Internal Server Init Cmd: ""
    Username:                 "digikam"
    Password:                 "XXXXXXXXX"

digikam.dbengine: Loading SQL code from config file
"/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
  ""
Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
key was too long; max key length is 767 bytes" 1071 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [
"UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n            
                            ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
(albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
CASCADE,\n                                        ADD UNIQUE (albumRoot,
relativePath(250)),\n                                        ENGINE
InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

At least it can be seen that new file was in use, because now it reads
"relativePath(250)" in the middle of there.

Mikki
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
Maik Qualmann kirjoitti 29.08.2016 23:16:
> Only for testing, please try this file. Make a backup your MySQL DB.
> Which
> version of MySQL you use?

I have MySql 5.5.50 on Debian server. Regarding the test, unfortunately
the output didn't change. Hopefully this still helps you to exclude
something.

mkujanpa@earth:~$ digikam
digikam.general: AlbumWatch use QFileSystemWatcher
QFileSystemWatcher::removePaths: list is empty
digikam.general: Database Parameters:
    Type:                     "QMYSQL"
    DB Core Name:             "digikamdb"
    DB Thumbs Name:           "digikamthumbdb"
    DB Face Name:             "digikamfacedb"
    Connect Options:          ""
    Host Name:                "neptunus"
    Host port:                3306
    Internal Server:          false
    Internal Server Path:     ""
    Internal Server Serv Cmd: ""
    Internal Server Init Cmd: ""
    Username:                 "digikam"
    Password:                 "XXXXXXXXX"

digikam.dbengine: Loading SQL code from config file
"/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
  ""
Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
key was too long; max key length is 767 bytes" 1071 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [
"UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n            
                            ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
(albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
CASCADE,\n                                        ADD UNIQUE (albumRoot,
relativePath(250)),\n                                        ENGINE
InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

--
Mikki
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Maik Qualmann
The log is not from last file. Please check again. I think MySQL 5.6.3 is
minimum.

Maik

On Montag, 29. August 2016 23:48:39 CEST Mikael Kujanpää wrote:

> Maik Qualmann kirjoitti 29.08.2016 23:16:
> > Only for testing, please try this file. Make a backup your MySQL DB.
> > Which
> > version of MySQL you use?
>
> I have MySql 5.5.50 on Debian server. Regarding the test, unfortunately
> the output didn't change. Hopefully this still helps you to exclude
> something.
>
> mkujanpa@earth:~$ digikam
> digikam.general: AlbumWatch use QFileSystemWatcher
> QFileSystemWatcher::removePaths: list is empty
> digikam.general: Database Parameters:
>     Type:                     "QMYSQL"
>     DB Core Name:             "digikamdb"
>     DB Thumbs Name:           "digikamthumbdb"
>     DB Face Name:             "digikamfacedb"
>     Connect Options:          ""
>     Host Name:                "neptunus"
>     Host port:                3306
>     Internal Server:          false
>     Internal Server Path:     ""
>     Internal Server Serv Cmd: ""
>     Internal Server Init Cmd: ""
>     Username:                 "digikam"
>     Password:                 "XXXXXXXXX"
>
> digikam.dbengine: Loading SQL code from config file
> "/usr/share/digikam/database/dbconfig.xml"
> digikam.dbengine: Checking XML version ID => expected:  3  found:  3
> digikam.coredb: Core database: running schema update
> digikam.coredb: Core database: have a structure version  7
> digikam.coredb: Core database: makeUpdates  7  to  8
> digikam.dbengine: Failure executing query:
>   ""
> Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
> key was too long; max key length is 767 bytes" 1071 2
> Bound values:  ()
> digikam.dbengine: Error while executing DBAction [
> "UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n
>                             ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
> (albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
> CASCADE,\n                                        ADD UNIQUE (albumRoot,
> relativePath(250)),\n                                        ENGINE
> InnoDB;" ]
> digikam.coredb: Core database: schema update to V 8 failed!
> digikam.coredb: Core database: cannot process schema initialization


Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
Maik Qualmann kirjoitti 30.08.2016 00:06:
> The log is not from last file. Please check again. I think MySQL 5.6.3
> is
> minimum.

Bloody applications that rename files automatically without notifying
the user. :)

I upgraded my MySql server to version 5.6.30 as I noticed that it's also
available. This is the output with correct file and upgraded server:

mkujanpa@earth:~$ digikam
digikam.general: AlbumWatch use QFileSystemWatcher
QFileSystemWatcher::removePaths: list is empty
digikam.general: Database Parameters:
    Type:                     "QMYSQL"
    DB Core Name:             "digikamdb"
    DB Thumbs Name:           "digikamthumbdb"
    DB Face Name:             "digikamfacedb"
    Connect Options:          ""
    Host Name:                "neptunus"
    Host port:                3306
    Internal Server:          false
    Internal Server Path:     ""
    Internal Server Serv Cmd: ""
    Internal Server Init Cmd: ""
    Username:                 "digikam"
    Password:                 "XXXXXXXXX"

digikam.dbengine: Loading SQL code from config file
"/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
  ""
Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
key was too long; max key length is 767 bytes" 1071 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [
"UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n            
                            ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
(albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
CASCADE,\n                                        ADD UNIQUE (albumRoot,
relativePath(190)),\n                                        ENGINE
InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

Thank you for your efforts for trying to solve the issue. I have to go
to the bed for tonight (it's over midnight here in Finland), but I'm
happy to continue tomorrow if you any ideas how to proceed.

--
Mikki
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Maik Qualmann
Can you add this line to the local digikam $HOME/.local/share/digikam/
mysql.conf file?

innodb-large-prefix=true

Maik

On Dienstag, 30. August 2016 00:42:06 CEST Mikael Kujanpää wrote:

> Maik Qualmann kirjoitti 30.08.2016 00:06:
> > The log is not from last file. Please check again. I think MySQL 5.6.3
> > is
> > minimum.
>
> Bloody applications that rename files automatically without notifying
> the user. :)
>
> I upgraded my MySql server to version 5.6.30 as I noticed that it's also
> available. This is the output with correct file and upgraded server:
>
> mkujanpa@earth:~$ digikam
> digikam.general: AlbumWatch use QFileSystemWatcher
> QFileSystemWatcher::removePaths: list is empty
> digikam.general: Database Parameters:
>     Type:                     "QMYSQL"
>     DB Core Name:             "digikamdb"
>     DB Thumbs Name:           "digikamthumbdb"
>     DB Face Name:             "digikamfacedb"
>     Connect Options:          ""
>     Host Name:                "neptunus"
>     Host port:                3306
>     Internal Server:          false
>     Internal Server Path:     ""
>     Internal Server Serv Cmd: ""
>     Internal Server Init Cmd: ""
>     Username:                 "digikam"
>     Password:                 "XXXXXXXXX"
>
> digikam.dbengine: Loading SQL code from config file
> "/usr/share/digikam/database/dbconfig.xml"
> digikam.dbengine: Checking XML version ID => expected:  3  found:  3
> digikam.coredb: Core database: running schema update
> digikam.coredb: Core database: have a structure version  7
> digikam.coredb: Core database: makeUpdates  7  to  8
> digikam.dbengine: Failure executing query:
>   ""
> Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
> key was too long; max key length is 767 bytes" 1071 2
> Bound values:  ()
> digikam.dbengine: Error while executing DBAction [
> "UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n
>                             ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
> (albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
> CASCADE,\n                                        ADD UNIQUE (albumRoot,
> relativePath(190)),\n                                        ENGINE
> InnoDB;" ]
> digikam.coredb: Core database: schema update to V 8 failed!
> digikam.coredb: Core database: cannot process schema initialization
>
> Thank you for your efforts for trying to solve the issue. I have to go
> to the bed for tonight (it's over midnight here in Finland), but I'm
> happy to continue tomorrow if you any ideas how to proceed.


Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
Maik Qualmann kirjoitti 30.08.2016 20:19:
> Can you add this line to the local digikam $HOME/.local/share/digikam/
> mysql.conf file?
>
> innodb-large-prefix=true

I did. The file didn't exist before (directory was there), so I created
the file and added just that one line there. The dbconfig.xml is the
same that you provided earlier.

mkujanpa@earth:~/.local/share/digikam$ digikam
digikam.general: AlbumWatch use QFileSystemWatcher
QFileSystemWatcher::removePaths: list is empty
digikam.general: Database Parameters:
    Type:                     "QMYSQL"
    DB Core Name:             "digikamdb"
    DB Thumbs Name:           "digikamthumbdb"
    DB Face Name:             "digikamfacedb"
    Connect Options:          ""
    Host Name:                "neptunus"
    Host port:                3306
    Internal Server:          false
    Internal Server Path:     ""
    Internal Server Serv Cmd: ""
    Internal Server Init Cmd: ""
    Username:                 "digikam"
    Password:                 "XXXXXXXXX"

digikam.dbengine: Loading SQL code from config file
"/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
  ""
Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
key was too long; max key length is 767 bytes" 1071 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [
"UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n            
                            ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
(albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
CASCADE,\n                                        ADD UNIQUE (albumRoot,
relativePath(190)),\n                                        ENGINE
InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

Mikki
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
In reply to this post by Maik Qualmann
Maik Qualmann kirjoitti 30.08.2016 20:19:
> Can you add this line to the local digikam $HOME/.local/share/digikam/
> mysql.conf file?
>
> innodb-large-prefix=true

I did. The file didn't exist before (directory was there), so I created
the file and added just that one line there. The dbconfig.xml is the
same that you provided earlier.

mkujanpa@earth:~/.local/share/digikam$ digikam
digikam.general: AlbumWatch use QFileSystemWatcher
QFileSystemWatcher::removePaths: list is empty
digikam.general: Database Parameters:
    Type:                     "QMYSQL"
    DB Core Name:             "digikamdb"
    DB Thumbs Name:           "digikamthumbdb"
    DB Face Name:             "digikamfacedb"
    Connect Options:          ""
    Host Name:                "neptunus"
    Host port:                3306
    Internal Server:          false
    Internal Server Path:     ""
    Internal Server Serv Cmd: ""
    Internal Server Init Cmd: ""
    Username:                 "digikam"
    Password:                 "XXXXXXXXX"

digikam.dbengine: Loading SQL code from config file
"/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  7
digikam.coredb: Core database: makeUpdates  7  to  8
digikam.dbengine: Failure executing query:
  ""
Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
key was too long; max key length is 767 bytes" 1071 2
Bound values:  ()
digikam.dbengine: Error while executing DBAction [
"UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n            
                            ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
(albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
CASCADE,\n                                        ADD UNIQUE (albumRoot,
relativePath(190)),\n                                        ENGINE
InnoDB;" ]
digikam.coredb: Core database: schema update to V 8 failed!
digikam.coredb: Core database: cannot process schema initialization

Mikki
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Maik Qualmann-2
Sorry, if not used the internal MySQL server, the line must be added to the
global my.cnf file or ~/.my.cnf.

Maik

On Dienstag, 30. August 2016 21:07:28 CEST Mikael Kujanpää wrote:

> Maik Qualmann kirjoitti 30.08.2016 20:19:
> > Can you add this line to the local digikam $HOME/.local/share/digikam/
> > mysql.conf file?
> >
> > innodb-large-prefix=true
>
> I did. The file didn't exist before (directory was there), so I created
> the file and added just that one line there. The dbconfig.xml is the
> same that you provided earlier.
>
> mkujanpa@earth:~/.local/share/digikam$ digikam
> digikam.general: AlbumWatch use QFileSystemWatcher
> QFileSystemWatcher::removePaths: list is empty
> digikam.general: Database Parameters:
>     Type:                     "QMYSQL"
>     DB Core Name:             "digikamdb"
>     DB Thumbs Name:           "digikamthumbdb"
>     DB Face Name:             "digikamfacedb"
>     Connect Options:          ""
>     Host Name:                "neptunus"
>     Host port:                3306
>     Internal Server:          false
>     Internal Server Path:     ""
>     Internal Server Serv Cmd: ""
>     Internal Server Init Cmd: ""
>     Username:                 "digikam"
>     Password:                 "XXXXXXXXX"
>
> digikam.dbengine: Loading SQL code from config file
> "/usr/share/digikam/database/dbconfig.xml"
> digikam.dbengine: Checking XML version ID => expected:  3  found:  3
> digikam.coredb: Core database: running schema update
> digikam.coredb: Core database: have a structure version  7
> digikam.coredb: Core database: makeUpdates  7  to  8
> digikam.dbengine: Failure executing query:
>   ""
> Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
> key was too long; max key length is 767 bytes" 1071 2
> Bound values:  ()
> digikam.dbengine: Error while executing DBAction [
> "UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n
>                             ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
> (albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
> CASCADE,\n                                        ADD UNIQUE (albumRoot,
> relativePath(190)),\n                                        ENGINE
> InnoDB;" ]
> digikam.coredb: Core database: schema update to V 8 failed!
> digikam.coredb: Core database: cannot process schema initialization
>
> Mikki


--
Gruß Maik
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Maik Qualmann
In reply to this post by Mikael Kujanpää
Sorry, if not used the internal MySQL server, the line must be added to the
global my.cnf file or ~/.my.cnf.

Maik

On Dienstag, 30. August 2016 21:07:28 CEST Mikael Kujanpää wrote:

> Maik Qualmann kirjoitti 30.08.2016 20:19:
> > Can you add this line to the local digikam $HOME/.local/share/digikam/
> > mysql.conf file?
> >
> > innodb-large-prefix=true
>
> I did. The file didn't exist before (directory was there), so I created
> the file and added just that one line there. The dbconfig.xml is the
> same that you provided earlier.
>
> mkujanpa@earth:~/.local/share/digikam$ digikam
> digikam.general: AlbumWatch use QFileSystemWatcher
> QFileSystemWatcher::removePaths: list is empty
> digikam.general: Database Parameters:
>     Type:                     "QMYSQL"
>     DB Core Name:             "digikamdb"
>     DB Thumbs Name:           "digikamthumbdb"
>     DB Face Name:             "digikamfacedb"
>     Connect Options:          ""
>     Host Name:                "neptunus"
>     Host port:                3306
>     Internal Server:          false
>     Internal Server Path:     ""
>     Internal Server Serv Cmd: ""
>     Internal Server Init Cmd: ""
>     Username:                 "digikam"
>     Password:                 "XXXXXXXXX"
>
> digikam.dbengine: Loading SQL code from config file
> "/usr/share/digikam/database/dbconfig.xml"
> digikam.dbengine: Checking XML version ID => expected:  3  found:  3
> digikam.coredb: Core database: running schema update
> digikam.coredb: Core database: have a structure version  7
> digikam.coredb: Core database: makeUpdates  7  to  8
> digikam.dbengine: Failure executing query:
>   ""
> Error messages: "QMYSQL: Kyselyn suorittaminen epäonnistui" "Specified
> key was too long; max key length is 767 bytes" 1071 2
> Bound values:  ()
> digikam.dbengine: Error while executing DBAction [
> "UpdateSchemaFromV7ToV8" ] Statement [ "ALTER TABLE Albums\n
>                             ADD CONSTRAINT Albums_AlbumRoots FOREIGN KEY
> (albumRoot) REFERENCES AlbumRoots (id) ON DELETE CASCADE ON UPDATE
> CASCADE,\n                                        ADD UNIQUE (albumRoot,
> relativePath(190)),\n                                        ENGINE
> InnoDB;" ]
> digikam.coredb: Core database: schema update to V 8 failed!
> digikam.coredb: Core database: cannot process schema initialization
>
> Mikki


Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
Maik Qualmann kirjoitti 30.08.2016 22:27:
> Sorry, if not used the internal MySQL server, the line must be added to
> the
> global my.cnf file or ~/.my.cnf.

Noup. I wasn't sure which ~/.my.cnf should I use (my local workstation,
or server, and what user?), so I first added it to for my local user
(MySQL server is running on different machine). I followed if Digikam
accesses the file by using "inotifywait -m .my.cnf". No-one read it, so
next thing I did was to add the line for server master config (under
[mysqld]) and restarted the MySQL server. But no luck, everything
remains as they were.

Mikki
Reply | Threaded
Open this post in threaded view
|

Re: UpdateSchemaFromV7ToV8 fails

Mikael Kujanpää
In reply to this post by Maik Qualmann
Maik Qualmann kirjoitti 30.08.2016 00:06:
> The log is not from last file. Please check again. I think MySQL 5.6.3
> is
> minimum.

I was wondering, if it is worth upgrading my MySql 5.6.30 server to
MariaDb 10.0 as possible solution for this issue? Or can you say
directly that it won't have any effect here? There are couple of other
databases running on that server too, so I'm not willing to just try if
there isn't at least tiny possibility that it might help.

Mikki