Solved

MySQL Text field limit?

Posted on 2007-03-29
4
1,765 Views
Last Modified: 2007-12-19
I'm using Apache 2.0.59 and PHP 5.2.1, and connecting to a MySQL 4.1 database
using PDO.

My problem is, I'm trying to write to a text column in a table and then
read it back out, and somewhere along the way my data gets truncated to
64K. It appears that the data is in the text column correctly but I can't
be certain.

Any idea what might be causing this?


0
Comment
Question by:yodercm
  • 2
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
gamebits earned 500 total points
ID: 18821131
Today’s scary discovery: MySQL TEXT fields have a limit of 65,000 bytes. If you insert anything larger than that in to a normal TEXT field mySQL will silently truncate your data without telling you (meaning software checks are probably a good idea). MEDIUMTEXT will store 16 million characters and LONGTEXT can handle over 4 trillion, but this information does not appear to be readily available in the online mySQL manual (although it is hinted at in this table). Something to bare in mind when designing database applications.

From

http://simonwillison.net/2002/Aug/1/mysqlTextLimits/
0
 
LVL 27

Author Comment

by:yodercm
ID: 18821136
Never mind, I found the answer, but this system won't let me delete the question.
0
 
LVL 27

Author Comment

by:yodercm
ID: 18821137
LOL OK, gamebits, you get the points for speed :)))
0
 
LVL 28

Expert Comment

by:gamebits
ID: 18821147
Thanks for the points and the grade, but you can asked a moderator to delete the question, I would not opposed.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question