Indexes SQL errors.

#1346