MySQLDumper-Board Forum Index Follow me on Twitter

Portal  •   Forum  •  Downloads  •  Profile  •  Search   •  Register  •  Log in to check your private messages  •  Log in  •  


 Indexes disabled after a restore

Post new topicReply to topic
Author Message
hennysavenije
MSD-Professional
MSD-Professional





Joined: 29 May 2009
Posts: 77


blank.gif

PostPosted: 2011-08-22, 07:41    Indexes disabled after a restore Reply with quoteBack to top

I think this is more of a but than a problem I encountered. After I restore a database, all the indexes are disabled. I can manually enable them again but maybe other users can't or even didn't notice.
OfflineView user's profileSend private message    
Anzeigen











Posted:    Anzeigen Back to top


    
DSB
Developer
Developer




Age: 41
Joined: 30 Apr 2004
Posts: 16070
Location: Reichenberg bei Würzburg


germany.gif

PostPosted: 2011-08-22, 07:57    (No subject) Reply with quoteBack to top

Indexes are only disabled when you've set the config option "IGNORE ENABLE KEYS" to "Yes".
If you did so, it is the job of the user to activate them manually, after the restore is done. Wink

So it is not generally the case that indexes are disabled. If the mentioned option is set to no (default value) indexes are enabled.
Nevertheless: for very big tables it can take quite a long time to build the index which can reach the timelimit and could break the restoring process.
So this option is a workaround to bypass that special case.
The price is that you'll have to activate the indexes manually after restoring.

_________________
Gruß / Greetings, DSB

Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
hennysavenije
MSD-Professional
MSD-Professional





Joined: 29 May 2009
Posts: 77


blank.gif

PostPosted: 2011-08-22, 09:10    (No subject) Reply with quoteBack to top

Thanks for the answer but ... if I look at the configuration I see: Ignore "ENABLE KEYS": yes no (and the no is checked)
OfflineView user's profileSend private message    
DSB
Developer
Developer




Age: 41
Joined: 30 Apr 2004
Posts: 16070
Location: Reichenberg bei Würzburg


germany.gif

PostPosted: 2011-08-22, 10:28    (No subject) Reply with quoteBack to top

In that case the backup file was not created by MySQLDumper and the commands to enable them are missing in that file.
_________________
Gruß / Greetings, DSB

Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
hennysavenije
MSD-Professional
MSD-Professional





Joined: 29 May 2009
Posts: 77


blank.gif

PostPosted: 2011-08-22, 10:52    (No subject) Reply with quoteBack to top

Nope, the backup was created by MySQLDumper (4 times per day) and I did something stupid and had to restore the backup. Still made by MySQLDumper luckily just an hour before I made the stupid mistake.
OfflineView user's profileSend private message    
DSB
Developer
Developer




Age: 41
Joined: 30 Apr 2004
Posts: 16070
Location: Reichenberg bei Würzburg


germany.gif

PostPosted: 2011-08-22, 11:38    (No subject) Reply with quoteBack to top

Well, this can't be. Wink
MySQLDumper adds "ALTER TABLE xxx ENABLE KEYS"-Commands to the backup file. And if you didn't set the option "IGNORE ENABLE KEYS" to "YES", they are executed while restoring. Maybe this setting was set to "yes" while you did the restore?

_________________
Gruß / Greetings, DSB

Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
hennysavenije
MSD-Professional
MSD-Professional





Joined: 29 May 2009
Posts: 77


blank.gif

PostPosted: 2011-08-22, 11:47    (No subject) Reply with quoteBack to top

Again, nope. I didn't change anything. It happened already a few times but I couldn't figure out how the indexes were disabled, so I decided to mention it here. I also restore on another server to where the backups are ftp-ed to and there the indexes aren't disabled. I even upgraded MySQLDumper to see if that would solve the problem but it doesn't.

If I have to restore I go immediately to the restore menu and restore and to my knowledge I have never changed the settings for Ignore "ENABLE KEYS" I am downloading now one of the backup files too see what's inside but that might take a while, since they are pretty big.

OfflineView user's profileSend private message    
hennysavenije
MSD-Professional
MSD-Professional





Joined: 29 May 2009
Posts: 77


blank.gif

PostPosted: 2011-08-22, 15:08    (No subject) Reply with quoteBack to top

Alright, since it's a huge file, I managed to open it. So what am I looking for? I searched for "ABLE KEYS" (disable or enable) but couldn't find anything. After searching for ALTER TABLE, I found the following

/*!40000 ALTER TABLE `ij1n_updatelog` DISABLE KEYS */;
INSERT INTO `ij1n_updatelog` (`ul_key`,`ul_value`) VALUES ('convert transcache field',NULL);
<SNIP>
/*!40000 ALTER TABLE `ij1n_updatelog` ENABLE KEYS */;

