# Activerecord-sqlserver-adapter-2.2.19 bug: text col limits

**URL:** <https://www.ruby-forum.com/t/activerecord-sqlserver-adapter-2-2-19-bug-text-col-limits/170627>\
**Category:** Rails\
**Created:** [June 19, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/activerecord-sqlserver-adapter-2-2-19-bug-text-col-limits/170627 "2009-06-19T19:47:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![weyus](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/7ab992/32.png) [@weyus](https://www.ruby-forum.com/u/weyus)\
**Post date:** [June 19, 2009, 7:47pm UTC](https://www.ruby-forum.com/t/activerecord-sqlserver-adapter-2-2-19-bug-text-col-limits/170627/1 "2009-06-19T19:47:32Z")

</div>

All,

Rails 2.1.0  
AR SQL Server Adapter 2.2.19

I use the AR session store in my application. When I upgraded to the  
latest version of the SQL Server Adapter, my app. stopped working  
because supposedly my session data wouldn’t fit into the “data” TEXT  
column in my sessions table.

This block of code from  
actionpack-2.1.0/lib/action\_controller/session/active\_record\_store.rb  
was being executed:

def raise\_on\_session\_data\_overflow!  
return false if !loaded?  
limit = self.class.data\_column\_size\_limit  
if loaded? and limit and read\_attribute(@@data\_column\_name).size \>  
limit  
raise ActionController::SessionOverflowError  
end  
end

I verified that my session data was 122 bytes and  
self.class.data\_column\_size\_limit was being reported as 16 (!).

I don’t have time to look into what is going on here in more detail, but  
I suspect that text field sizes/limits are not being reported correctly  
by the current version of the adapter.

For now, I will rollback to the version of the adapter that I have that  
works.

Thanks,  
Wes
