Bug 103068 - New Database Wizard gets confused between ODBC and JDBC connection if you backup twice to step 1.
Summary: New Database Wizard gets confused between ODBC and JDBC connection if you bac...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Mike Kaganski
URL:
Whiteboard: target:24.8.0 target:24.2.3
Keywords:
Depends on:
Blocks: Database-Connectivity Database-Wizard
  Show dependency treegraph
 
Reported: 2016-10-09 18:55 UTC by Howard Johnson
Modified: 2024-03-28 05:38 UTC (History)
5 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 Howard Johnson 2016-10-09 18:55:45 UTC
Description:
While working inside the Database Wizard trying to setup ODBC, I noticed that the Database Wizard gets confused if you first select MySQL-ODBC, then backup and select ODBC, and then backup again and select MySQL-ODBC.

At that point (step 3) it should ask for the ODBC setup, but instead it asks for the JDBC setup.

This might or might not have to do with the fact that there are 4 steps from MySQL setup, and 5 steps for ODBC setup.



Steps to Reproduce:
From the menu:
  File | New | Database

---Opens the Database Wizard dialog -------
Step1:
* Connect to an existing database: MySQL
Next>>
-------------
Step2:
* Connect using ODBC
Next>>
-------------
Step3:
<<Back
-------------
Step2:
<<Back
-------------

Step1:
* Connect using ODBC
Next>>
-------------
Step2:
<<Back

-------------
Step1:
* Connect using MySQL
Next>>
-------------
Step2:
* Connect using ODBC
Next>>
-------------
Step3:
  Results: "Set up a connection to a MySQL database using JDBC" dialog.

((BUT, this should be "Set up a connection to a MySQL database using ODBC"))

Actual Results:  
Dialog opened: "Set up a connection to a MySQL database using JDBC"

Expected Results:
Dialog should open: "Set up a connection to a MySQL database using ODBC"


Reproducible: Always

User Profile Reset: No

Additional Info:
I may also have a problem w/ ODBC being broken, as I still can't get that to work without crashing, so stay tuned.  :-(


User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0
Comment 1 Howard Johnson 2016-10-10 01:29:18 UTC
This bug appears to be more widespread than just where I reported it before.  I am also seeing similar behavior under "Use Wizard to Create Form..."

In other words, going forward is ok.  But going back gets messed up quickly.  

I have two tables:

-----------  
Categories:

Category ID
Category
-----------  

Items:

Item ID
Category ID
Item
-----------  

