MySQL 5: Web Session Management with Stored Procs
So, here is an implementation of a web session (cookie based) system using stored procedures:
http://www.james.rcpt.to/programs/mysql/5websessions/
I was planning on using triggers on the session table to generate updates to the user table (last login time, last access time), however it seems you cant launch a trigger from within a stored procedure. Perhaps. At least, when I tired it, MySQL told me the table was locked for READ, so now the login() and cookie_session() procedures I have written to these updates tot he user table themseleves.
I am sure this is the start of many implementations like this. Yay for stored procs! I was thinking of modifying the cookie_session() proc so that it randomly called the clean_sessions() proc (say, 1% of the time that cookie_session() is called).
Feedback and suggestions welcomed.
James Bromberger,
http://www.james.rcpt.to
Subject
Views
Written By
Posted
MySQL 5: Web Session Management with Stored Procs
4040
April 06, 2005 08:29AM
2250
April 06, 2005 10:00AM
2375
April 06, 2005 10:07AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.