@@ -153,10 +153,10 @@ internal static List<CachedParameter> ParseParameters(string parametersSql)
153
153
return [ ] ;
154
154
155
155
// strip precision specifier containing comma
156
- parametersSql = s_numericTypes . Replace ( parametersSql , @ "$1") ;
156
+ parametersSql = s_numericTypes . Replace ( parametersSql , "$1" ) ;
157
157
158
158
// strip enum values containing commas (these would have been stripped by ParseDataType anyway)
159
- parametersSql = s_enum . Replace ( parametersSql , "ENUM " ) ;
159
+ parametersSql = s_enumOrSet . Replace ( parametersSql , "$1 " ) ;
160
160
161
161
var parameters = parametersSql . Split ( ',' ) ;
162
162
var cachedParameters = new List < CachedParameter > ( parameters . Length ) ;
@@ -195,7 +195,7 @@ internal static string ParseDataType(string sql, out bool unsigned, out int leng
195
195
{
196
196
sql = s_characterSet . Replace ( sql , "" ) ;
197
197
sql = s_collate . Replace ( sql , "" ) ;
198
- sql = s_enum . Replace ( sql , "ENUM " ) ;
198
+ sql = s_enumOrSet . Replace ( sql , "$1 " ) ;
199
199
200
200
length = 0 ;
201
201
var match = s_length . Match ( sql ) ;
@@ -260,7 +260,7 @@ private static CachedParameter CreateCachedParameter(int ordinal, string? direct
260
260
private static readonly Regex s_singleLineComments = new ( @"(^|\s)--.*?$" , RegexOptions . Multiline ) ;
261
261
private static readonly Regex s_multipleSpaces = new ( @"\s+" ) ;
262
262
private static readonly Regex s_numericTypes = new ( @"(DECIMAL|DEC|FIXED|NUMERIC|FLOAT|DOUBLE PRECISION|DOUBLE|REAL)\s*\([0-9]+(,\s*[0-9]+)\)" , RegexOptions . CultureInvariant | RegexOptions . IgnoreCase ) ;
263
- private static readonly Regex s_enum = new ( @"ENUM\s*\([^)]+\)" , RegexOptions . CultureInvariant | RegexOptions . IgnoreCase ) ;
263
+ private static readonly Regex s_enumOrSet = new ( @"( ENUM|SET) \s*\([^)]+\)" , RegexOptions . CultureInvariant | RegexOptions . IgnoreCase ) ;
264
264
private static readonly Regex s_parameterName = new ( @"^(?:`((?:[\u0001-\u005F\u0061-\uFFFF]+|``)+)`|([A-Za-z0-9$_\u0080-\uFFFF]+)) (.*)$" ) ;
265
265
private static readonly Regex s_characterSet = new ( " (CHARSET|CHARACTER SET) [A-Za-z0-9_]+" , RegexOptions . CultureInvariant | RegexOptions . IgnoreCase ) ;
266
266
private static readonly Regex s_collate = new ( " (COLLATE) [A-Za-z0-9_]+" , RegexOptions . CultureInvariant | RegexOptions . IgnoreCase ) ;
0 commit comments