--- libdbi-drivers-0.8.3-1.orig/drivers/sqlite3/dbd_sqlite3.c 2008-03-03 12:32:26.000000000 -0500 +++ libdbi-drivers-0.8.3-1.orig/drivers/sqlite3/dbd_sqlite3.c 2012-01-22 09:52:00.548705668 -0500 @@ -130,6 +130,7 @@ const char *encoding; int timeout; + dbi_result dbi_result; /* initialize error stuff */ conn->error_number = 0; @@ -227,7 +228,13 @@ timeout = 0; } - sqlite3_busy_timeout(sqcon, timeout); + sqlite3_busy_timeout(sqcon, timeout); + + /* this is required to make SQLite work like other database engines + in that it returns the column information even if there are no + rows in a result set */ + dbi_result = dbd_query(conn, "PRAGMA empty_result_callbacks=1"); + return 0; }