Here it is one patch and one file to remove all statements and SQL
queries from db.c file.
Statements are now a gchar* table named DbStatement (db_private.h).
GHashTable is also removed (less memory consumption) and
db_prepare_stmt is called on each statement call.
Most of SQL queries are in another table (DbQuery). The db.c code is
much more readable.
To get a statement you should write: DbStatement[myStatement]
To get a SQL query you shoud write: DbQuery[mySQLQuery]
Both myStatement and mySQLQuery are integers declared in two enumerations.
Some queries are merged : index creations, drop triggers, etc.
I'm sorry for the delay. I have my job and those modifications were
tested during a week long.
If this patch is accepted, I'll start working to split comment from
items and I'll do some db improvement.
If this path is not accepted, I'll start working to split... :)