An SQL NULL value in an SQLite database is correctly returned in the results as having the javascript null type, which (in file DatabasesPanel.js, function _tableForResult ) either causes the div.textContent or the text.length to throw an exception. The fix is to check for null and then reassign the text value, possible adding a new classname to the div as in: --- DatabasesPanel.js 2008/05/01 22:48:06 1.1 +++ DatabasesPanel.js 2008/05/01 22:51:23 1.2 @@ -204,6 +204,10 @@ var text = row[column]; var div = document.createElement("div"); + if ( text == null ) { + text = "NULL" + div.className = "sql_null"; + } div.textContent = text; div.title = text; td.appendChild(div); To make use of the className = "sql_null", append the following to inspector.js: .sql_null { text-align: center; color: #faa; }
Please submit a patch using the instructions at <http://webkit.org/coding/contributing.html>. Our code style guidelines are available at <http://webkit.org/coding/coding-style.html>.
Created attachment 20919 [details] Proposed patch
Comment on attachment 20919 [details] Proposed patch r=me
Comment on attachment 20919 [details] Proposed patch Sorry. This patch was great, but it wasn't landed. Now the Databases panel has changed too much to land it. It's now using a DataGrid class. I couldn't figure out exactly how to merge this or if the code has this issue any more. For now, setting review to review-. We can close this bug if it's already fixed, or rework the patch if not.
Created attachment 21578 [details] patch + changelog
Comment on attachment 21578 [details] patch + changelog r=me The original patch had special formatting for null values. Did you decide that wasn't worthwhile?
(In reply to comment #6) > The original patch had special formatting for null values. Did you decide that > wasn't worthwhile? It probably is worthwhile, but I didn't want to add that while fixing this bug. I'll file a new bug about special formatting and add a FIXME. Thanks!
(In reply to comment #7) > I'll file a new bug about special formatting Bug 19439
Committed in r34456