Download it now!
Bug 122446 - MariaDB/MySQL native connector: All tables are write protected
Summary: MariaDB/MySQL native connector: All tables are write protected
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.2.0.1 rc
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, regression
: 125177 125302 126639 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-01-03 14:29 UTC by Robert Großkopf
Modified: 2019-11-10 14:53 UTC (History)
8 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-01-03 14:29:37 UTC
Opened a MariaDB by the native MySQL-connector of LO 6.2.0.1rc.
All tables (of every shown database) were write protected. 
When opening through JDBC I could add data ...

Every table has a primary key.

Tested with 
Version: 6.2.0.1
Build ID: 0412ee99e862f384c1106d0841a950c4cfaa9df1
CPU threads: 6; OS: Linux 4.12; UI render: default; VCL: gtk3; 
Locale: de-DE (de_DE.UTF-8); UI-Language: en-US
Calc: threaded
Comment 1 Alex Thurgood 2019-01-06 14:21:47 UTC
I can reproduce this with my own master build 6300 alpha on Ubuntu 18.04.1 LTS
Comment 2 Julien Nabet 2019-01-17 07:12:21 UTC
On pc Debian x86-64 with master sources updated yesterday + this on my autogen.input:
...
--without-system-mariadb
--enable-bundle-mariadb
...
I don't reproduce this.