So obviously it is supposed to be enabled but it isn't.

OfflineView user's profileSend private message    
hennysavenije
MSD-Professional
MSD-Professional





Joined: 29 May 2009
Posts: 77


blank.gif

PostPosted: 2011-08-22, 15:11    (No subject) Reply with quoteBack to top

I just checked and indeed. In all the tables "around" the insert statements there are
/*!40000 ALTER TABLE `whatever_table` DISABLE KEYS */;
INSERT INTO `whatever_table` (etc)
/*!40000 ALTER TABLE `whatever_table` ENABLE KEYS */;

OfflineView user's profileSend private message    
DSB
Developer
Developer




Age: 41
Joined: 30 Apr 2004
Posts: 16070
Location: Reichenberg bei Würzburg


germany.gif

PostPosted: 2011-08-22, 19:05    (No subject) Reply with quoteBack to top

So now you understand that I cannot reproduce what you said. Wink
If you didn't change the mentioned option, the indexes are enabled and therefor build.

_________________
Gruß / Greetings, DSB

Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
DSB
Developer
Developer




Age: 41
Joined: 30 Apr 2004
Posts: 16070
Location: Reichenberg bei Würzburg


germany.gif

PostPosted: 2011-08-22, 19:40    (No subject) Reply with quoteBack to top

You are running a MySQL-Server version >= 4.0?
_________________
Gruß / Greetings, DSB

Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
hennysavenije
MSD-Professional
MSD-Professional





Joined: 29 May 2009
Posts: 77


blank.gif

PostPosted: 2011-08-23, 03:50    (No subject) Reply with quoteBack to top

Yes I am.

MySQL

Server: Localhost via UNIX socket
Server version: 5.1.57-log
Protocol version: 10
User: gebruikers@localhost
MySQL charset: UTF-8 Unicode (utf8)

Web server

sw-cp-server/1.0.0
MySQL client version: 5.0.77
PHP extension: mysql

phpMyAdmin

Version information: 3.3.3

OfflineView user's profileSend private message    
DSB
Developer
Developer




Age: 41
Joined: 30 Apr 2004
Posts: 16070
Location: Reichenberg bei Würzburg


germany.gif

PostPosted: 2011-08-23, 17:08    (No subject) Reply with quoteBack to top

ok, any server >= version 4 will interprete and execute the ENABLE/DISABLE commands.
So I still can not reproduce what you are saying. The indexes and keys must be enabled.

_________________
Gruß / Greetings, DSB

Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
hennysavenije
MSD-Professional
MSD-Professional





Joined: 29 May 2009
Posts: 77


blank.gif

PostPosted: 2011-08-23, 17:20    (No subject) Reply with quoteBack to top

Thanks a lot for the answer but unfortunately they aren't. The commands are there, but they aren't executed. It didn't happen before and I don't know when it started but I think I discovered it after the last upgrade. Might it be that it happens because the database is so big?

Greetings

OfflineView user's profileSend private message    
DSB
Developer
Developer




Age: 41
Joined: 30 Apr 2004
Posts: 16070
Location: Reichenberg bei Würzburg


germany.gif

PostPosted: 2011-08-23, 17:21    (No subject) Reply with quoteBack to top

Maybe your MySQL user doesn't have the right to execute "ALTER"?
_________________
Gruß / Greetings, DSB

Teigwaren heißen Teigwaren, weil sie Teig waren.
Diejenigen, die lautstark darüber diskutieren, warum es nicht geht, mögen bitte jene nicht stören, die es gerade tun.

OfflineView user's profileSend private messageSend e-mailVisit poster's website    
Display posts from previous:      
Post new topicReply to topic


 Jump to:   


Show permissions
Similar topics
Topic Author Forum Replies Posted
No new posts [solved] Restore:Can't create table '... rob40 Gelöst/Erledigt 6 2012-05-13, 20:41 View latest post
No new posts Restore Issue - Multifile restore stops znmnky Errors and questions 6 2012-04-03, 21:51 View latest post
No new posts Dump restore stuck anthonyinit Errors and questions 4 2012-03-31, 04:45 View latest post
No new posts Wiederherstellung bricht ab (restore.... bursch Gelöst/Erledigt 2 2012-03-14, 14:29 View latest post
No new posts Warning: Too few arguments.....restor... Alfr3d Errors and questions 1 2012-02-22, 11:01 View latest post

 
CrackerTracker © 2004 - 2012 CBACK.de

Powered by Orion based on phpBB © 2001, 2002 phpBB Group
CBACK Orion Style based on FI Theme
All times are GMT + 2 Hours

phpBB SEO