Problem: Database Restore Alters Collation

I'm testing the Survey Module, and have run into a problem that is probably more general than just that module.  Here's my workflow that creates the bug:

Fresh install.

Do a full database backup.

Restore the Database to what was just saved.

Install the Survey Module

Uninstall the Survey Module.

At this point, you get

-- -- There are errors in the following MySQL queries:
-- -- Error: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='

SET @iActionId := (SELECT `ID` FROM  `sys_acl_actions` WHERE `Name` =  @sActionId LIMIT 1);
-- -- Error: Illegal mix of collations (utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '='
DELETE FROM `sys_acl_actions` WHERE `Name` = @sActionId;

Again, I doubt this is a problem specific to the surveys, but rather more general to the database restore.

Tac

Quote · 6 Dec 2010

Any chance this could be reviewed / confirmed / fixed in the upcoming 7.05 release?  To me, that fact that the system works differently (in this case, doesn't work) after a database restore is a show-stopper.

Is there a  better place to report bugs like this?  I posted this a while ago and got no response, so obviously this isn't the best approach to use to report problems.

Thanks,

Quote · 27 Dec 2010

Hello please search this in a forum , I seen  the topic regards your trouble

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 27 Dec 2010

I see this thread:

 

http://www.boonex.com/unity/forums/topic/Database-query-error-2010-12-03.htm

But I don't really see a solution.

Tac

Quote · 27 Dec 2010

 

I see this thread:

 

http://www.boonex.com/unity/forums/topic/Database-query-error-2010-12-03.htm

But I don't really see a solution.

Tac

Try to execute these PHP code :

<?php

$db = mysql_connect('localhost','database user','Password');

if(!$db) echo "Cannot connect to the database - incorrect details";

mysql_select_db('Databasename'); $result=mysql_query('show tables');

while($tables = mysql_fetch_array($result)) {

foreach ($tables as $key => $value) {

mysql_query("ALTER TABLE $value COLLATE utf8_general_ci");

}}

echo "The collation of your database has been successfully changed!";

?>

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 27 Dec 2010

Thanks, although this still seems to me to be something that the code that back up and/or restores the database should handle.  Any chance this code, or something else, could be included in 7.05, so that when you restored a database things still worked?

Quote · 27 Dec 2010

 

Thanks, although this still seems to me to be something that the code that back up and/or restores the database should handle.  Any chance this code, or something else, could be included in 7.05, so that when you restored a database things still worked?

No this custom code not will be included in 7.0.5. But we will try fix all collations troubles!

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 27 Dec 2010

I'm confused.  Right now, backing up and restoring a database does not work.  Will it work in 7.05?  Or will each person have to apply this custom code in order to restore a database?

Quote · 27 Dec 2010

 

I'm confused.  Right now, backing up and restoring a database does not work.  Will it work in 7.05?  Or will each person have to apply this custom code in order to restore a database?

Is not restore database script! This script make same charset collation for all tables. If you have some trouble make a ticket on support page

PS: If possible do not write me personally, please try to ask on the forum first
Quote · 27 Dec 2010
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.