Such situation has appeared 3rd time during this year at my database.
Problem description
1. User
Doctor Mu (id = 488) has posted photo.
2. Image was uploaded with mistakes, so user
charm (id = 2, admin rights) has decided to move it to the closed area (closed from public access).
3. User charm has opened posted photo for edit, choosed a different sub-category for photo, and also replaced user
Doctor Mu on user
charm (this is my rule at this website, when the image is wrong, to move it to the closed area and replace user on admin's username).
4. After that user
Doctor Mu can not login. I am checking his registration (
http://www.zeno.ru/adm-users.php?ppa...ituser&uid=488) and see, that the username is not
Doctor Mu but
charm. But if we go to the user's gallery (
http://www.zeno.ru/showgallery.php?cat=all&ppuser=488), we see all photos are still under his name.
5. I have edited the registration of this user, and replaced username
charm for
Doctor Mu.
6. His registration and login are ok now, however, if we go to the gallery of user
charm http://www.zeno.ru/showgallery.php?cat=all&ppuser=2, we will see, that all pages are ascribed to
Doctor Mu (currently some pages were fixed, but you can see the problem here -
http://www.zeno.ru/showphoto.php?photo=55506 ). Link to User points to the correct user id = 2, while the username is written as
Doctor Mu, which is wrong (should be
charm).
Looks as by unknown reason sometime during the editing of the page, posted by some user, his username is replaced in the registry by admin's usename.
I have no any integration at this website, only one registration system for PhotoPost.
Hence is the first request - what can be done to escape such problem in a future?
For fixing of user ID / usernames there is a tool in the Admin's interface - Scan database, "Check here to resync photo/comments usernames/update comments counts."
It really works and restores correct usernames. However, there is a next problem.
At my website this tool applied to all categories, checks pages one by one, with speed about 100 pages per minute. For the large database (more than 60,000 pages) it will took 10 hours to finish the process. This is a problem, because during such long period some probability exists, that connection will be lost, and process of recovering will be canceled.
More ever, after few hours of checking I have got next message (already reported about such messages above):
-------------------------------
....
Checking photo #25072: done.
Checking photo #25073:
We're sorry, but the system experienced an unrecoverable error. Please try again later.
Script: adm-misc
Query: SELECT userid,username,email,password,usergroupid,offset,mature FROM users WHERE userid=1353
Result: MySQL server has gone away
Database handle: Resource id #7
-------------------------------
So, my second question is - what does it mean, such report about mistake? How to resolve this problem?
Well, I have restarted process, this time not in all categories, but only in the category of the photo #25073. All was done successfully.
I have restarted process again for 'all categories', and received the same mistake at the same point after few hours of checking.
The advice to check the whole database step-by-step by separate subcategories doesn't work, because I have more than 6,500 subcategories.
So, my third request - is it possible to add to the database scanning tool two fields, where I can enter range of photos, which should be checked in this session? It will possible, having such feature, to finish scaning of the database during few sessions.