Jump to content


Photo

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


  • Please log in to reply
5 replies to this topic

#1 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 01 August 2006 - 10:24 PM

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.

Edit: 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?)

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

#2 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 02:45 PM

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.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#3 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 02 August 2006 - 03:01 PM

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)

#4 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 03:06 PM

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.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

#5 michaellunsford

michaellunsford
  • Members
  • PipPipPip
  • Advanced Member
  • 1,023 posts
  • LocationLouisiana, USA

Posted 02 August 2006 - 08:09 PM

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)

#6 fenway

fenway
  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 02 August 2006 - 09:32 PM

You should be able to add this into the my.cnf file instead, which plesk has no choice but to abide by.
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users