LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-24-2010, 09:28 AM   #1
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Rep: Reputation: 62
MySQL won't let me create a VARCHAR of size 65535


....but a TEXT field is OK.

Can anyone tell me what's going on?

(this is the latest version of WINDOZE MySQL (sorry!) downloaded from the web.)
 
Old 09-24-2010, 10:58 AM   #2
suprstar
Member
 
Registered: Aug 2010
Location: Atlanta
Distribution: ubuntu, debian
Posts: 142
Blog Entries: 2

Rep: Reputation: 23
You'd have to use a blob or text datatype for anything larger than that. There is a maximum ROW size of 65535 bytes, meaning all your fields combined can't be longer than that. Blobs and text data types get saved off somewhere else, not in the actual record itself, they can be as large as your filesystem allows for.

row length = 1
+ (sum of column lengths)
+ (number of NULL columns + delete_flag + 7)/8
+ (number of variable-length columns)
 
1 members found this post helpful.
Old 09-29-2010, 09:15 AM   #3
resetreset
Senior Member
 
Registered: Mar 2008
Location: Cyberspace
Distribution: Dynebolic, Ubuntu 10.10
Posts: 1,340

Original Poster
Rep: Reputation: 62
Thanks a LOT man, I didn't know that!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create a new mysql user and a mysql database at the shell prompt? puppymagic Linux - Newbie 1 08-07-2010 06:33 AM
65535 problem svar Slackware 1 01-04-2006 02:32 PM
65535 problem with cp svar Linux - General 0 01-03-2006 01:22 PM
php/mysql check varchar() xushi Programming 13 07-15-2005 11:20 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration