1Apache::Session::Lock::UMsyeSrQLC(o3nptmr)ibuted Perl DoAcpuamcehnet:a:tSieosnsion::Lock::MySQL(3pm)
2
3
4

NAME

6       Apache::Session::Lock::MySQL - Provides mutual exclusion using MySQL
7

SYNOPSIS

9        use Apache::Session::Lock::MySQL;
10
11        my $locker = Apache::Session::Lock::MySQL->new();
12
13        $locker->acquire_read_lock($ref);
14        $locker->acquire_write_lock($ref);
15        $locker->release_read_lock($ref);
16        $locker->release_write_lock($ref);
17        $locker->release_all_locks($ref);
18

DESCRIPTION

20       Apache::Session::Lock::MySQL fulfills the locking interface of
21       Apache::Session.  Mutual exclusion is achieved through the use of
22       MySQL's GET_LOCK and RELEASE_LOCK functions.  MySQL does not support
23       the notion of read and write locks, so this module only supports
24       exclusive locks.  When you request a shared read lock, it is instead
25       promoted to an exclusive write lock.
26

CONFIGURATION

28       The module must know how to connect to your MySQL database to acquire
29       locks.  You must provide a datasource name, a user name, and a
30       password.  These options are passed in the usual Apache::Session style,
31       and are very similar to the options for Apache::Session::Store::MySQL.
32       Example:
33
34        tie %hash, 'Apache::Session::MySQL', $id, {
35            LockDataSource => 'dbi:mysql:database',
36            LockUserName   => 'database_user',
37            LockPassword   => 'K00l'
38        };
39
40       Instead, you may pass in an already opened DBI handle to your database.
41
42        tie %hash, 'Apache::Session::MySQL', $id, {
43            LockHandle => $dbh
44        };
45

AUTHOR

47       This module was written by Jeffrey William Baker <jwbaker@acm.org>.
48

SEE ALSO

50       Apache::Session
51
52
53
54perl v5.38.0                      2023-07-20 Apache::Session::Lock::MySQL(3pm)
Impressum