Bug 68341 - pilot class for MySQL should ignore spaces at begining and and of the class name
Summary: pilot class for MySQL should ignore spaces at begining and and of the class name
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.0.4.2 release
Hardware: x86 (IA32) Windows (All)
: medium enhancement
Assignee: Julien Nabet
URL:
Whiteboard: target:4.4.0 target:7.4.0 target:7.3.0.2
Keywords: difficultyMedium, needsDevEval, skillCpp
Depends on:
Blocks: Database-Connectivity
  Show dependency treegraph
 
Reported: 2013-08-20 14:56 UTC by François BERNIGAUD
Modified: 2022-01-10 10:34 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description François BERNIGAUD 2013-08-20 14:56:14 UTC
Class test failed just because of a space at the beginning of the class name.
Should be trimed.
Comment 1 Robert Großkopf 2013-08-20 17:19:01 UTC
Could you please describe the bug a little bit more? What are you doing; what are you expecting, what Base should do; what do you mean with "class name"; how do you contact with MySQL ...
Comment 2 Joel Madero 2014-06-25 06:03:44 UTC
@Lionel - any opinions on this really old enhancement request?
Comment 3 Lionel Elie Mamane 2014-06-25 11:17:24 UTC
I assume this is about connecting through JDBC, and the Java class name. It is a valid usabiity enhancement. Not only for MySQL, but for JDBC in general.
Comment 6 Commit Notification 2014-07-02 11:27:52 UTC
Laurent Balland-Poirier committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=bcdd1f3179ab6f4ae72c6ac5b82f7fb4d2e54c16

fdo#68341 Remove space of java class when testing class



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Lionel Elie Mamane 2014-07-02 12:21:06 UTC
While the committed patch is good progress on this bug, I disagree that it is fully fixed. The spaces are trimmed only when one presses the "Test" button. If one does not press the "test" button, but only the "next" button, the class name is not space-trimmed.
Comment 8 Alex Thurgood 2015-01-03 17:40:35 UTC Comment hidden (no-value)
Comment 9 Robinson Tryon (qubit) 2015-12-10 08:06:57 UTC Comment hidden (obsolete)
Comment 10 Commit Notification 2022-01-06 09:27:59 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/470d1be4ec5a3a5a0aba8febda06600ea39852c5

tdf#68341: trim some variables passed on Base wizard

It will be available in 7.4.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 11 Julien Nabet 2022-01-06 09:30:32 UTC
Patch for 7.3 waiting for review here:
https://gerrit.libreoffice.org/c/core/+/127960
Comment 12 Julien Nabet 2022-01-06 09:32:35 UTC
Just for information, the patch may impact more than Mysql and more than just the class driver.
Indeed, I changed fillString methods, here's the impact:
dbaccess/source/ui/dlg/ConnectionPage.cxx:232:            fillString(*_rSet,m_xJavaDriver.get(), DSID_JDBCDRIVERCLASS, bChangedSomething);
dbaccess/source/ui/dlg/ConnectionPage.cxx:235:        fillString(*_rSet,m_xConnectionURL.get(), DSID_CONNECTURL, bChangedSomething);
dbaccess/source/ui/dlg/ConnectionPageSetup.cxx:134:        fillString(*_rSet,m_xConnectionURL.get(), DSID_CONNECTURL, bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:144:        fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN, bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:416:        fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:417:        fillString(*_rSet,m_xETHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:418:        fillString(*_rSet,m_xETDatabasename.get(),DSID_DATABASENAME,bChangedSomething);
dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx:531:        fillString(*_rSet,m_xETDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/admincontrols.cxx:117:        OGenericAdministrationPage::fillString( *_rSet, m_xHostName.get(),     DSID_CONN_HOSTNAME,    bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:118:        OGenericAdministrationPage::fillString( *_rSet, m_xDatabaseName.get(), DSID_DATABASENAME,     bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:121:        OGenericAdministrationPage::fillString( *_rSet, m_xSocket.get(),       DSID_CONN_SOCKET,      bChangedSomething );
dbaccess/source/ui/dlg/admincontrols.cxx:123:        OGenericAdministrationPage::fillString( *_rSet, m_xNamedPipe.get(),    DSID_NAMED_PIPE,       bChangedSomething );
dbaccess/source/ui/dlg/adminpages.cxx:219:    void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const weld::Entry* pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
dbaccess/source/ui/dlg/adminpages.cxx:227:    void OGenericAdministrationPage::fillString(SfxItemSet& _rSet, const dbaui::OConnectionURLEdit* pEdit, sal_uInt16 _nID, bool& _bChangedSomething)
dbaccess/source/ui/dlg/adminpages.hxx:218:        static void fillString(SfxItemSet& _rSet,const weld::Entry* pEdit,sal_uInt16 _nID, bool& _bChangedSomething);
dbaccess/source/ui/dlg/adminpages.hxx:219:        static void fillString(SfxItemSet& _rSet,const dbaui::OConnectionURLEdit* pEdit,sal_uInt16 _nID, bool& _bChangedSomething);
dbaccess/source/ui/dlg/advancedsettings.cxx:351:        fillString( *_rSet, m_xAutoIncrement.get(), DSID_AUTOINCREMENTVALUE, bChangedSomething );
dbaccess/source/ui/dlg/advancedsettings.cxx:353:        fillString( *_rSet, m_xAutoRetrieving.get(), DSID_AUTORETRIEVEVALUE, bChangedSomething );
dbaccess/source/ui/dlg/detailpages.cxx:146:            fillString(*_rSet,m_xOptions.get(),DSID_ADDITIONALOPTIONS,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:303:        fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:406:            fillString(*_rSet,m_xEDDriverClass.get(),DSID_JDBCDRIVERCLASS,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:407:        fillString(*_rSet,m_xEDHostname.get(),DSID_CONN_HOSTNAME,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:408:        fillString(*_rSet,m_xEDSocket.get(),DSID_CONN_SOCKET,bChangedSomething);
dbaccess/source/ui/dlg/detailpages.cxx:608:        fillString(*_rSet,m_xETBaseDN.get(),DSID_CONN_LDAP_BASEDN,bChangedSomething);

So if someone sees something weird about space managing, don't hesitate to tell.
Comment 13 Commit Notification 2022-01-10 10:34:35 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/7ab19fd9ec86b50acb24a0673348b9794d7b6568

tdf#68341: trim some variables passed on Base wizard

It will be available in 7.3.0.2.

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.