[Asterisk-bugs] [Asterisk 0010075]: MS SQL 2005 escape character problem

noreply at bugs.digium.com noreply at bugs.digium.com
Fri Jul 6 10:49:48 CDT 2007


The following issue has been ASSIGNED. 
====================================================================== 
http://www.example.com/var/www/insects.digium.com/core/view.php?id=10075 
====================================================================== 
Reported By:                apsaras
Assigned To:                russell
====================================================================== 
Project:                    Asterisk
Issue ID:                   10075
Category:                   Core/Configuration
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
Asterisk Version:           1.4.5 
SVN Branch (only for SVN checkouts, not tarball releases): N/A  
SVN Revision (number only!):  
Disclaimer on File?:        No 
Request Review:              
====================================================================== 
Date Submitted:             06-27-2007 13:08 CDT
Last Modified:              07-06-2007 10:49 CDT
====================================================================== 
Summary:                    MS SQL 2005 escape character problem
Description: 
I am using Asterisk 1.4.5 with Realtime, unixODBC, freeTDS and MS SQL 2005.
I had some problems getting extensions to work from Database. After a trace
on SQL queries I found the problem. When the extension query is executed is
using \ as escape character at the exten column. Select * From extensions
Where exten like '\_%' .... 

SQL 2005 does not have a default escape character so you might do 
... like '[_]%' ...
 or
... like '\_%' ESCAPE '\'

Is that a freeTDS problem or Asterisk MS SQL implementation problem? 
====================================================================== 

---------------------------------------------------------------------- 
 svnbot - 07-06-07 10:49  
---------------------------------------------------------------------- 
Repository: asterisk
Revision: 73684

------------------------------------------------------------------------
r73684 | russell | 2007-07-06 10:49:48 -0500 (Fri, 06 Jul 2007) | 8 lines

(closes issue
http://www.example.com/var/www/insects.digium.com/core/view.php?id=10075)
Reported by: apsaras
Patches submitted by: Corydon76
Tested by: apsaras

Fix a problem with MSSQL 2005 by explicitly stating that '' is being used
as
an escape character.

------------------------------------------------------------------------ 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
07-06-07 10:49  svnbot         Checkin                                      
07-06-07 10:49  svnbot         Note Added: 0066606                          
07-06-07 10:49  svnbot         Status                   new => assigned     
07-06-07 10:49  svnbot         Assigned To               => russell         
======================================================================




More information about the Asterisk-bugs mailing list