[Asterisk-bugs] [Asterisk 0010205]: Results containing spaces from FETCH cause ast_yyerror()

noreply at bugs.digium.com noreply at bugs.digium.com
Sun Jul 15 11:48:58 CDT 2007


The following issue requires your FEEDBACK. 
====================================================================== 
http://bugs.digium.com/view.php?id=10205 
====================================================================== 
Reported By:                jamesb63
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   10205
Category:                   Addons/app_addon_sql_mysql
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     feedback
Asterisk Version:            SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  1.4  
SVN Revision (number only!): 75108M 
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             07-15-2007 09:54 CDT
Last Modified:              07-15-2007 11:48 CDT
====================================================================== 
Summary:                    Results containing spaces from FETCH cause
ast_yyerror()
Description: 
When executing a query and getting its result, a field in a mysql table
containing a space causes the following error:

[Jul 15 16:06:13] WARNING[30551]: ast_expr2.fl:398 ast_yyerror:
ast_yyerror():  syntax error: syntax error, unexpected '<token>', expecting
$end; Input:
 James Mobile
       ^

With the ^ under the M

The query is simply:

select cidname from caller_id where cidnum = '${CALLERID(num)}';

If I remoe the space in the table and replace with _ (underscore), the
problem goes away.

This may not be the right category to post the bug but it's a result of
using the MYSQL() command from the addons package that I found the problem.
====================================================================== 

---------------------------------------------------------------------- 
 Corydon76 - 07-15-07 11:48  
---------------------------------------------------------------------- 
Please paste in here the EXACT dialplan that is causing this error.  I
suspect that the problem is not in Asterisk, but that you aren't quoting an
argument with spaces. 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-15-07 11:48  Corydon76      Note Added: 0067385                          
07-15-07 11:48  Corydon76      Status                   new => feedback     
======================================================================




More information about the asterisk-bugs mailing list