Skip to content

Commit

Permalink
ACTIVERECORD_JDBC-148: Ensure regex doesn't match 'from' in a field name
Browse files Browse the repository at this point in the history
  • Loading branch information
nicksieger committed Jun 17, 2011
1 parent 066f14c commit e1dbbc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/arjdbc/mssql/limit_helpers.rb
Expand Up @@ -5,7 +5,7 @@ module LimitHelpers
def get_table_name(sql)
if sql =~ /^\s*insert\s+into\s+([^\(\s,]+)\s*|^\s*update\s+([^\(\s,]+)\s*/i
$1
elsif sql =~ /from\s+([^\(\s,]+)\s*/i
elsif sql =~ /\bfrom\s+([^\(\s,]+)\s*/i
$1
else
nil
Expand Down

0 comments on commit e1dbbc2

Please sign in to comment.