Bug 122446 - MariaDB native connector: All tables are write protected
Summary: MariaDB native connector: All tables are write protected
Status: NEW
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
Depends on:
Blocks:
 
Reported: 2019-01-03 14:29 UTC by Robert Großkopf
Modified: 2019-03-17 10:08 UTC (History)
2 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.