Bug 92322 - EDITING - MEMO (TEXT) fields refuse data entry with MySQL and JDBC connector on OSX
Summary: EDITING - MEMO (TEXT) fields refuse data entry with MySQL and JDBC connector ...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.4.3.2 release
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: notBibisectable, regression
Depends on:
Blocks: Database-Connectivity
  Show dependency treegraph
 
Reported: 2015-06-25 06:54 UTC by PJG51
Modified: 2017-07-31 08:59 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Apple crash trace (102.59 KB, text/plain)
2015-06-25 09:31 UTC, Alex Thurgood
Details
bt for crash on master (30.66 KB, text/plain)
2015-06-25 09:57 UTC, Alex Thurgood
Details
bt with debug symbols (9.42 KB, text/plain)
2015-06-27 06:33 UTC, Julien Nabet
Details

Note You need to log in before you can comment on or make changes to this bug.
Description PJG51 2015-06-25 06:54:24 UTC
System : Yosemite 10.10.3
Java : 1.6.0-65
MySQL Connector : 5.1.35

MySQL Database : no possible to change a field in TEXT format. But, no problem with fields in VARCHAR(n) format.

Regards,
PJG51
Comment 1 Alex Thurgood 2015-06-25 08:26:51 UTC
@PJG51: please explain what exactly it is that you are trying to do :

- change the definition of a field type to TEXT ?
- change the data in a TEXT field type to something else (overwrite) ?

Setting to NEDDINFO. Please set back to UNCONFIRMED once you have provided detailed steps of what you are attempting to do, what you expect to see, and what you actually experience. Thank you.
Comment 2 Alex Thurgood 2015-06-25 08:46:27 UTC
Confirmed on

Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Locale : fr_

1) Create an ODB file that connects to a mysql server db via the mysql JDBC connector.

2) Create a table within the ODB via the Table creation GUI with the following definitions :


ID INT UNSIGNED AUTO_INCREMENT PRIMARY KEY
text1 MEMO (TEXT) default length (65535) - NULL ALLOWED
text2 VARCHAR  default length (1° - NULL ALLOWED

3) Save the table and then open it for data entry

Try entering data in the MEMO field : the data is preliminarily displayed, but when you press tab or enter, it disappears.
Try entering data in the VARCHAR field - the data is accepted and the record created.

If the table issetup to have just an ID field as above and a MEMO field, then no data entry at all is possible.

Cross checking with a terminal connection to the same db, the table shows the following :

mysql> select * from gibberish;
+----+-----------+---------------+
| id | gibberish | moregibberish |
+----+-----------+---------------+
|  1 | NULL      | huytgfrdes    |
+----+-----------+---------------+
1 row in set (0,01 sec)
Comment 3 Alex Thurgood 2015-06-25 08:53:02 UTC
The problem appears specific to use of the JDBC connector, as the direct native mysql connector allows me to enter data into the MEMO field.
Comment 4 Alex Thurgood 2015-06-25 08:54:47 UTC
Which, unless the problem is ubiquitous to all mysql JDBC drivers irrespective of OS, is naturally a problem on Mac, as there is no native connector extension provided  ;-)
Comment 5 Alex Thurgood 2015-06-25 09:12:52 UTC
Well, having tested the same ODB on

Version: 4.1.4.2
Build ID: 0a0440ccc0227ad9829de5f46be37cfb6edcf72

with connector 5.1.21

it works ok there ==> regression
Comment 6 Alex Thurgood 2015-06-25 09:30:54 UTC
On master build


I get a magnificent abort :

Application Specific Information:
Assertion failed: (nShortenedLength >= 0), function rtl_ustr_shortenedCompare_WithLength, file /Volumes/BUILDHD/Shared/LO/core/sal/rtl/strtmpl.cxx, line 169.


Apple trace enclosed.
Comment 7 Alex Thurgood 2015-06-25 09:31:19 UTC
Created attachment 116821 [details]
Apple crash trace
Comment 8 PJG51 2015-06-25 09:53:26 UTC
So thanks Alex, I think you've been around the problem!
But I don't think this bug is completely linked to MySQL Connector, because it works properly with NeoOffice…
Comment 9 Alex Thurgood 2015-06-25 09:57:31 UTC
(In reply to PJG51 from comment #8)
> So thanks Alex, I think you've been around the problem!
> But I don't think this bug is completely linked to MySQL Connector, because
> it works properly with NeoOffice…

As I mentioned in comment 5, it works with an older version of LibreOffice, so this is a regression.
Comment 10 Alex Thurgood 2015-06-25 09:57:55 UTC
Created attachment 116823 [details]
bt for crash on master
Comment 11 Julien Nabet 2015-06-27 06:31:07 UTC
On pc Debian x86-64 with master sources updated yesterday, I don't reproduce the crash when adding entry or the disappear symptom.
But memo field is limited to 4 character whereas size field is 65535.
I had a crash when viewing table structure then close window.
Comment 12 Julien Nabet 2015-06-27 06:33:40 UTC
Created attachment 116859 [details]
bt with debug symbols
Comment 13 Julien Nabet 2015-06-27 08:56:17 UTC
I just noticed, I used MariaDb, not Mysql connector
(here's an extract of my autogen.input:
--without-system-mariadb
--enable-ext-mariadb-connector
--enable-bundle-mariadb
)

With Mysql/jdbc, no crash neither when browsing data nor editing then closing table.
Also, I can enter more than 4 characters in memo field.
Comment 14 Philippe Jung 2015-06-29 14:33:06 UTC
*** Bug 92366 has been marked as a duplicate of this bug. ***
Comment 15 Commit Notification 2015-06-29 15:42:39 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

Related tdf#92322: fix crash with doCursor

It will be available in 5.1.0.

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 16 Philippe Jung 2015-06-29 15:47:40 UTC
Tested with the steps described in Bug 92366 on Linux Mint.
Crashing before the patch, working after.

Thanks.
Comment 17 Lionel Elie Mamane 2015-06-29 16:48:00 UTC
This bug is not about the crash. Reopening.
Comment 18 Commit Notification 2015-06-30 11:25:46 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=57eb935945a76d587490e393954c06d1c8972471&h=libreoffice-5-0

Related tdf#92322: fix crash with doCursor

It will be available in 5.0.0.3.

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 19 Robinson Tryon (qubit) 2015-12-10 01:26:20 UTC Comment hidden (obsolete)
Comment 20 Alex Thurgood 2017-07-31 08:59:57 UTC
This is now WFM with

Version: 5.3.4.2
Build ID: f82d347ccc0be322489bf7da61d7e4ad13fe2ff3
Threads CPU : 4; Version de l'OS :Mac OS X 10.12.6; UI Render : par défaut; Moteur de mise en page : nouveau; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group

and mysql jdbc connector 5.1.43