Cloning DB with view fails | Report Bugs | Forum Archive

The free forums are no longer in use. It remains available as read-only archive.

Avatar
Lost password?
Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_TopicIcon
Cloning DB with view fails
March 6, 2012
5:19 pm
Avatar
Guest
Guests

Frown I have tried using the xCloner tool on a database with a view defined. It is treated as a table, which means that restoring fails. Notice, I did not use mysqldump but I used instead the xCloner tools internal implementation.

SmileHowever, it is possible to fix the problem by manually changing the generate database script.

March 7, 2012
8:09 am
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Hi there, care to share the changes you have made to make it work? 🙂

 

Cheers, Ovidiu

March 7, 2012
1:03 pm
Avatar
Guest
Guests

The xCloner generated:

 

DROP table IF EXISTS `jos_jf_languages`;
CREATE ALGORITHM=UNDEFINED DEFINER=`mortenm`@`%` SQL SECURITY DEFINER VIEW `jos_jf_languages` AS select `l`.`lang_id` AS `lang_id`,`l`.`lang_code` AS `lang_code`,`l`.`title` AS `title`,`l`.`title_native` AS `title_native`,`l`.`sef` AS `sef`,`l`.`description` AS `description`,`l`.`published` AS `published`,`l`.`image` AS `image`,`lext`.`image_ext` AS `image_ext`,`lext`.`fallback_code` AS `fallback_code`,`lext`.`params` AS `params`,`lext`.`ordering` AS `ordering` from (`jos_languages` `l` left join `jos_jf_languages_ext` `lext` on((`l`.`lang_id` = `lext`.`lang_id`))) order by `lext`.`ordering`;

#
# Dumping data for table `jos_jf_languages`
#
INSERT INTO `jos_jf_languages` VALUES ('1','en-GB','','English (United Kingdom)','en','','1','en','/media/com_joomfish/default/flags/en.gif','','MetaDesc=rnMetaKeys=rnrn','0');
INSERT INTO `jos_jf_languages` VALUES ('2','da-DK','','Dansk','da','','1','da','/media/com_joomfish/default/flags/da.gif','','MetaDesc=rnMetaKeys=rnrn','0');
INSERT INTO `jos_jf_languages` VALUES ('3','de-DE','','Deutch','de','','1','de','/media/com_joomfish/default/flags/de.gif','','MetaDesc=rnMetaKeys=rnrn','0');

 

which I changed to:

 

DROP table IF EXISTS `jos_jf_languages`;

(placed in the beginning of the file)

 

CREATE OR REPLACE ALGORITHM=UNDEFINED DEFINER=`mortenm`@`%` SQL SECURITY DEFINER VIEW `jos_jf_languages` AS select `l`.`lang_id` AS `lang_id`,`l`.`lang_code` AS `lang_code`,`l`.`title` AS `title`,`l`.`title_native` AS `title_native`,`l`.`sef` AS `sef`,`l`.`description` AS `description`,`l`.`published` AS `published`,`l`.`image` AS `image`,`lext`.`image_ext` AS `image_ext`,`lext`.`fallback_code` AS `fallback_code`,`lext`.`params` AS `params`,`lext`.`ordering` AS `ordering` from (`jos_languages` `l` left join `jos_jf_languages_ext` `lext` on((`l`.`lang_id` = `lext`.`lang_id`))) order by `lext`.`ordering`;

(placed in the end of the file)

March 8, 2012
5:59 pm
Avatar
Ovidiu Liuta
Admin
Forum Posts: 2484
Member Since:
September 26, 2010
sp_UserOfflineSmall Offline

Thx, i will look into getting this fixed! Ovidiu

Forum Timezone: America/Chicago
Most Users Ever Online: 867
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
mlguru: 30
Django29: 29
D: 21
Andy: 21
Marcus: 20
Jamie F: 19
Member Stats:
Guest Posters: 737
Members: 9453
Moderators: 2
Admins: 3
Forum Stats:
Groups: 3
Forums: 7
Topics: 2397
Posts: 8236
Newest Members:
Vladimir Smitka
Moderators: TriP: 0, Steve Burge: 0
Administrators: Ovidiu Liuta: 2484, Victor Drover: 1, Valentin Barbu: 0