Download it now!
Bug 68675 - ODBC: support arbitrarily-sized bookmarks
Summary: ODBC: support arbitrarily-sized bookmarks
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
(earliest affected) Master
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Keywords: difficultyInteresting, easyHack, skillCpp, skillSql
Depends on:
Blocks: Database-Connectivity
  Show dependency treegraph
Reported: 2013-08-28 17:35 UTC by Lionel Elie Mamane
Modified: 2017-02-14 08:57 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2013-08-28 17:35:29 UTC
Currently, LibreOffice allocates (in ODBC connections) a buffer of size 20 for bookmarks. This usually suffices, but there is no guarantee that it does.

The size is set in connectivity/source/drivers/odbcbase/OResultSet.cxx:

    const SQLLEN nMaxBookmarkLen = 20;

This should be changed to querying the maximal size at runtime with SQLColAttribute (called on column 0), and that's the size of the buffer we need.

Hopefully this will not trigger bugs in ODBC drivers... Maybe we should take the biggest of the value returned by SQLColAttribute and the current 20?
Comment 1 Terrence Enger 2013-09-12 14:19:10 UTC

Do you know a driver which uses longer bookmarks?  Perhaps a free driver?

Comment 2 Lionel Elie Mamane 2013-09-12 15:44:10 UTC
(In reply to comment #1)
> Do you know a driver which uses longer bookmarks?

No, I don't.
Comment 3 Alex Thurgood 2015-01-03 17:40:21 UTC Comment hidden (no-value)
Comment 4 Robinson Tryon (qubit) 2015-12-13 13:24:13 UTC Comment hidden (obsolete)
Comment 5 Robinson Tryon (qubit) 2016-02-18 14:51:41 UTC Comment hidden (obsolete)