# MySQL Text type failure

**URL:** <https://www.ruby-forum.com/t/mysql-text-type-failure/167810>\
**Category:** Rails\
**Created:** [May 12, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/mysql-text-type-failure/167810 "2009-05-12T21:10:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![JannaB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Post date:** [May 12, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/mysql-text-type-failure/167810/1 "2009-05-12T21:10:51Z")

</div>

This is very peculiar – I am using (I am using MySQL 5.0.27-  
community) If I create a table with the following schema…

CREATE TABLE `associates` (  
`id` int(11) NOT NULL auto\_increment,  
`username` varchar(16) NOT NULL default ‘’,  
…  
…  
`tstamp` timestamp NOT NULL default CURRENT\_TIMESTAMP on update  
CURRENT\_TIMESTAMP,  
PRIMARY KEY (`id`),  
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO\_INCREMENT=27 ;

things in AS work swimmingly. However, if I add a column (anywhere in  
the table, here I am just putting at the end) that is a text type,  
call it `notes` (or even make, say varchar(500) ) as follows:

CREATE TABLE `associates` (  
`id` int(11) NOT NULL auto\_increment,  
`username` varchar(16) NOT NULL default ‘’,  
…  
…  
`tstamp` timestamp NOT NULL default CURRENT\_TIMESTAMP on update  
CURRENT\_TIMESTAMP,  
`notes` text NOT NULL,  
PRIMARY KEY (`id`),  
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO\_INCREMENT=27 ;

When I go to do an edit on the table, regardless of whether I add any  
data to the notes field or not, and I save it, It won’t come back up  
when I go to edit it again (I get a 500 error). It saves the values  
into the db correctly when I go directly into the db and look at the  
changes – but it wont come back up when I go to edit it without  
generating  
a 500 error.

I am using the latest version of Rails (2.3) , Ruby and  
ActiveScaffold. Has anyone  
experienced anything like this trying to use a large text field with  
MySQL ?  
thank you, Janna B

---

<div class="post-metadata">

**Author:** ![JannaB](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/df788c/32.png) [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Post date:** [May 13, 2009, 7:13pm UTC](https://www.ruby-forum.com/t/mysql-text-type-failure/167810/2 "2009-05-13T19:13:19Z")

</div>

Never heard of that happening - can you post a stack track from the  
log where it gets the 500?

–Matt J.
