Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-03-06 01:15:30

tiger
New Member
Registered: 2006-03-06
Posts: 6

Broken database

I don’t know exactly what happened, but somehow my textpattern table in the MySql database got broken. The only solution in the end was to restore from backup.

What happened:

I hadn’t given any of my articles titles
I decided to give them all titles so that I could generate an archive page
The oldest two articles – about 2 weeks old, the titles wouldn’t add
I generated new articles with the same time stamps
I attempted to delete the articles
There was an error – I didn’t write down what it was (didn’t realise the table was actually broken at the time) but it was to do with the database I know
When I next tried to access the main page, the articles didn’t show and when I looked at the database it was broken (claimed to be ‘in use’)

Any ideas as to what could have happened? I’m really wary about setting this all up again in case it breaks my database again.

Thanks for any help.

Offline

#2 2006-03-06 01:45:10

soulship
Member
From: Always Sunny Charleston
Registered: 2004-04-30
Posts: 669
Website

Re: Broken database

I had not’t given any of my articles titles
I decided to give them all titles so that I could generate an archive page
The oldest two articles – about 2 weeks old, the titles would’nt’t add
I generated new articles with the same time stamps

Sounds like you had some collision of some sort going on. Have you looked at rss_db plugin? It is very handy and is usually the first of several plugins I install after a fresh txp installation. It will tell you the overhead on each table, allow you to repair tables and even do backups without ever leaving the txp interface. Generally I don’t think it is a great idea to not give your articles title or to give two articles the same title. At least in past versions I remember having problems on a site where someone had named two articles the same and it became impossible to delete either one withouot manually going into the db to clear it. I would highly encourage naming every article upon creation with a unique name. Good luck and remember sometimes there are just db gremlins ;)

Offline

#3 2006-03-06 02:05:45

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Broken database

Without details (error messages for a start) we really can’t tell you what happened, why or whether it may happen again.

The “in use” message is a strange one. Can you post your diagostics details please?

Offline

#4 2006-03-06 02:56:02

tiger
New Member
Registered: 2006-03-06
Posts: 6

Re: Broken database

Unfortunately I can only give you the error messages after the fact, as I didn’t realise what had happened at the time. Two articles had the same time stamp, rather than title, but I can see how that could be as much if not more of a problem. I wasn’t able to give just two of the articles a name retrospectively, before the two entries with the same timestamp were generated, however. That was strange.

The error I got when I tried to go to textpattern was

Fatal error: Call to undefined function: parse() in /home/sinister/public_html/moments/textpattern/lib/txplib_misc.php on line 1309
(at http://www.sinistertiger.net/moments/textpattern/index.php )

Then I went onto the control panel to look at the database, and when I went to look at the part of the database where the blog entries are stored, it said ‘in use’ and wouldn’t let me browse them. It said:

“Can’t open file: ‘textpattern.MYI’. (errno: 145)”

Offline

#5 2006-03-06 04:46:46

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: Broken database

Okay…

  • Same timestamp or title should have no effect. I highly suspect there are a combination of other things at play here, and your other error messages confirm this.
  • The “undefined function” error means that you are missing the file publish.php from your Textpattern directory.
  • The “Can’t open file… (errorno: 145)” error means that your “textpattern” table has been corrupted. You’ll need to run the “repair” function of your database control panel on that table.

Offline

#6 2006-03-07 00:18:43

tiger
New Member
Registered: 2006-03-06
Posts: 6

Re: Broken database

Interestingly, nothing at all is missing from textpattern – once the database was reinstalled from backup, textpattern worked perfectly. The textpattern table was indeed corrupted, this is what I didn’t understand – how that had happened.

Offline

#7 2006-03-07 07:47:17

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: Broken database

tiger wrote:

Interestingly, nothing at all is missing from textpattern – once the database was reinstalled from backup, textpattern worked perfectly. The textpattern table was indeed corrupted, this is what I didn’t understand – how that had happened.

Dbs in general are very prone to corruption. It can happen when you save or when you delete posts. Even if you do not do either, txp by itself does it in the logs table.
I have installed <a href=“http://www.wilshireone.com/textpattern-plugins/rss_admin_db_manager”>rss_admin_db_manager</a> and whenever I see red, I repair and through phpMyAdmin I optimise.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#8 2006-03-07 09:51:16

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Broken database

Even if you do not do either, txp by itself does it in the logs table.

Eh?


Alex

Offline

#9 2006-03-07 14:25:44

tiger
New Member
Registered: 2006-03-06
Posts: 6

Re: Broken database

zem wrote:

bq. Even if you do not do either, txp by itself does it in the logs table.

Eh?

I suspect he means that it can happen whenever textpattern interacts with the table, ie, when you make the choice to delete or save an entry, or alternatively when textpattern logs visitors to the site.

Offline

#10 2006-03-07 15:36:26

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,122
Website GitHub Mastodon Twitter

Re: Broken database

zem wrote:

<blockquote><blockquote>Even if you do not do either, txp by itself does it in the logs table. </blockquote>

Eh?</blockquote>

The logs table is writable. ie every time someone visits the site, we get the referring url, time, page, host etc.
These table’s entries have an expiration date. ie 7 days. What this means to me is that txp erases entries on a regular basis. Hence the txp_log table suffers from overheads on a regular basis even if the site is not updated regularly


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#11 2006-03-08 22:34:00

zem
Developer Emeritus
From: Melbourne, Australia
Registered: 2004-04-08
Posts: 2,579

Re: Broken database

Overheads are one thing, corruption is another entirely.


Alex

Offline

#12 2006-03-09 00:10:37

tiger
New Member
Registered: 2006-03-06
Posts: 6

Re: Broken database

Nonetheless it happened – not overheads, corruption…

Offline

Board footer

Powered by FluxBB