Jump to content

Filemanager database error


Claudia

Recommended Posts

CubeCart's admin, Maintenance has a hard-coded list of what CubeCart expects the database structure (its "schema") to look like. That hard-coded list has Cubecart_filemanager.md5hash having a UNIQUE KEY index.

So, to quiet the orange warning, the database table CubeCart_filemanager should have a matching UNIQUE KEY index applied against the 'md5hash' column. Applying any other kind of index will not quiet the orange warning.

 

 

Edited by bsmither
Link to comment
Share on other sites

It is strange that Cubecart_filemanager.md5hash (of your installed database) has no index currently assigned to it.

The upgrade sequence against the database added a UNIQUE index to this column at the CC654 version.

 

Link to comment
Share on other sites

In admin, Maintenance, Query Database (Advanced) tab, in the Query Box, enter:

ALTER TABLE `CubeCart_filemanager` ADD UNIQUE(`md5hash`); #EOQ

Then click the Go button. There will be no response shown.

Let us also take a look at admin, Maintenance, Upgrade tab. What is the highest version shown (should be the top-most line of the History table)?

 

 

 

Link to comment
Share on other sites

Indeed.

I wonder if that is the case with Claudia - the upgrade at CC654 failed to execute that statement in the SQL upgrade file because the database found duplicate MD5 hashes? (I need to remind myself what sort of error reporting is shown after an upgrade for errors triggered during an upgrade.)

 

Link to comment
Share on other sites

Probably not, unless you installed CC655 somewhere (other than actually upgrading CubeCart to CC655), then editing the includes/global.inc.php file to point to the existing database.

If you did, in fact, run the CC655 setup (upgrade) script, CubeCart would have seen the current database schema was at CC653, which would have caused the execution of all the SQL statements in /setup/db/upgrade/6.5.4.sql and 6.5.5.sql.

Depending on the above, please determine if the SQL statements in these two files need to be sent to the database.

 

Link to comment
Share on other sites

I ran your query: ALTER TABLE `CubeCart_filemanager` ADD UNIQUE(`md5hash`); #EOQ  but it wouldn't take it saying something like it was already UNIQUE

I din't change anything in the global file - just changed the admin folder and file to match the global names

 

 

Link to comment
Share on other sites

MySQL (and by extension, MariaDB) can have more than one index, of various types, applied against a specified column, as long as they are named differently.

For example, I just ADDed a KEY index to CubeCart_filemanager, 'md5hash' column, but named the KEY index "Index6" (being the sixth index applied).

Following the program flow of maintenance.index.inc.php, near lines 987-1003, the loop will find the 'Non_unique'=='0' on 'md5hash' first, but then will find else 'KEY' on 'md5hash' on a subsequent iteration of the loop.

So, the listing of tables will flag CubeCart_filemanager as having KEY (not named "md5hash") but expecting UNIQUE KEY -- even though there is, in fact, a UNIQUE KEY on 'md5hash'.

Maybe this database needs to be looked at using an external database utility to discover what indexes are actually on CubeCart_filemanager.

Edited by bsmither
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...