[ZBX-2143] compilation fails with sqlite Created: 2010 Mar 11  Updated: 2017 May 30  Resolved: 2010 Mar 11

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P)
Affects Version/s: None
Fix Version/s: 1.8.2, 1.9.0 (alpha)

Type: Incident report Priority: Blocker
Reporter: richlv Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   
$wordView.getRenderedContent('description', $issue.description, $issue)

 Comments   
Comment by Aleksandrs Saveljevs [ 2010 Mar 11 ]

Fixed in r10718 in svn://svn.zabbix.com/branches/dev/zbx-2143-sqlite-compilation .

The reason sqlite3_open() was replaced by sqlite3_open_v2(..., SQLITE_OPEN_READWRITE, ...) was that sqlite3_open() creates an empty database file if it does not exist and there seems to be no way to override this behavior. Now that we reverted back to using sqlite3_open(), the server will not complain about the missing database file, but will then write lots of "query failed" messages to the log, like so:

19328:20100311:114424.186 [Z3005] Query failed: [0] no such table: escalations [select escalationid,actionid,triggerid,eventid,r_eventid,esc_step,status from escalations where status in (0,1) and nextcheck<=1268300664 and escalationid between 000000000000000 and 099999999999999]

Comment by Aleksandrs Saveljevs [ 2010 Mar 11 ]

For future reference, sqlite3_open_v2() and SQLITE_OPEN_READWRITE are absent from sqlite3.h version 3.4.2, but are present in sqlite3.h version 3.5.9.

Comment by richlv [ 2010 Mar 11 ]

could server check whether _v2 is available and use it if so ?

Comment by richlv [ 2010 Mar 11 ]

confirming the fix in dev branch, rev 10733

Comment by Aleksandrs Saveljevs [ 2010 Mar 15 ]

Will implement detection of sqlite_open_v2() in configure.

Comment by Aleksandrs Saveljevs [ 2010 Mar 17 ]

Available in pre-1.8.2 in r10868.

Generated at Wed Jan 07 19:06:48 EET 2026 using Jira 10.3.13#10030013-sha1:56dd970ae30ebfeda3a697d25be1f6388b68a422.