This needs to stay on the list.

Assuming you did create your table as a MyISAM table
which I think forces atomic updates (implicit commits),
that shouldn't be a problem and it is writing something.

I've only used this thing once so I'm no expert but it does
work unchanged after several years. My code resembles yours
except the last thing done is an explicit untie as follows:

    my %session;
    tie %session, 'Apache::Session::MySQL', undef, { Handle => $dbh,
        
LockHandle => $dbh}; 
    # set the dsn
    $session{dsn} = $PONTIS::DB::dsn;
    $session{username} = $PONTIS::DB::db_user;
    $session{password} = $PONTIS::DB::db_pass;

    # set timestamp to force update
    $session{timestamp} = time();

    # get the session id and return it
    my $id = $session{_session_id};
    untie %session;


Looking at the Apache::Session code the DESTROY method forces a save op
but I can't remember if undef short-circuits that or not.


> -----Original Message-----
> From: Octavian Rasnita [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, October 05, 2005 4:30 PM
> To: Barksdale, Ray
> Subject: Re: What am I missing?
> 
> Ok, and how can I do that?
> 
> I have tried to create a first level element named 
> "timestamp" in the hash which is saved, but with the same results.
> 
> I have done:
> 
> $session{timestamp} = time();
> 
> Thanks.
> 
> Teddy
> 
> 
<snip>

Reply via email to