silverstripe/silverstripe-framework — pull request #3571 by dirx (2014-10-21 15:05:38+00:00)
Title: Fix for bug in SQLQuery when table name contains "select"

Description:

Tables like UserPreselection were not replaced with "UserPreselection". The missing " around table names lead to missing old/new replacement e.g. of versioned tables "UserPreselection" > "UserPreselection_Live". This fix looks explicitly for word SELECT in table name to do correct adding of " at start and end of table name.