Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

Problem in SQL-Backup generated in admin? 
 
Hail Magento
Jr. Member
 
Total Posts:  5
Joined:  2008-01-15
 

Did anybody tried to import/restore the backup sql file generated by the admin/backend ?
I did and MySQL gives an error as shown below:

Error
SQL query:

DROP TABLE IF EXISTS ‘admin_assert’;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘’admin_assert’’ at line 1

On further analysis i tried a quick-fix, here in:

file: /app/code/core/Mage/Backup/Model/Mysql4/Db.php
Class: Mage_Backup_Model_Mysql4_Db
Line: #51

$script.= $this->_read->quoteInto('DROP TABLE IF EXISTS ?'$tableName).";\n";

to make it work i changed the line to

$script.= 'DROP TABLE IF EXISTS '.$this->_read->quoteIdentifier($tableName).";\n";

Actually it’s a problem with quote-symbol used of ‘ instead of ` in the generated sql. The code i changed is a quick-fix which worked on my side, so may need further investigation. Hope the Magento-Team will look into it.

Hail Magento!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Hail Magento
Jr. Member
 
Total Posts:  5
Joined:  2008-01-15
 

ok i submitted to the bug-tracker for further action &/or advice

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top