Search

sys.sp_fulltext_load_thesaurus_file fails sometimes due to error by Michael Zilberstein

Closed

5
1
Sign in
to vote
Type: Bug
ID: 779257
Opened: 2/14/2013 2:59:11 PM
Access Restriction: Public
0
Workaround(s)
1
User(s) can reproduce this bug
Caught following error messages in SQL Server error log:
Procedure sp_fulltext_load_thesaurus_file, Line 41, Message: The data type of substitution parameter 1 does not match the expected type of the format specification.

sys.sp_fulltext_load_thesaurus_file contains following code block (@lcid is input variable to the procedure, its datatype is INT):

    IF (@thesaurusFilePath IS NULL)
    BEGIN
        RAISERROR(30048, 16, 1, @lcid)
    END

Simple execution of the following code fails:
DECLARE @lcid INT =15;
RAISERROR(30048, 16, 1, @lcid);

Error message is:
Msg 2786, Level 16, State 1, Line 2
The data type of substitution parameter 1 does not match the expected type of the format specification.

And indeed, if we query sys.messages for message_id = 30048, we'll see that it expects 2 substitute variables, first of them string and only second int. So following code works fine:

DECLARE @lcid INT =15
RAISERROR(30048, 16, 1, 'abcd', @lcid)

Checked the issue for SQL Server 2008 R2 SP2 and for SQL Server 2012 - same bug in both.
Details (expand)

Product Language

English

Version

SQL Server 2012 - Enterprise Edition

Category

SQL Engine

Operating System

Windows Server 2008 R2 (all editions)

Operating System Language

US English

Steps to Reproduce

It is internal procedure, so you should somehow cause the situation when
    SELECT @thesaurusFilePath = thesaurus_file_path
    FROM sys.fn_ft_thesaurus_files()
    WHERE lcid = @lcid

doesn't return anything.

Actual Results

Msg 2786, Level 16, State 1, Line 2
The data type of substitution parameter 1 does not match the expected type of the format specification.

Expected Results

Msg 30048, Level 16, State 1, Line 2
Informational: Ignoring duplicate thesaurus rule 'abcd' while loading thesaurus file for LCID 15. A duplicate thesaurus phrase was encountered in either the <sub> section of an expansion rule or the <pat> section of a replacement rule. This causes an ambiguity and hence this phrase will be ignored.

Platform

X64

Virtualization

 
File Attachments
0 attachments
Sign in to post a comment.
Posted by IbexMark on 5/8/2013 at 10:42 AM
Very sad that the bug would be closed when such a simple fix could be made. I suspect that it is generally not reported as it tends not to cause much harm except when you are tracking another bug and it tends to lead you down the wrong path for a few hours
Posted by Microsoft on 4/23/2013 at 7:33 PM
Dear Michael,
Thank you for submitting this feedback. After carefully evaluating all of the bugs in our pipeline, we are closing bugs that we will not fix in the current or future versions of SQL Server. The reasons for closing these bugs are following:
1.     The fix is risky to implement in the current version of the product (service packs)
2.     Scenarios reported in the bug are not common enough
3.     A viable workaround is available

If the scenario become more common, the bug may be reactivated.

Thanks again for reporting the product issue and continued support in improving our product.
Michael
Posted by Microsoft on 3/27/2013 at 2:21 PM
Thanks for your feedback; we will look into this issue
Sign in to post a workaround.