FreeBSD Bugzilla – Attachment 240646 Details for
Bug 269966
net/vnstat: no longer works after databases/sqlite3 disabled DQS
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
enable DQS at run time
patch-src_dbsql.c (text/plain), 1.19 KB, created by
Henry
on 2023-03-07 19:28:29 UTC
(
hide
)
Description:
enable DQS at run time
Filename:
MIME Type:
Creator:
Henry
Created:
2023-03-07 19:28:29 UTC
Size:
1.19 KB
patch
obsolete
>--- src/dbsql.c.orig 2022-09-22 21:12:13 UTC >+++ src/dbsql.c >@@ -6,6 +6,8 @@ > /* global db */ > sqlite3 *db; > int db_errcode; >+int dqsddl_errcode; >+int dqsdml_errcode; > int db_intransaction; > > int db_open_ro(void) >@@ -20,7 +22,7 @@ int db_open_rw(const int createifnotfound) > > int db_open(const int createifnotfound, const int readonly) > { >- int rc, createdb = 0; >+ int rc, dqsddlrc, dqsdmlrc, createdb = 0; > char dbfilename[530]; > > #ifdef CHECK_VNSTAT >@@ -72,6 +74,26 @@ int db_open(const int createifnotfound, const int read > } else { > if (debug) > printf("Database \"%s\" open (ro: %d)\n", dbfilename, readonly); >+ } >+ >+ dqsddl_errcode = 0; >+ dqsddlrc = sqlite3_db_config(db, SQLITE_DBCONFIG_DQS_DDL, 1, NULL); >+ >+ if (dqsddlrc) { >+ dqsddl_errcode = dqsdmlrc; >+ if (debug) >+ printf("Error (debug): Can't set DQS DDL on connection to \"%s\": %s\n", dbfilename, sqlite3_errmsg(db)); >+ return 0; >+ } >+ >+ dqsdml_errcode = 0; >+ dqsdmlrc = sqlite3_db_config(db, SQLITE_DBCONFIG_DQS_DML, 1, NULL); >+ >+ if (dqsdmlrc) { >+ dqsddl_errcode = dqsdmlrc; >+ if (debug) >+ printf("Error (debug): Can't set DQS DML on connection to \"%s\": %s\n", dbfilename, sqlite3_errmsg(db)); >+ return 0; > } > > if (createdb) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 269966
:
240587
| 240646 |
240750