| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
(cherry picked from commit 2613675111387fb0753d31be74b5e0a362389ef8)
|
|
|
|
| |
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
localtime
All CURRENT_TIMESTAMP calls are returned in UTC/GMT, and this value is stored in the
database. When using eurephiadm to look at these datetime fields the UTC/GMT value
is used, and needs to be taken in consideration when looking at the reports. This
patch is the first step to handle the local time zone better.
This patch also fixes the 'debug' program in sqlite.c, making use of the
eurephia_log_init() and eurephia_log_close() calls for log preparations.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The core sqlite_query() function will now always return a pointer to a
dbresult structure. This structure now contains a query status and
the error message from the sqlite3 backend if something went wrong.
This means that error checking from now on should use the
sqlite_query_status() macro and not to check if sqlite_query() returns
NULL.
Another fundamental change is that sqlite_free_results() must always be
called on the dbresult structure now, to free the memory used by either
data from the query or the error message.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
|
| |
|
|
|
|
| |
Also fixed some wrong tab/space issues
|
| |
|
| |
|
|
|
|
| |
queries than SELECT
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The callback function do now get a pointer to the query results directly instead
of using a global result pointer. This makes queries done in parallel a lot safer.
Made the SQLITE_DEBUG main() function more generic and removed memwatch references
which is no longer in use, as valgrind is much better and easier to use.
|
| |
|
| |
|
|
|
|
| |
This also improves debugging as well, if debug logging is enabled and log level is >= 40.
|
| |
|
| |
|
| |
|
|
|
|
| |
queries
|
|
|
|
| |
Follow up of commit ff744b48fdc0665b620339d51424892def8d8071
|
|
|
|
|
|
| |
Do proper conversion from char * to xmlChar *. Need to figure out a
better way how to return xmlChar * to char * when returning strings
which may contain UTF-8.
|
| |
|
|
|
|
|
| |
Made sure we only include needed include files and checked that
the copyright headers are equal and correct
|
| |
|
| |
|
|
|
|
|
| |
The last argument to the function can contain a list over field names
which will be used in the ORDER BY clause when doing SELECT queries.
|
| |
|
|
|
|
| |
sqlite_query_mapped(...)
|
| |
|
| |
|
|
|
|
| |
possibility for table aliases
|
|
|
|
|
| |
And added support for setting fields to NULL if flagged via
the field type value ft_SETNULL
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sqlite_query_mapped(...) function
The new sqlite_query_mapped(...) function will now consider the field
type when formatting the data values for SQLite. In addition reserved
words on the DATETIME data type will be preserved without quote
encapsulation.
Improved the sqlite_query_mapped(...) to also handle UPDATE, INSERT and
DELETE in addition to SELECT. The function now needs two eDBfieldMap
mappings. The first one will contain update/insert values, while the
last one defines search criteria.
|
|
|
|
|
|
|
| |
This functions does almost the same as sqlite_query(...), it takes an
SQL statement without the WHERE clause. The where clause is built up
based on the fields sent in via the eDBfieldMap struct, containing the
fields and values to look for.
|
|
|
|
| |
context type.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
is sent to make.
Since several parts of the code where LOG_DEBUG was used with eurephia_log(...)
contains security sensitive information (like logging password retrieved with
get_env(...)), all debug logging is now done via the DEBUG macro.
This macro will not produce any security relevant eurephia_log(...) statements
unless the source is compiled with -DENABLE_DEBUG. This is activated via
make by adding DEBUG=1 before the make targets. When not enabled, the
binaries will not do any debug logging at all.
|
| |
|
|
|
|
| |
of memwatch and sha1
|
|
|