Permalink
Browse files

Bug fixes in SQL Tokenizer.

  • Loading branch information...
1 parent 171ae48 commit fb92b5e9fd2990289895e7271b6ed22f978d9276 @ggeurts ggeurts committed with hazzik Jul 18, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/NHibernate/SqlCommand/Parser/SqlTokenizerExtensions.cs
@@ -62,16 +62,15 @@ public static bool TryParseUntilFirstMsSqlSelectColumn(this IEnumerator<SqlToken
// [ TOP { integer | ( expression ) } [PERCENT] [ WITH TIES ] ]
if (tokenEnum.Current.Equals("top", StringComparison.InvariantCultureIgnoreCase))
{
- if (tokenEnum.MoveNext()) return false;
+ if (!tokenEnum.MoveNext()) return false;
if (tokenEnum.Current.TokenType == SqlTokenType.BracketOpen)
{
do
{
if (!tokenEnum.MoveNext()) return false;
} while (tokenEnum.Current.TokenType != SqlTokenType.BracketClose);
}
- if (tokenEnum.MoveNext()) return false;
-
+ if (!tokenEnum.MoveNext()) return false;
if (tokenEnum.Current.Equals("percent", StringComparison.InvariantCultureIgnoreCase))
{

0 comments on commit fb92b5e

Please sign in to comment.