I use a Mysql database on a local server.
Here are the steps:
- launch Base
- Connect to an existing database
- Mysql (I don't see any "Mariabd" entry)
- click Next
- Connect directly
- click Next
- fill database name, server 
- click Next
- fill User name + check Password required
- click test connection
- fill password
- click Ok
- click Ok to popup display "connection was established"
- click Next
- select "No, do not register the database
- click Finish
- choose filename

then
- edit table by adding a field
=> field is created.

Did I miss something?
Comment 3 Alex Thurgood 2019-01-17 10:41:16 UTC
Hi Julien,

Possibly you missed the fact that the problem is not in creating a table, but in entering data into that table afterwards via the UI.

If you open the table you just created for entering data, is it writable ?
Comment 4 Julien Nabet 2019-01-17 17:54:25 UTC
(In reply to Alex Thurgood from comment #3)
> Hi Julien,
> 
> Possibly you missed the fact that the problem is not in creating a table,
> but in entering data into that table afterwards via the UI.
> 
> If you open the table you just created for entering data, is it writable ?

Yes I can add data on an existing table.

I noticed I couldn't create a brand new table
with wizard I got:
	at com.sun.star.wizards.db.TableDescriptor.createTable(TableDescriptor.java:276)
	at com.sun.star.wizards.table.TableWizard.createTable(TableWizard.java:251)
	at com.sun.star.wizards.table.TableWizard.finishWizard(TableWizard.java:275)
	at com.sun.star.wizards.ui.WizardDialog.finishWizard_1(WizardDialog.java:578)

with design, an error too and I noticed this on console:
warn:connectivity.mysqlc:3015:3015:connectivity/source/drivers/mysqlc/mysqlc_databasemetadata.cxx:366: method not implemented
Comment 5 Julien Nabet 2019-01-17 19:33:04 UTC
BTW, here is the error with design mode:
Access denied for user 'root'@'localhost' to database 'information_schema'
Comment 6 Julien Nabet 2019-01-17 19:43:47 UTC
(In reply to Julien Nabet from comment #5)
> BTW, here is the error with design mode:
> Access denied for user 'root'@'localhost' to database 'information_schema'

Ok, I had just to replace information_schema by another database name and it was ok to create the table in design mode.
Comment 7 Julien Nabet 2019-01-17 19:45:00 UTC
In wizard part, there's listbox with label "Schema of the table" but it only sees "information_schema", that's why I can't succeed in creating a table with wizard.
Comment 8 Julien Nabet 2019-01-17 20:22:48 UTC
I submitted a patch which may be related to this one:
https://gerrit.libreoffice.org/#/c/66554/
Indeed, I wonder if the problem could be due to the fact we don't retrieve  schemas correctly.
Comment 9 Robert Großkopf 2019-01-17 20:49:43 UTC
(In reply to Julien Nabet from comment #8)
> I submitted a patch which may be related to this one:
> https://gerrit.libreoffice.org/#/c/66554/
> Indeed, I wonder if the problem could be due to the fact we don't retrieve 
> schemas correctly.

I have tested this also.
You couldn't change from "information_schema" to the existing database by the listbox in the GUI. You could only write down the name of the database in the textfield and it will work.

The created table is also write-protected in the GUI of Base.

I could open Tools - SQL and insert values, but through GUI (and also forms) I couldn't change anything.

Tested with LO 6.2.0.2 on OpenSUSE 15 64bit rpm Linux.
Comment 10 Julien Nabet 2019-03-17 10:08:42 UTC
(In reply to Julien Nabet from comment #8)
> I submitted a patch which may be related to this one:
> https://gerrit.libreoffice.org/#/c/66554/
> Indeed, I wonder if the problem could be due to the fact we don't retrieve 
> schemas correctly.

The patch has been merged.
I gave a new try with master sources updated today + MariaDB Server 10.3.13, create a table with wizard (I changed schema) + add data from gui.
Comment 11 Robert Großkopf 2019-05-08 18:46:58 UTC
*** Bug 125177 has been marked as a duplicate of this bug. ***
Comment 12 Alex Thurgood 2019-05-09 09:59:13 UTC
@Julien : this is confirmed as fixed in master (see DUP bug 125177), could this be backported for 6.2 ?
Comment 13 Julien Nabet 2019-05-09 11:45:43 UTC
(In reply to Alex Thurgood from comment #12)
> @Julien : this is confirmed as fixed in master (see DUP bug 125177), could
> this be backported for 6.2 ?

The patch has been pushed several months ago. I'm not sure but it seems already present in 6.2 branch (see https://cgit.freedesktop.org/libreoffice/core/log/?qt=grep&q=fix+schemas+retrieving&h=libreoffice-6-2-1)
Any update with recent LO version?
Comment 14 Sébastien Ducoulombier 2019-05-09 12:06:07 UTC
> Any update with recent LO version?

This bug still affects version 6.2.3.2
Build ID: aecc05fe267cc68dde00352a451aa867b3b546ac
CPU threads: 4; OS: Linux 4.9; UI render: default; VCL: gtk3; 
Locale: en-US (C); UI-Language: en-US
Calc: threaded
Comment 15 Julien Nabet 2019-05-09 12:15:48 UTC
At least, can't cherry-pick the patch since I get "identical tree" error.
Can't do anything here so uncc myself.
Comment 16 Alex Thurgood 2019-05-28 12:18:57 UTC
*** Bug 125302 has been marked as a duplicate of this bug. ***
Comment 17 Alex Thurgood 2019-08-01 14:23:00 UTC
*** Bug 126639 has been marked as a duplicate of this bug. ***
Comment 18 Xisco Faulí 2019-08-05 13:57:16 UTC
Hi Alex, Robert,
is this issue still reproducible in LibreOffice 6.2.5.2 ? What about LibreOffice 6.3.0.3? Julien's patch was backported to 6.2 long time ago < https://gerrit.libreoffice.org/#/c/66563/3 >
Comment 19 Robert Großkopf 2019-08-05 14:20:16 UTC
(In reply to Xisco Faulí from comment #18)
> Hi Alex, Robert,
> is this issue still reproducible in LibreOffice 6.2.5.2 ? What about
> LibreOffice 6.3.0.3? Julien's patch was backported to 6.2 long time ago <
> https://gerrit.libreoffice.org/#/c/66563/3 >

Doesn't work with LO 6.2.5.2, but works well with LO 6.3.0.3. Tested with OpenSUSE 15 64bit rpm Linux.
Comment 20 Xisco Faulí 2019-08-05 14:22:24 UTC
(In reply to Robert Großkopf from comment #19)
> (In reply to Xisco Faulí from comment #18)
> > Hi Alex, Robert,
> > is this issue still reproducible in LibreOffice 6.2.5.2 ? What about
> > LibreOffice 6.3.0.3? Julien's patch was backported to 6.2 long time ago <
> > https://gerrit.libreoffice.org/#/c/66563/3 >
> 
> Doesn't work with LO 6.2.5.2, but works well with LO 6.3.0.3. Tested with
> OpenSUSE 15 64bit rpm Linux.

That's really interesting, so another commit fixed this issue and it hasn't been backported.
Could anyone please do a reverted bisection to see when it got fixed ?
Comment 21 Robert 2019-08-24 16:35:27 UTC
(In reply to Robert Großkopf from comment #19)
> (In reply to Xisco Faulí from comment #18)
> > Hi Alex, Robert,
> > is this issue still reproducible in LibreOffice 6.2.5.2 ? What about
> > LibreOffice 6.3.0.3? Julien's patch was backported to 6.2 long time ago <
> > https://gerrit.libreoffice.org/#/c/66563/3 >
> 
> Doesn't work with LO 6.2.5.2, but works well with LO 6.3.0.3. Tested with
> OpenSUSE 15 64bit rpm Linux.

I have just tried LO 6.2.6.2 and the DB is still read only. I tried version 6.3.0.4 and got the error "No sdbc driver found". I thought there was meant to be a native driver included for this. It has been so long since I have had this error that I can't remember what to do about it.
Comment 22 Robert Großkopf 2019-08-24 18:09:24 UTC
 
> I have just tried LO 6.2.6.2 and the DB is still read only. I tried version
> 6.3.0.4 and got the error "No sdbc driver found". I thought there was meant
> to be a native driver included for this. It has been so long since I have
> had this error that I can't remember what to do about it.

There must be a native driver. Have installed 6.3.0.4 here. Tables aren't write-protected, but new bugs appeared, which I already reported.
Comment 23 Robert 2019-09-09 16:13:25 UTC
I have just tried LO 6.2.7.1 and the DB is still read only. 

While trying 6.2.7.1 I also got the old substituting table name error which I had back in April this year. To fix it required changing the db:paramenter-name-subsitution from false to true in the content.xml file.

Am I really the only person who uses a mysql/mariadb database with LibreOffice and forms?
Comment 24 Alex Thurgood 2019-09-11 08:38:23 UTC
(In reply to Robert from comment #23)
> I have just tried LO 6.2.7.1 and the DB is still read only. 
> 
> While trying 6.2.7.1 I also got the old substituting table name error which
> I had back in April this year. To fix it required changing the
> db:paramenter-name-subsitution from false to true in the content.xml file.
> 
> Am I really the only person who uses a mysql/mariadb database with
> LibreOffice and forms?

OK, so I just downloaded 6271 and installed in parallel on a LinuxMint19 machine.

I can confirm that none of my data in the database is modifiable with this version, so the problem is still present, and has not been solved for the 6.2 line. I'm using the same database ODB file as I used in my tests with 6073-Ubuntu-18.04.9 and 6312-Ubuntu-snap, and for which editing of data is successful.
Comment 25 Robert Großkopf 2019-11-10 14:53:02 UTC
Connection will work with LO 6.3.3.2, direct connection on OpenSUSE 15 64bit rpm Linux.

There will no update be available for LO 6.2.*. So I will set this one to WORKSFORME.