Description: When trying to copy a table with a photo column from an embedded database into a MySQL directly connected database, an error message appears : No corresponding column type could be found for column 'Photo'. Steps to Reproduce: 1. Open Base and create a new database (embedded HSQLDB) 2. Use Wizard to Create Table 3. category : Business / Sample Tables : Employees 4. select fields : LastName and Photo 5. Set type and formats : click Next 6. Set primary key : Automatically add a primary key / check AutoValue 7. click Finish 8. Open Base and connect to an existing database : MySQL / connect directly 9. Setup a connection to a MySQL database (database name and server/port). As an example, use the sample MySQL database name sakila 10. Copy/Paste the table from the embedded Base to the MySQL connected Base. Actual Results: Error message : No corresponding column type could be found for column 'Photo'. Expected Results: I expect the table Employees to be copied into the MySQL connected Base. Reproducible: Always User Profile Reset: No Additional Info: It seems that Base does not support fields defined as "photo" in the Table creation Wizard (appearing as image(logvarbin)) when the backend database is MySQL.
Will be the same problem as all the bugs about field types, which aren't supported at this moment: bug 145205 bug 145714 bug 132515
Searching about "No corresponding column type could be found for column", I found: dbaccess/inc/strings.hrc:307:#define STR_UNKNOWN_TYPE_FOUND NC_("STR_UNKNOWN_TYPE_FOUND", "No corresponding column type could be found for column '#1'." ) From STR_UNKNOWN_TYPE_FOUND: 1525 void OCopyTableWizard::showColumnTypeNotSupported(std::u16string_view _rColumnName) 1526 { 1527 OUString sMessage( DBA_RES( STR_UNKNOWN_TYPE_FOUND ) ); 1528 sMessage = sMessage.replaceFirst("#1",_rColumnName); 1529 showError(sMessage); 1530 } on gdb, when putting a break in the function, I got: #0 dbaui::OCopyTableWizard::showColumnTypeNotSupported(std::basic_string_view<char16_t, std::char_traits<char16_t> >) (this=0x49e76c0, _rColumnName=u"Photo") at dbaccess/source/ui/misc/WCopyTable.cxx:1527 #1 0x00007fdd6ebf268d in dbaui::OWizColumnSelect::createNewColumn(weld::TreeView*, dbaui::OFieldDescription const*, std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> >&, rtl::OUString const&, rtl::OUString const&, int, comphelper::UStringMixEqual const&) (this=0x64609b0, _pListbox=0x4ccd020, _pSrcField=0x5ae0460, _rRightColumns=std::__debug::vector of length 3, capacity 4 = {...}, _sColumnName="Photo", _sExtraChars="#@", _nMaxNameLen=64, _aCase=...) at dbaccess/source/ui/misc/WColumnSelect.cxx:297 #2 0x00007fdd6ebf147b in dbaui::OWizColumnSelect::moveColumn(weld::TreeView*, weld::TreeView const*, std::__debug::vector<rtl::OUString, std::allocator<rtl::OUString> >&, rtl::OUString const&, rtl::OUString const&, int, comphelper::UStringMixEqual const&) (this=0x64609b0, _pRight=0x4ccd020, _pLeft=0x55f2270, _rRightColumns=std::__debug::vector of length 3, capacity 4 = {...}, _sColumnName="Photo", _sExtraChars="#@", _nMaxNameLen=64, _aCase=...) at dbaccess/source/ui/misc/WColumnSelect.cxx:312 #3 0x00007fdd6ebf1081 in dbaui::OWizColumnSelect::ButtonClickHdl(weld::Button&) (this=0x64609b0, rButton=...) at dbaccess/source/ui/misc/WColumnSelect.cxx:213 #4 0x00007fdd6ebefc70 in dbaui::OWizColumnSelect::LinkStubButtonClickHdl(void*, weld::Button&) (instance=0x64609b0, data=...) at dbaccess/source/ui/misc/WColumnSelect.cxx:158 when taking a look at frame 1, I see: 274 void OWizColumnSelect::createNewColumn( weld::TreeView* _pListbox, 275 OFieldDescription const * _pSrcField, 276 std::vector< OUString>& _rRightColumns, 277 const OUString& _sColumnName, 278 const OUString& _sExtraChars, 279 sal_Int32 _nMaxNameLen, 280 const ::comphelper::UStringMixEqual& _aCase) 281 { 282 OUString sConvertedName = m_pParent->convertColumnName(TMultiListBoxEntryFindFunctor(&_rRightColumns,_aCase), 283 _sColumnName, 284 _sExtraChars, 285 _nMaxNameLen); 286 OFieldDescription* pNewField = new OFieldDescription(*_pSrcField); 287 pNewField->SetName(sConvertedName); 288 bool bNotConvert = true; 289 pNewField->SetType(m_pParent->convertType(_pSrcField->getSpecialTypeInfo(),bNotConvert)); 290 if ( !m_pParent->supportsPrimaryKey() ) 291 pNewField->SetPrimaryKey(false); 292 293 _pListbox->append(OUString::number(reinterpret_cast<sal_Int64>(pNewField)), sConvertedName); 294 _rRightColumns.push_back(sConvertedName); 295 296 if ( !bNotConvert ) 297 m_pParent->showColumnTypeNotSupported(sConvertedName); 298 } which shows that we must dig into "convertType" since it's the only one which can modify bNotConvert to false (see https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/misc/WCopyTable.cxx?r=8ee18d0b&mo=51518&fi=1408#1408). This method can call until 3 times getTypeInfoFromType (see https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/misc/UITools.cxx?r=8a017d25#263)
The copy of the same table from hsqldb to Firebird works so something specific to Mysql part.
For fb, LONGVARBINARY info are retrieved when clicking on Tables part on left panel: #0 connectivity::firebird::ODatabaseMetaData::getTypeInfo()::$_0::operator()() const (this=0x7fff57e99958) at connectivity/source/drivers/firebird/DatabaseMetaData.cxx:898 #1 0x00007f6d7ba0829e in connectivity::firebird::ODatabaseMetaData::getTypeInfo() (this=0x67a2980) at connectivity/source/drivers/firebird/DatabaseMetaData.cxx:816 #2 0x00007f6d7ba0e7ed in non-virtual thunk to connectivity::firebird::ODatabaseMetaData::getTypeInfo() () at connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1029 #3 0x00007f6d7b9f6624 in connectivity::firebird::Connection::buildTypeInfo() (this=0x568f9c0) at connectivity/source/drivers/firebird/Connection.cxx:880 #4 0x00007f6d7b9f6434 in connectivity::firebird::Connection::createStatement() (this=0x568f9c0) at connectivity/source/drivers/firebird/Connection.cxx:402 #5 0x00007f6d7ba12763 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=0x67a2980, tableNamePattern="%", types=uno::Sequence of length 2 = {...}) at connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1327 #6 0x00007f6d7ba137e5 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 connectivity/source/drivers/firebird/DatabaseMetaData.cxx:1322 #7 0x00007f6d7b9e8094 in connectivity::firebird::Catalog::refreshTables() (this=0x67a7d10) at connectivity/source/drivers/firebird/Catalog.cxx:32 #8 0x00007f6d8d693b56 in connectivity::sdbcx::OCatalog::getTables() (this=0x67a7d10) at connectivity/source/sdbcx/VCatalog.cxx:81 #9 0x00007f6d8d693cad in non-virtual thunk to connectivity::sdbcx::OCatalog::getTables() () at connectivity/source/sdbcx/VCatalog.cxx:87 #10 0x00007f6d7efc0ffb in dbaccess::OConnection::refresh(com::sun::star::uno::Reference<com::sun::star::container::XNameAccess> const&) (this=0x678fa60, _rToBeRefreshed= uno::Reference to (dbaccess::OTableContainer *) 0x67a68c8) at dbaccess/source/core/dataaccess/connection.cxx:528 #11 0x00007f6d7efc159c in dbaccess::OConnection::getTables() (this=0x678fa60) at dbaccess/source/core/dataaccess/connection.cxx:560 #12 0x00007f6d7efbe4fe in dbaccess::OConnection::impl_checkTableQueryNames_nothrow() (this=0x678fa60) at dbaccess/source/core/dataaccess/connection.cxx:751 #13 0x00007f6d7efbdfd2 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=0x678fa60, _rDB=..., _rxMaster=uno::Reference to (connectivity::firebird::Connection *) 0x568fa28, _rxORB= uno::Reference to (cppu::(anonymous namespace)::ComponentContext *) 0x228c970) at dbaccess/source/core/dataaccess/connection.cxx:339 #14 0x00007f6d7f03d24b in dbaccess::ODatabaseSource::buildIsolatedConnection(rtl::OUString const&, rtl::OUString const&) (this=0x5278670, user="", password="") at dbaccess/source/core/dataaccess/datasource.cxx:1219 it's not the case for mysqlc. Lionel: I wonder if it's not a pb of implementing specific sdb/sdbc/sdbcx. If you've got some ideas, don't hesitate of course! :-)
Dear Jean-Paul, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Bug still present in Version: 7.6.2.1 (AARCH64) / LibreOffice Community Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333 CPU threads: 8; OS: Mac OS X 14.1.1; UI render: Skia/Raster; VCL: osx Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR Calc: threaded
Bug still present in Version: 7.6.4.1 (X86_64) / LibreOffice Community Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1 CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Vulkan; VCL: win Locale: en-US (en_BE); UI: en-US Calc: CL threaded