Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MySQL Text field limit?

Posted on 2007-03-29
4
Medium Priority
?
1,792 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:Cornelia Yoder
[X]
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
  • 2
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
gamebits earned 2000 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:Cornelia Yoder
ID: 18821136
Never mind, I found the answer, but this system won't let me delete the question.
0
 
LVL 27

Author Comment

by:Cornelia Yoder
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

Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

Question has a verified solution.

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

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
In this article, we’ll look at how to deploy ProxySQL.
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

705 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