Bug 131217 - BASE: Execute the "comment" command hides the table (Firebird)
Summary: BASE: Execute the "comment" command hides the table (Firebird)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.3.5.2 release
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:7.0.0 target:6.4.3
Keywords:
Depends on:
Blocks:
 
Reported: 2020-03-08 04:52 UTC by avsharapov
Modified: 2020-03-08 18:34 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
table without comment (2.82 KB, application/vnd.oasis.opendocument.database)
2020-03-08 04:52 UTC, avsharapov
Details
table with comment (2.83 KB, application/vnd.oasis.opendocument.database)
2020-03-08 04:53 UTC, avsharapov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description avsharapov 2020-03-08 04:52:54 UTC
Created attachment 158491 [details]
table without comment

Menu Tools->SQL
COMMENT ON TABLE "tableforcomment" IS 'comment for table';
Save file and exit.
When you edit the document again, the table disappears from the list.
COMMENT ON TABLE "tableforcomment" IS '';
Returns the table to the list
Comment 1 avsharapov 2020-03-08 04:53:36 UTC
Created attachment 158492 [details]
table with comment
Comment 2 avsharapov 2020-03-08 09:59:29 UTC
Tested on version 6.4.1.2 Portable (Windows 10).
Same result.
Comment 3 Julien Nabet 2020-03-08 12:31:51 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
Comment 4 Julien Nabet 2020-03-08 12:56:58 UTC
Some console logs:
warn:dbaccess:127345:127345:dbaccess/source/core/dataaccess/connection.cxx:778: DBG_UNHANDLED_EXCEPTION in void dbaccess::OConnection::impl_checkTableQueryNames_nothrow() exception: com.sun.star.lang.IllegalArgumentException message: nPosition out of range ArgumentPosition: 0
warn:legacy.osl:127345:127345:dbaccess/source/ui/control/tabletree.cxx:170: OTableTreeListBox::UpdateTableList : caught a RuntimeException!
warn:legacy.osl:127345:127345:dbaccess/source/ui/control/tabletree.cxx:170: OTableTreeListBox::UpdateTableList : caught a RuntimeException!
Comment 5 Julien Nabet 2020-03-08 12:57:57 UTC
bt part:
#0  0x00007fffd9ef9288 in connectivity::firebird::Blob::getBytes(long, int) (this=0xd954c20, nPosition=0, nBytes=17) at connectivity/source/drivers/firebird/Blob.cxx:204
#1  0x00007fffd9ef94e3 in non-virtual thunk to connectivity::firebird::Blob::getBytes(long, int) () at /home/julien/lo/libreoffice/instdir/program/../program/libfirebird_sdbclo.so
#2  0x00007fffd9f29fe7 in connectivity::firebird::ODatabaseMetaData::getTables(com::sun::star::uno::Any const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<rtl::OUString> const&)
    (this=0xd915c30, tableNamePattern="%", types=uno::Sequence of length 2 = {...}) at connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1418
#3  0x00007fffd9f2a3c5 in non-virtual thunk to connectivity::firebird::ODatabaseMetaData::getTables(com::sun::star::uno::Any const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<rtl::OUString> const&) () at /home/julien/lo/libreoffice/instdir/program/../program/libfirebird_sdbclo.so
#4  0x00007fffd9f000cc in connectivity::firebird::Catalog::refreshTables() (this=0xd917030) at connectivity/source/drivers/firebird/Catalog.cxx:35
#5  0x00007fffeb38e886 in connectivity::sdbcx::OCatalog::getTables() (this=0xd917030) at connectivity/source/sdbcx/VCatalog.cxx:81
#6  0x00007fffeb38e9dd in non-virtual thunk to connectivity::sdbcx::OCatalog::getTables() () at /home/julien/lo/libreoffice/instdir/program/libdbtoolslo.so
#7  0x00007fffdc5a678b in dbaccess::OConnection::refresh(com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> const&)
    (this=0xc835360, _rToBeRefreshed=uno::Reference to (dbaccess::OTableContainer *) 0xd916198) at dbaccess/source/core/dataaccess/connection.cxx:536
