Affects Version/s: 2.0
Fix Version/s: 2.0
Component/s: Core CiviCRM
To recreate, to to Admin CiviCRM >> Gender Options and try to delete "Transgender". You'll get the following invalid query:
WHERE ( .gender_id = 4 )
Pretty sure the problem is in Core/BAO/OptionValue.php, updateRecords. So once you fix please verify a few of the other option groups that are handled by this function.