Skip to content

Commit 9594115

Browse files
committed
Send the fetched signal in RowLoader even when no rows where fetched
Always send the fetched() signal when a RowLoader thread has finished a fetch task. Before this the signal was only sent when some data was actually retrieved from the task. This fixes some rare problems in the Execute SQL tab where the query for determining the row count of a SELECT statement changes something, so the subsequent row loading task does not return any rows after all. The only case I know of is when loading an extension using the 'SELECT load_extension()' function. The load_extension function is actually called twice when SQLite for some reason reports that rows where returned from this statement. These calls are: SELECT COUNT(*) FROM (SELECT load_extension('...')); SELECT load_extension('...'); After the first call is executed, the extension is loaded. So the second call does not return any rows and we indefinitely wait for the rows we expect. Strangely enough this only happens for some extensions. The change here should have no side effects becaue the signal is only connected to one slot which skips most steps when no rows where fetched. See issue #1932.
1 parent b17755c commit 9594115

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/RowLoader.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,5 @@ void RowLoader::process (Task & t)
255255
sqlite3_finalize(stmt);
256256
}
257257

258-
if(row != t.row_begin)
259-
emit fetched(t.token, t.row_begin, row);
258+
emit fetched(t.token, t.row_begin, row);
260259
}

0 commit comments

Comments
 (0)