[ 
https://issues.apache.org/jira/browse/GROOVY-10547?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King closed GROOVY-10547.
------------------------------

> Sql.java namedParamSqlCache map is getting populated despite the 
> cacheNamedQueries flag
> ---------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10547
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10547
>             Project: Groovy
>          Issue Type: Bug
>          Components: SQL processing
>    Affects Versions: 2.5.16, 3.0.10, 4.0.0, 4.0.1
>            Reporter: Filip Štimac
>            Assignee: Paul King
>            Priority: Minor
>             Fix For: 6.0.0-alpha-1
>
>
> Flag cacheNamedQueries is used to enable/disable named query caching, but 
> doesn't properly disable caching when false. 
> Issue is that cache maps are having new data inserted in them regardless of 
> the flag value.
>  
> Master branch: In class groovy.sql.Sql:4567-4575:
> {code:java}
>         if (cacheNamedQueries && namedParamSqlCache.containsKey(sql)) {
>             newSql = namedParamSqlCache.get(sql);
>             propList = namedParamIndexPropCache.get(sql);
>         } else {
>             ExtractIndexAndSql extractIndexAndSql = 
> ExtractIndexAndSql.from(sql);
>             newSql = extractIndexAndSql.getNewSql();
>             propList = extractIndexAndSql.getIndexPropList();
>             namedParamSqlCache.put(sql, newSql);
>             namedParamIndexPropCache.put(sql, propList);
>         }
> {code}
>  
> When cacheNamedQueries is false, namedParam*Cache maps shouldn't be filled 
> with data.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to