Bug 72568 - Other: MySQL/MariaDB direct connection - Fields in a form are limited by the max. numbers of characters entered before in the field
Summary: Other: MySQL/MariaDB direct connection - Fields in a form are limited by the ...
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.0.3.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-10 15:58 UTC by Lelanthran
Modified: 2016-08-16 14:26 UTC (History)
1 user (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 Lelanthran 2013-12-10 15:58:12 UTC
A Base form, connected to a MySQL database, limits the number of characters entered into textboxes. The limit is the number of characters used for the very first entry made with the form, for each textbox

Steps to reproduce:
1. Connect to a MySQL Database using Base
2. Create a table with two fields, ID (BIGINT, AUTONUMBER) and TEST (VARCHAR, LENGTH=100)
3. Use the FormWizard to create a form for this table
4. Using the form created above, enter "abc" into the textbox and save the record.
5. Create a new record using the form; ensure that the textbox for the TEST field is set to 100 characters.
6. Try to enter more than three characters into the texbox while creating the second record using the form.

Current behavior:
Only the first three characters are entered. Anything typed after the first three characters are neither displayed nor saved.

Expected behavior:
The textbox should limit entry to 100 characters and not to three.


Operating System: Debian
Version: 4.0.3.3 release
Comment 1 Robert Großkopf 2013-12-10 19:18:12 UTC
I have tested with LO 4.1.1.2 and OpenSUSE 12.3 64bit rpm Linux. There are different behaviors with different connections from Base to MariaDB (haven't MySQL on my system).
Have created a form for every of the following connections and tried the input in the form and the input in the table.
No problem, when connection with ODBC or connecting with JDBC to the MariaDB.
The following buggy behavior appears on my system only with the direct driver, supported by SUSE only for my system:
Tyope a new text in the field of a form. The text is limited to the maximum inputted chars in this field of the table. If there had been the maximum 15 chars, the text in the form ends with 15 chars - more input impossible. I changed to the table - could input more text, for example up to 25 chars. Went back to the form and I could input 25 chars in the form - no more. Seems the max textlength of the field in the form is limited by the max text-length selected form the field - not selected from the properties of the field of the table.

Do you have the same problems with the same connection? If yes I will put this bug to new and change the title a little bit (MySQL/MariaDB and direct connection).
Comment 2 Lionel Elie Mamane 2014-04-28 13:06:25 UTC
Work-around: set the "Max. text length" property on the affected control.
Comment 3 Lionel Elie Mamane 2014-04-28 15:58:59 UTC
This comes directly from the MySQL Connector/C++ which reports the maximum occuring length (and not the maximum possible length) as getPrecision(). In my understanding, that's a bug in MySQL Connector/C++, wich claims it follows the JDBC API, so there is "no reason" to return a different result than the JDBC (or ODBC) drivers.
Comment 4 Robert Großkopf 2016-08-16 10:31:39 UTC
While helping other people with database I have again problems with this bug. Numbers of characters are limited in forms to the maximum numbers, which had been read out of the field before.

This bug in forms only appears with the direct connection, doesn't appear with the JDBC-connection. So it seems to be a special bug of the enstions:
http://extensions.libreoffice.org/extension-center/mysql-native-connector

2 possibilities: 

Anybody, who is able to fix the bug will fix it.

Delete the mysql-native-connector from the list of extensions, because it is unusable with forms.
Comment 5 Lionel Elie Mamane 2016-08-16 14:26:12 UTC
(In reply to robert from comment #4)
> While helping other people with database I have again problems with this
> bug. Numbers of characters are limited in forms to the maximum numbers,
> which had been read out of the field before.

As I explained above, report the bug to MySQL Connector/C++