URL Length in MySQL 4
suryanto - July 16, 2008 - 15:00
| Project: | Link |
| Version: | 5.x-2.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
After MySQL 5.0.3 VARCHAR length can be specified as a value from 0 to 65,535. But before that version, length 0 to 255. You use VARCHAR to save the URL. Maybe we can use the TEXT or LONG TEXT to save the URL? So this module not broken in MySQL before 5.0.3 version.
http://dev.mysql.com/doc/refman/5.0/en/char.html
Regards,
Suryanto Rachmat

#1
Thanks, this is the most succinct explanation of the problem, so I'll point all the duplicate issues here. This is corrected with the following commits:
D5: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/link/link.mod...
D6: http://cvs.drupal.org/viewcvs/drupal/contributions/modules/link/link.mod...
I'm rolling out a new update to fix this problem.
#2
Thank you for your help.
Regards,
Suryanto Rachmat
#3
just wanted to add that i am getting similar error with an import to a MySQL5 database (dreamhost) from a MAMP install. I have v5.x.2.3.1 of this module.
#1074 - Column length too big for column 'field_link_url_url' (max = 255); use BLOB or TEXT instead#4
Many thanks from me as well.
#5
@avolve, the problem you're experiencing is because one of your installations supported a longer column length than another. Link in version 2.3 was using varchar columns length of 1024, but then reduced it back down to 255 in 2.3.1. So now that your database has some columns set to 1024, that will still be the case unless you manually set it back down to 255.
I'm planning on switching these columns to TEXT in a future upgrade, but for now the database schema is a little mixed up with some link columns being 255 and others being 1024. I'd suggest setting all your link database columns to 255 if it's giving you problems until we get an update function written to switch everything over to TEXT columns.
#6
@quicksketch thanks for the quick reply.
Just to clarify, i need to get into the MySQL db itself and manually change the value from 1024 to 255 for fields created before the upgrade to 2.3 (i need to get a test install online asap)?
#7
avolve, that is correct. There are two columns in any table that have link columns: *_url and *_title. Any fields you created with version 2.3 you'll need to update from 1024 to 255.
#8
Automatically closed -- issue fixed for two weeks with no activity.