Bug 1194023 - Part 1: Filter out warnings about sort operations on CREATE INDEX statements. r=mak

This commit is contained in:
Eric Rahm 2015-09-25 15:27:48 -07:00
parent e802150ad2
commit 851d21cbb6

View File

@ -94,6 +94,11 @@ checkAndLogStatementPerformance(sqlite3_stmt *aStatement)
if (::strstr(sql, "/* do not warn (bug "))
return;
// CREATE INDEX always sorts (sorting is a necessary step in creating
// an index). So ignore the warning there.
if (::strstr(sql, "CREATE INDEX") || ::strstr(sql, "CREATE UNIQUE INDEX"))
return;
nsAutoCString message("Suboptimal indexes for the SQL statement ");
#ifdef MOZ_STORAGE_SORTWARNING_SQL_DUMP
message.Append('`');