Jump to content

Archived

This topic is now archived and is closed to further replies.

michaellunsford

HELP, I'm sinking!!! mysql is truncating content

Recommended Posts

Okay, I'm sick to my stomach because I'm completely at the mercy of something I am totally unaware of.

I have a WYSIWYG HTML editor that allows users to edit their little page online. they edit the page and it's happy. it looks good. and it stays for a day or two.

but then, without warning, you go to their page one day, and the page's content has been truncated. I have had to pull database backups to fix this in the past, but I really want to know what is causing it?

typically the page is not edited anywhere, it just gets cut. Here's the detail:

keyfield int(11) PRI NULL auto_increment
page varchar(64)
content text

the part that's being truncated is the "content" field. The one that was truncated is 7,840 in length (after being truncated).

The longest field is 65,542 in length (is there a limit? 65,536 or something?)

seriously, I have indigestion. Any insights would be a tremendous help.

[b]Edit:[/b] I have just yum updated mysql to 4.1.20 from 4.1.18 (in the hopes that mysql may have fixed something that caused this?)

[b]Edit2:[/b] Is there a mysql log that can tell me when a database has been modified, scanned, or otherwise touched and by whom?

Share this post


Link to post
Share on other sites
Well, yes, 64 characters isn't very long for page content... though you can have a huge column type if need be (up to 4GB).  Obviously, something "else" is running an update statement.  There is a query log that you can enable... I don't remember exactly what line you have to add to my.cnf, though.

Share this post


Link to post
Share on other sites
the 64 character limit is just for the page name (I can't think of any reason it would need to be longer). The only thing I am doing regularly is a daily mysqldump using the database username and password. The dump goes into a textfile and gets zipped up and emailed to the site admin weekly (or daily depending on their preference).

Plesk is also running its own mysqldump every day at 5:14AM -- but as far as I can tell, it's just for plesk stuff (and horde's webmail stuff)

Share this post


Link to post
Share on other sites
Sorry, I saw "truncated" and varchar(64) and jumped the gun.

mysqldump should have no effect on the table's contents... there must be something else running.

Share this post


Link to post
Share on other sites
the man says: To enable the general query log, start mysqld with the --log[=file_name] or -l [file_name] option.

problem is, I believe plesk restarts mysqld every so often. I will probably need to figure out where the options are (or if there are any options)

Share this post


Link to post
Share on other sites
You should be able to add this into the my.cnf file instead, which plesk has no choice but to abide by.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.