DL6ER
|
894598e89d
|
make sure we initilize the database mutex at the beginning of db_init() to ensure we always have the lock available.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-08-04 18:50:38 +02:00 |
|
DL6ER
|
0a78b27698
|
Merge pull request #624 from pi-hole/tweak/bbusy_timeouts
Add database busy timeouts
|
2019-07-21 22:15:03 +02:00 |
|
Mcat12
|
32f603d398
|
Fix accidental formatting change
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
|
2019-07-21 13:01:05 -07:00 |
|
Mcat12
|
c07be92210
|
Remove dbquery macro in favor of just using the function
This avoids unused return value warnings.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
|
2019-07-21 12:57:56 -07:00 |
|
Mcat12
|
b2f9339db7
|
Add dbquery_ret for getting the DB return code from a query
Also change the ARP parsing to only warn if the database is busy, as it
executes each minute by default.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
|
2019-07-21 12:43:06 -07:00 |
|
DL6ER
|
b21b551a52
|
Add busy timeout for database connections.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-21 21:43:03 +02:00 |
|
Mcat12
|
ab2bfcb167
|
Move SQL error logging from macros to dbquery
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
|
2019-07-21 12:06:00 -07:00 |
|
Mcat12
|
7864480884
|
Fix failure during parse_neighbor_cache not unlocking shared memory
Also log the SQL statement that failed in the macro.
Signed-off-by: Mcat12 <newtoncat12@yahoo.com>
|
2019-07-21 11:47:45 -07:00 |
|
Mark Drobnak
|
7671fe9e2e
|
Merge pull request #608 from pi-hole/new/use_audit_database_table
Use database table for domain auditlog
|
2019-07-10 22:57:04 -04:00 |
|
DL6ER
|
8e0016e0bd
|
Audit table has been renamed to domain_audit.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-07 21:24:47 +02:00 |
|
Mark Drobnak
|
ac1018aa2a
|
Merge pull request #610 from pi-hole/tweak/database_error_checking
Database error checking
|
2019-07-07 15:04:35 -04:00 |
|
DL6ER
|
a5ea558d5a
|
Merge branch 'new/modularize_headers' into new/use_audit_database_table
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-07 10:09:54 +02:00 |
|
DL6ER
|
5c75fc3e67
|
Move even more definitions from FTL.h into the respective headers.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-07 10:09:18 +02:00 |
|
DL6ER
|
812743c687
|
The boolean database should not be set to true at the end of delete_old_queries_in_DB(). The function can in any way not be called when database == false as this is an exit criterion for the database thread.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-07 09:48:41 +02:00 |
|
DL6ER
|
4a9503cbf7
|
Move checking of database parameter MAXDBDAYS into db_init() to ensure we set database to false.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-07 09:45:12 +02:00 |
|
DL6ER
|
71d9caad43
|
No need to use heap space for a constant expression.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-06 17:45:05 +02:00 |
|
DL6ER
|
444255b688
|
Do not assume the database is not available before we actually hit an error.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-06 17:19:41 +02:00 |
|
DL6ER
|
799e3b4230
|
Reduce three-fold logging of SQL errors to logging them only once. We prefer to handle the logging through the SQLite3 error callback as this ensures it cannot be missed.
Previously:
[2019-07-06 17:00:55.526 32339] SQLite3 message: statement aborts at 36: [CREATE UNIQUE INDEX network_hwaddr_idx ON network(hwaddr)] attempt to write a readonly database (8)
[2019-07-06 17:00:55.526 32339] dbquery(CREATE UNIQUE INDEX network_hwaddr_idx ON network(hwaddr)) - SQL error (8): attempt to write a readonly database
[2019-07-06 17:00:55.526 32339] check_database(8): Disabling database connection due to error
[2019-07-06 17:00:55.526 32339] unify_hwaddr(): "CREATE UNIQUE INDEX network_hwaddr_idx ON network(hwaddr)" failed!
Now:
[2019-07-06 17:00:55.526 32339] SQLite3 message: statement aborts at 36: [CREATE UNIQUE INDEX network_hwaddr_idx ON network(hwaddr)] attempt to write a readonly database (8)
[2019-07-06 17:00:55.526 32339] check_database(8): Disabling database connection due to error
[2019-07-06 17:00:55.526 32339] ERROR: unify_hwaddr() failed!
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-06 17:10:20 +02:00 |
|
DL6ER
|
8baf8e6022
|
Improve error handling and logging in database/common.c
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-06 17:03:23 +02:00 |
|
DL6ER
|
c944705d52
|
Table auditlist has been renamed to domain_auditlist.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-06 09:34:50 +02:00 |
|
DL6ER
|
30357a5e5d
|
Audit table name should be 'auditlog'
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-05 17:11:04 +02:00 |
|
DL6ER
|
09b8f91617
|
Check audit database table instead of file in the API.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-05 16:30:07 +02:00 |
|
DL6ER
|
40a75c25fb
|
Remove extra space.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-05 12:09:50 +02:00 |
|
DL6ER
|
8280f454a8
|
Change type of get_FTL_db_filesize() from double to long int.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-05 12:05:32 +02:00 |
|
DL6ER
|
104ea1b86a
|
Move database thread into dedicated module.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-04 16:52:17 +02:00 |
|
DL6ER
|
a2961d14a4
|
Merge branch 'development' into new/modularize_headers
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-04 12:21:51 +02:00 |
|
DL6ER
|
e365364f72
|
Move all source files into new subdirectory "src". Put compiled objects into new subdirectory "build".
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2019-07-02 00:18:56 +02:00 |
|