#8  0x00007fffdc5a6d2c in dbaccess::OConnection::getTables() (this=0xc835360) at dbaccess/source/core/dataaccess/connection.cxx:568
#9  0x00007fffdc5a3bfe in dbaccess::OConnection::impl_checkTableQueryNames_nothrow() (this=0xc835360) at dbaccess/source/core/dataaccess/connection.cxx:760
#10 0x00007fffdc5a36d4 in dbaccess::OConnection::OConnection(dbaccess::ODatabaseSource&, com::sun::star::uno::Reference<com::sun::star::sdbc::XConnection> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&) (this=0xc835360, _rDB=..., _rxMaster=uno::Reference to (connectivity::firebird::Connection *) 0xc7fdef0, _rxORB=
    uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x5491d0) at dbaccess/source/core/dataaccess/connection.cxx:347
#11 0x00007fffdc6199cb in dbaccess::ODatabaseSource::buildIsolatedConnection(rtl::OUString const&, rtl::OUString const&) (this=0xc7ef570, user="", password="")
    at dbaccess/source/core/dataaccess/datasource.cxx:1223
#12 0x00007fffdc6191fc in dbaccess::OSharedConnectionManager::getConnection(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, dbaccess::ODatabaseSource*) (this=0xc7dfe40, url="sdbc:embedded:firebird", user="", password="", _aInfo=uno::Sequence of length 54 = {...}, _pDataSource=0xc7ef570)
    at dbaccess/source/core/dataaccess/datasource.cxx:385
#13 0x00007fffdc622668 in dbaccess::ODatabaseSource::getConnection(rtl::OUString const&, rtl::OUString const&, bool) (this=0xc7ef570, user="", password="", _bIsolated=false)
    at dbaccess/source/core/dataaccess/datasource.cxx:1244
#14 0x00007fffdc6222c6 in dbaccess::ODatabaseSource::getConnection(rtl::OUString const&, rtl::OUString const&) (this=0xc7ef570, user="", password="") at dbaccess/source/core/dataaccess/datasource.cxx:1117
#15 0x00007fffdc622895 in non-virtual thunk to dbaccess::ODatabaseSource::getConnection(rtl::OUString const&, rtl::OUString const&) () at /home/julien/lo/libreoffice/instdir/program/../program/libdbalo.so
#16 0x00007fffdb118f7a in dbaui::ODatasourceConnector::connect(com::sun::star::uno::Reference<com::sun::star::sdbc::XDataSource> const&, dbtools::SQLExceptionInfo*) const
    (this=0x7ffffffef3d8, _xDataSource=uno::Reference to (dbaccess::ODatabaseSource *) 0xc7ef5e0, _pErrorInfo=0x0) at dbaccess/source/ui/misc/datasourceconnector.cxx:138
#17 0x00007fffdb11829b in dbaui::ODatasourceConnector::connect(rtl::OUString const&, dbtools::SQLExceptionInfo*) const
    (this=0x7ffffffef3d8, _rDataSourceName="file:///tmp/testCommentandcomment.odb", _pErrorInfo=0x0) at dbaccess/source/ui/misc/datasourceconnector.cxx:88
Comment 6 Julien Nabet 2020-03-08 13:02:43 UTC
Patch submitted on gerrit for master sources here:
https://gerrit.libreoffice.org/c/core/+/90186
Comment 7 Commit Notification 2020-03-08 15:36:19 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bb51f81507a405266d251297684bd3ab60998197

tdf#131217: position arg in Blob::getBytes begins at 1 not 0 (Firebird)

It will be available in 7.0.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2020-03-08 17:28:37 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/92438b37a470b603642775fb44dc08b8f6b78042

tdf#131217: position arg in Blob::getBytes begins at 1 not 0 (Firebird)

It will be available in 6.4.3.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Julien Nabet 2020-03-08 18:34:58 UTC
Thank you Lionel for the review on 6.4 patch.