Debug builds give console warnings when populating the form history autocomplete dropdown. This is because we have an index on the "value" column, but the query is doing "ORDER BY UPPER(value)". MattN says we should be able to add an index for UPPER(value), which would fix this. Adding "/* do not warn (bug ###)*/" to the query will suppress the warning in the meantime, if we want to.
It turns out that SQLite does not support function-based indexes like I had thought. We are changing the query in bug 370117 and bug 446247 making it more complex which will make it even harder to index.
Is this still relevant? Should we just add the warning removal comment? Or did this get addressed by those other bugs?
Created attachment 703135 [details] [diff] [review] v.1 Simple patch to silence warning (In reply to :Gavin Sharp (away Jan 16-23) from comment #2) > Is this still relevant? Should we just add the warning removal comment? Or did > this get addressed by those other bugs? The query changed but we are still doing an ORDER BY on the result of function calls. There haven't been any reports of slow form history in the 3.5 years since the more complex query landed and there is caching in JS for narrowing down existing results so I think we can silence this warning. I also did performance benchmarks in 2009 and the results were acceptable at the time. AFAICT, SQLite still doesn't support function-based indexes.  https://mxr.mozilla.org/mozilla-central/source/toolkit/components/satchel/nsFormAutoComplete.js?rev=5ce71981e005#255