You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Mark Copper <mc...@earthlink.net> on 2004/08/01 23:51:31 UTC

apache::session::mysql: layout

I created a table "sessions" in my db with columns "id" and "a_session"
per the Apache::Session::Store::MySQL pod, in particular, "a_session" is
of type text.

Everything worked fine but I have a (rather silly) question: Why can't I 
see the key/value pairs when I simply "select a_session from sessions" at 
the mysql shell prompt?

Sheepishly,
Mark

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: apache::session::mysql: layout

Posted by Jayce^ <ja...@infogenix.com>.
On Sunday 01 August 2004 03:51 pm, Mark Copper wrote:
> I created a table "sessions" in my db with columns "id" and "a_session"
> per the Apache::Session::Store::MySQL pod, in particular, "a_session" is
> of type text.
>
> Everything worked fine but I have a (rather silly) question: Why can't I
> see the key/value pairs when I simply "select a_session from sessions" at
> the mysql shell prompt?

It should be serialized data.  So binary stuff that isn't represented in 
standard chars in your client.

-- 
--
Jayce^

Re: apache::session::mysql: layout

Posted by Casey Songer <so...@dynamicfeedback.com>.
I could be wrong, but I think this is because the data stored in the 
a_session field, even though it is "TEXT" format, is actually stored as 
perl storage stuff that the command line can't display.  All I know is it 
shows blank for me when I look at it from the mysql shell command line, but 
it works fine when I read it into my mod_perl scripts using DBI.  If you 
try this command 'select * into outfile 'dump.txt' from sessions', you can 
see the actual stuff in the file you dump.

Hope this helps.

Casey Songer


At 03:51 PM 8/1/04, Mark Copper wrote:
>I created a table "sessions" in my db with columns "id" and "a_session"
>per the Apache::Session::Store::MySQL pod, in particular, "a_session" is
>of type text.
>
>Everything worked fine but I have a (rather silly) question: Why can't I
>see the key/value pairs when I simply "select a_session from sessions" at
>the mysql shell prompt?
>
>Sheepishly,
>Mark
>
>--
>Report problems: http://perl.apache.org/bugs/
>Mail list info: http://perl.apache.org/maillist/modperl.html
>List etiquette: http://perl.apache.org/maillist/email-etiquette.html



-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html