NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL concurrency 101

David Sklar sklar at sklar.com
Thu Dec 11 16:59:04 EST 2003


>>> Ooh, now that's got class!
>>
>> If you want to be *really* classy, poke around in the source to diff:
>> --> ftp://ftp.gnu.org/pub/gnu/diffutils/diffutils-2.8.1.tar.gz
>>
>> And then add a function to PHP to do this without calling an external
>> program...!
>
> It would be even cooler to write a UDF to do this automagically. I
> wonder if that's possible.

AFAIK, UDFs can't (or, more specifically, shouldn't) access data other than
the specific arguments they're passed. So I think the answer is no.

You definitely can't, from within a UDF, begin a transaction or table lock
that applies retroactively to include the current query that fired off the
UDF.

> Sounds like a fun hack.

Absolutely, either way (PHP or MySQL)

David




More information about the talk mailing list