Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

MySQL Text field limit?

Posted on 2007-03-29
4
1,760 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
setup wamp server for first time 2 83
Count rows in a MySQL statement, but don't return the value in the results 4 40
category table 2 30
MySQL Query Using Up Memory 6 43
Introduction In this article, I will by showing a nice little trick for MySQL similar to that of my previous EE Article for SQLite (http://www.sqlite.org/), A SQLite Tidbit: Quick Numbers Table Generation (http://www.experts-exchange.com/A_3570.htm…
I use MySQL for many of my development projects in a Windows environment. To manage my databases (and perform queries) for years I used a tool called MySQL administrator.  This tool has since been replaced by MySQL Workbench. So I decided to m…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

861 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