1. Select Table Categories.  >>Add all fields to the form.  Next>
2. Check Add Subform.  * Subform based on manual selection of fields.  Next>
3. Select Table Items.  >>Add all fields to the form.  Next>
4. <Back.
3. <Back.  (this click does nothing!)
3. <Back.
(We skipped #2)
1. Next>   (this click does nothing!)
(we skipped #2)
3. Next>   (this click does nothing!)
(we skipped #4)
5.  

Just crazy.  Probably just a little thing messing this all up.  But it clearly does not behave as I would expect.  

What I expect:  When I have the choice for "<Back" or "Next>" I would expect something to happen when I click on it.  

It might be reasonable to backup up by 2 at a time.

It does not seem reasonable to go forward skipping a step.

Thanks!
Comment 2 Robert Großkopf 2016-10-10 10:30:16 UTC
I could reproduce the behavior, If I do the following:

New Database
MySQL
MySQL-connection > ODBC
ODBC-connection

then back to
MySQL-connection, switch to JDBC
JDBC-connection

then back to
MySQL-connection, switch to ODBC

then back to
MySQL

You could see as step 3 now: JDBC-connection, but
MySQL-connection shows ODBC and step 3 would be the dialog for JDBC-connection.

Tested here with LO 5.2.2.2 on OpenSUSE 42.1 64bit rpm Linux.
Comment 3 Julien Nabet 2016-10-11 21:02:30 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this.
I suppose it's linked with svtools/source/dialogs/wizardmachine.cxx but I don't succeed in understanding where it's wrong.
Comment 4 Alex Thurgood 2016-10-12 10:14:00 UTC
@Julien : you could try asking Caolan if he has an idea, he fixed some UI stuff in the dbwizard not too long ago, perhaps this is related ?
Comment 5 Julien Nabet 2016-10-12 10:25:37 UTC
(In reply to Alex Thurgood from comment #4)
> @Julien : you could try asking Caolan if he has an idea, he fixed some UI
> stuff in the dbwizard not too long ago, perhaps this is related ?

Perhaps you thought about https://cgit.freedesktop.org/libreoffice/core/commit/?id=01889962cab8449e1d9682d22db0f6e1e28252fd but it's unrelated.
Anyway, let's ask him! :-)

Caolán: perhaps you may have some idea about root cause of this one?
Comment 6 QA Administrators 2018-10-24 02:56:32 UTC Comment hidden (noise)
Comment 7 Robert Großkopf 2018-10-24 06:24:25 UTC
Bug still exists for LO 6.1.2.1 on OpenSUSE 15, 64bit rpm Linux
Comment 8 himajin100000 2018-12-07 11:26:30 UTC
Steps to Reproduce:

1. Run LibreOffice Base

2. Database Wizard comes up.

3. Click 'Connect to an existing database'

4. Choose MySQL from the Combobox
4-Sub-1. See the 'Steps' Section in the roadmap on the left side. Threr you will find confusing 'Set up JDBC Connection' item. In fact this item is for JDBC, but displayed without connection information. Probably coders thought users can choose how to connect on the page later, but they did not notice the roadmap.

https://opengrok.libreoffice.org/xref/core/dbaccess/source/ui/dlg/generalpage.cxx?r=32ca8708#130

5. Next 

6. you will see a page with JDBC radio button checked as default. click 'Connect using ODBC'

7. Next

8. you will see 'Setup Connection to an ODBC Database' as the title.

9. Back

10. Back

11. Now you've reached the first page. you will see 'Set up ODBC Connection' in the roadmap. Yes, it's not JDBC, but it's ODBC!

12. VERY IMPORTANT STEP. Either click radio button or combobox for the 'Connect to exisiting database'. you will see JDBC in the roadmap.

13. Next

13. you will see ODBC radio button is checked.

14. ANOTHER VERY IMPORTANT STEP. DON'T TOUCH THE RADIOBUTTONS. ESPECIALLY DO NOT TRY CLICKING JDBC FIRST, and CLICKING ODBC AFTER THAT.

15. Next

ACTUAL RESULT:

As the repoter says, you will see "Set up a connection to a MySQL database using JDBC"

you are a nice person , who never forgets the impotant steps, and who don't like tricks in Halloween, aren't you ?
Comment 9 himajin100000 2018-12-07 11:27:45 UTC
typo:Threr -> There
Comment 10 QA Administrators 2019-12-08 03:45:37 UTC Comment hidden (noise, obsolete)
Comment 11 Howard Johnson 2019-12-08 17:46:17 UTC
Because version 6 broke my Base applications in substantial ways, and because I haven't had time to chase down why, I am not using LO version 6 and up, but am rather am still using LO 5 for now.  I was hoping at some time 6 would start working again.

As far as this and other bugs that I reported, I would be very surprised if it or they are gone in the current version of LO, as it's been my experience that no one is fixing these things.

I had hoped to join the effort to fix some of these bugs myself, but I'm struggling with my health and this has given me less time to attend to LO.  Sorry.
Comment 12 Robert Großkopf 2019-12-08 19:28:09 UTC
Bug still exists with LO 6.4.0.0beta1 on OpenSUSE 15.1 64bit rpm Linux.
You don't need any ODBC or JDBC-installation for it.
Start with Database > Connect to existing database > MySQL
Step 2 - choose ODBC
Go <Back and step 3 will change to default JDBC-connection
Go Next> ODBC is already choosen, but not recognized any more by the wizard. 
Next> will start (for step 3) do define a JDBC-connection, not the choosen ODBC-connection.
Comment 13 Robert Großkopf 2019-12-08 19:32:21 UTC
I have tested it also with AOO 4.1.6. It's the same behavior. So could be the bug is inherited by OOo.
Comment 14 QA Administrators 2021-12-08 04:35:28 UTC Comment hidden (noise)
Comment 15 Alex Thurgood 2021-12-08 10:06:36 UTC
Bug still present in 

Version: 7.2.1.2 / LibreOffice Community
Build ID: 87b77fad49947c1441b67c559c339af8f3517e22
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded
Comment 16 QA Administrators 2023-12-09 03:14:31 UTC Comment hidden (noise, obsolete)
Comment 17 Mike Kaganski 2024-03-19 04:12:01 UTC
Repro using Version: 24.2.2.1 (X86_64) / LibreOffice Community
Build ID: bf759d854b5ab45b6ef0bfd22e51c6dc4fb8b882
CPU threads: 24; OS: Windows 10.0 Build 22631; UI render: default; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL threaded

and also using OOo 3.2.0.
Comment 18 Mike Kaganski 2024-03-19 06:56:46 UTC
Simplified new steps (6.4.0.3+):

1. File->New->Database
2. Connect to an existing database->MySQL/MariaDB
  => see that "Steps" list on the left has "Set up JDBC connection" step 3; this is normal, because the selected element of the combobox is associated with "sdbc:mysql:jdbc:" hardcoded prefix.
3. [Next >]
4. (*) Connect using ODBC (Open Database Connectivity)
  => see that "Steps" list on the left has "Set up ODBC connection" step 3 now. Clicking [Next >] at this stage will navigate to the "Set up a connection to an ODBC data source" page, as expected.
5. [< Back] to step 1 again.
  => see that "Steps" list on the left has "Set up JDBC connection" step 3: this is a regression in 6.4.0.3 compared to 6.3.0.4.
6. [Next >]
  => See that the radio button is still at ODBC, but the "Steps" still have step 3 mentioning JDBC. Clicking [Next >] at this stage will navigate to the "Set up connection to a MySQL/MariaDB database using JDBC" page.

This secondary change happened after commit 69057064d8957804c76e623d57c103c3413b7cbc (weld ODbTypeWizDialogSetup, 2019-08-22).

https://gerrit.libreoffice.org/c/core/+/164987
Comment 19 Commit Notification 2024-03-20 03:43:03 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1e66905c840dbee0a67e444fca80bdacfcb6e6b2

tdf#103068: make sure to update and use current MySQL connection type

It will be available in 24.8.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 20 Commit Notification 2024-03-28 05:38:00 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/8e0bb9dadb9ef77f693cf6d334843cfb9b4701a3

tdf#103068: make sure to update and use current MySQL connection type

It will be available in 24.2.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.