Skip to content

Commit 5c427c0

Browse files
committed
v3.2.663 #1155
1 parent 6e8d725 commit 5c427c0

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</PropertyGroup>
1010

1111
<PropertyGroup>
12-
<Version>3.2.666-preview20220612</Version>
12+
<Version>3.2.663</Version>
1313
</PropertyGroup>
1414

1515
<ItemGroup>

FreeSql/Internal/CommonProvider/SelectProvider/Select0Provider.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public abstract partial class Select0Provider
2121
public string _select = "SELECT ", _orderby, _groupby, _having;
2222
public StringBuilder _where = new StringBuilder();
2323
public List<DbParameter> _params = new List<DbParameter>();
24+
public List<DbParameter> _paramsInit;
2425
public List<SelectTableInfo> _tables = new List<SelectTableInfo>();
2526
public List<Func<Type, string, string>> _tableRules = new List<Func<Type, string, string>>();
2627
public Func<Type, string, string> _tableRule => _tableRules?.FirstOrDefault();
@@ -46,12 +47,17 @@ public abstract partial class Select0Provider
4647
public Func<bool> _cancel;
4748
public bool _is_AsTreeCte;
4849

50+
public Select0Provider()
51+
{
52+
_paramsInit = _params;
53+
}
54+
4955
int _disposeCounter;
5056
~Select0Provider()
5157
{
5258
if (Interlocked.Increment(ref _disposeCounter) != 1) return;
5359
_where.Clear();
54-
//_params.Clear(); 子查询与主查询共享,并发导致错误清除了主查询参数化信息 https://github.com/dotnetcore/FreeSql/issues/1155
60+
if (_paramsInit == _params) _params.Clear(); //子查询与主查询共享,并发导致错误清除了主查询参数化信息 https://github.com/dotnetcore/FreeSql/issues/1155
5561
_tables.Clear();
5662
_tableRules.Clear();
5763
_join.Clear();

0 commit comments

Comments
 (0)