Download it now!
Bug 125957 - FIREBIRD: Datatype Binary(fix) [CHAR] couldn't be filled with content
Summary: FIREBIRD: Datatype Binary(fix) [CHAR] couldn't be filled with content
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.3.0.0.beta1+
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 125958 (view as bug list)
Depends on:
Blocks: Database-Firebird-Default
  Show dependency treegraph
 
Reported: 2019-06-16 16:43 UTC by Robert Großkopf
Modified: 2020-05-15 17:42 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2019-06-16 16:43:44 UTC
Open any internal Firebird database. Open a table for editing or create a new table. There is a data type Binary(fix)[CHAR]. Choose this type for a field.

After saving the table open the table for data input. The field will get an <OBJECT>, so it couldn't be filled in the table view.

Create a form for it. I have tried many fields, also the image-control, which is the only field for read binary data. No possibility to get data into this field type.

Now reopen the table for editing. Look at the field. The type will have switched to Text(fix)[CHAR].

Don't know where Binary(fix)[CHAR] should be for. But a field, which couldn't be filled with content through a form or directly through the table view, should be removed from the table editor.
Comment 1 Robert Großkopf 2019-06-16 16:51:06 UTC
*** Bug 125958 has been marked as a duplicate of this bug. ***
Comment 2 Alex Thurgood 2019-06-18 07:27:22 UTC
Confirmed with

Version: 6.4.0.0.alpha0+
Build ID: eda0568ec550a10b962c2427edfe05ea3197f107
CPU threads: 4; OS: Mac OS X 10.14.5; UI render: default; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); UI-Language: en-US
Calc: threaded
Comment 3 Julien Nabet 2020-05-15 17:42:25 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.

This type has been added with this block:
    865         // Binary (CHAR)
    866         // It is distinguished from Text type by its character set
    867         aRow[1] = new ORowSetValueDecorator(OUString("CHAR"));
    868         aRow[2] = new ORowSetValueDecorator(DataType::BINARY);
    869         aRow[3] = new ORowSetValueDecorator(sal_Int16(32765)); // Prevision = max length
    870         aRow[6] = new ORowSetValueDecorator(OUString("length")); // Create Params
    871         aRow[9] = new ORowSetValueDecorator(
    872                 sal_Int16(ColumnSearch::NONE)); // Searchable
    873         aRow[14] = ODatabaseMetaDataResultSet::get0Value(); // Minimum scale
    874         aRow[15] = ODatabaseMetaDataResultSet::get0Value(); // Max scale
    875         tmp.push_back(aRow);
See https://opengrok.libreoffice.org/xref/core/connectivity/source/drivers/firebird/DatabaseMetaData.cxx?r=572c9db0#865
in commit https://cgit.freedesktop.org/libreoffice/core/commit/?id=bf662904c4b60e93c6b86e06288d41996eed12a2
author	Tamas Bunth <tamas.bunth@collabora.co.uk>	2017-12-16 12:57:43 +0100
committer	Tamás Bunth <btomi96@gmail.com>	2017-12-28 10:39:48 +0100
commit	bf662904c4b60e93c6b86e06288d41996eed12a2 (patch)
tree	e3508e2504a07622559793393fcbc19023157bfd
parent	3c567e55e6aed9e0da892d8b9fc09f8a0c784fcc (diff)
tdf#104734 Firebird: Add Binary (fix) type
There is no explicit binary type in Firebird. It can be accomplished
using the CHAR type with a special character set, which tells the
database that it is binary data and there is no collation. (called
OCTETS).

Because of that, we also need the character set to decide the exact
column type.

And also refactor some parts of the driver:
- Create class to determine internal type from firebird type, subtype,
scale and character set.
- Use internal type (DataType::XXX) in XDatabaseMetaData::getTypeInfo()
indirectly. (We want to return a Firebird type for each internal type,
not in the opposite direction.

I can remove the block but perhaps it should be fixed, in this case, I don't know what should be done.

Lionel/Tamas: don't hesitate to share your thoughts about it.