[HELP} - Table Locking via MYSQL in dial plan

Hello:

I was trtying to use the MYSQL interface from the dial plan to LOCK and UNLOCK a table in a MSQL database.

The “LOCK” portion appears to work !

Strangley, I cannot get the UNLOCK portion to work.

Below is the relevant poertion of the extensions.conf and the DEBUG from the Asterisk CLi from the execution.

Am I missing something simple here or is this a BUG ??

Any thought/suggestions appreciatted.

============================ extensions.conf =======
exten => 18008888888,1,Playback(you-have-reached-a-test-number)
exten => 18008888888,n,MYSQL(Connect connid localhost root mawxxx NAM_DB)
exten => 18008888888,n,MYSQL(Query resultid ${connid} LOCK\ TABLES\ AGENT\ WRITE)
exten => 18008888888,n,MYSQL(Query resultid ${connid} SELECT\ FIRST_NAME\ ‘,’\ LAST_NAME\ FROM\ AGENT\ WHERE\ AGENT_NUMBER=260276888)
exten => 18008888888,n,MYSQL(Query resultid ${connid} UNLOCK\ TABLES)
exten => 18008888888,n,MYSQL(Disconnect ${connid})
exten => 18008888888,n,SayAlpha( ${firstname} )

================== CLI DEBUG =============================
– Executing Playback(“SIP/mark-096ab690”, “you-have-reached-a-test-number”) in new stack
– Playing ‘you-have-reached-a-test-number’ (language ‘en’)
– Executing MYSQL(“SIP/mark-096ab690”, “Connect connid localhost root mawxxx NAM_DB”) in new stack
[color=red] – Executing MYSQL(“SIP/mark-096ab690”, “Query resultid 11 LOCK TABLES AGENT WRITE”) in new stack[/color]
– Executing MYSQL(“SIP/mark-096ab690”, “Query resultid 11 SELECT FIRST_NAME , LAST_NAME FROM AGENT WHERE AGENT_NUMBER=260276888”) in new stack
– Executing MYSQL(“SIP/mark-096ab690”, “Fetch foundRow 12 firstname lastname”) in new stack
[color=red] – Executing MYSQL(“SIP/mark-096ab690”, “Query resultid 11 UNLOCK TABLES”) in new stack
Nov 2 23:33:20 WARNING[2285]: app_addon_sql_mysql.c:275 aMYSQL_query: aMYSQL_query: mysql_store_result() failed on query UNLOCK TABLES[/color]
– Executing MYSQL(“SIP/mark-096ab690”, “Disconnect 11”) in new stack
– Executing SayAlpha(“SIP/mark-096ab690”, " Alice ") in new stack

run into this problem ?