Hi. I was recently hired to be the lead developer at a small web hosting company. Our server is Apache/1.3.34 (Unix) JRun/4.0. Coldfusion is CFMX7. Database is MySQL 4.1.20-standard.
I have verified that CFTRANSACTION is not supported by MySQL 4. Perhaps my predecessor realized this because these are wrapped in CFLOCKS.
The strange thing is the locks are neither named nor scoped. The typical insert code looks like this:
<cflock timeout="10">
<cftransaction>
<cfquery name="AddTo" datasource="#ds#">
INSERT INTO users ...
</cfquery>
<cfquery name="getID" datasource="#ds#">
SELECT Max(UserID) As MaxID
FROM users
</cfquery>
</cftransaction>
</cflock>
I verified that CFTRANSACTION doesn't work by altering the second query to fail. The INSERT happens even when the SELECT fails.
So what about that CFLOCK? Does the server just ignore it?
I have verified that CFTRANSACTION is not supported by MySQL 4. Perhaps my predecessor realized this because these are wrapped in CFLOCKS.
The strange thing is the locks are neither named nor scoped. The typical insert code looks like this:
<cflock timeout="10">
<cftransaction>
<cfquery name="AddTo" datasource="#ds#">
INSERT INTO users ...
</cfquery>
<cfquery name="getID" datasource="#ds#">
SELECT Max(UserID) As MaxID
FROM users
</cfquery>
</cftransaction>
</cflock>
I verified that CFTRANSACTION doesn't work by altering the second query to fail. The INSERT happens even when the SELECT fails.
So what about that CFLOCK? Does the server just ignore it?