On Fri, Mar 30, 2001 at 05:51:33PM -0500, barries wrote:
> On Fri, Mar 30, 2001 at 11:45:52AM -0800, Dana Prescott Kennedy Powers wrote:
> > perl('reverse($_[0]);', table1.column1); ). I have convinced myself that
> > creating a perl extention ( similar to mod_perl's relationship to
> > mysql ) is possible - Ive done it ;) - and can be done in a clean and
> > stable way.
>
> Too cool. If we can figure out how to pull source code from a
> "triggers" table in the daemon, we're set. All we need do is write some
> trigger classes that take a hunk of perl code (loaded from a table) and
> compile it and call it.
Just to clarify, here's a prototype trigger table (I see them in
individual databases, but there's an argument for putting them in the
mysql database):
mysql> describe trigger ;
+-----------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-----------+--------------+------+-----+---------+-------+
| Db | varchar(255) | | | | |
| TableName | varchar(255) | | | | |
| Enabled | int(11) | | | 0 | |
| Language | varchar(255) | | | | |
| Source | blob | YES | | NULL | |
+-----------+--------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
- Barrie