Bug Hunting Session
Bug 118680 - Access2Base error when updating VARCHAR_IGNORECASE columns
Summary: Access2Base error when updating VARCHAR_IGNORECASE columns
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
6.0.5.2 release
Hardware: All All
: medium normal
Assignee: Jean-Pierre Ledure
URL:
Whiteboard: target:6.2.0
Keywords:
: 121424 (view as bug list)
Depends on:
Blocks:
 
Reported: 2018-07-10 21:12 UTC by alan.wb.le
Modified: 2018-11-15 15:36 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample macro that demonstrates the bug (4.64 KB, application/vnd.oasis.opendocument.database)
2018-07-12 04:52 UTC, alan.wb.le
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alan.wb.le 2018-07-10 21:12:02 UTC
Description:
When modifying a column of datatype VARCHAR_IGNORECASE in BASIC using the Acess2Base field.value property, the error "Error #12 (Variable not defined) occurred at line 776 in Field.setValue" is displayed.

Steps to Reproduce:
1.In BASIC, attempt to modify the value property of an Access2Base field object whose Base datatype is VARCHAR_IGNORECASE
2.
3.

Actual Results:
The message "Error #12 (Variable not defined) occurred at line 776 in Field.setValue" is displayed

Expected Results:
The field value should change without any error messages


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Xisco Faulí 2018-07-11 11:44:46 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 2 alan.wb.le 2018-07-12 04:52:02 UTC
Created attachment 143497 [details]
Sample macro that demonstrates the bug

The sample database contains a single procedure, which demonstrates the bug when attempting to update the value of the VARCHAR_IGNORECASE field test_varchar_ignorecase in the table tblTest.
Comment 3 alan.wb.le 2018-07-12 04:52:54 UTC
Sample document attached as requested
Comment 4 Drew Jensen 2018-07-12 16:04:20 UTC
Confirmed using Ubuntu 18.04 and LibO 6.0.5

The author of acess2base offered a work around and a patch on a form post about this. https://forum.openoffice.org/en/forum/viewtopic.php?f=47&t=61447&start=30#p448899
Comment 5 Commit Notification 2018-07-18 14:49:04 UTC
Jean-Pierre Ledure committed a patch related to this issue.
It has been pushed to "master":

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

Access2Base - tdf#118680 Fix VARCHAR_IGNORECASE error

It will be available in 6.2.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 6 Jean-Pierre Ledure 2018-07-18 15:02:24 UTC
Access2Base checks the content of the Precision property (https://api.libreoffice.org/docs/idl/ref/servicecom_1_1sun_1_1star_1_1sdbcx_1_1Column.html#a20390f2d88c0849fd6cd9d115f502e3a) of the com.sun.star.sdbcx.Column service to know the maximum allowed string length and reports an overflow error if the maximum length is exceeded.

For VARCHAR fields the Precision property contains a non-zero value, typically 2^31), while it contains 0 for VARCHAR_IGNORECASE fields.

A patch has been pushed (https://gerrit.libreoffice.org/gitweb?p=core.git;a=commit;h=7ea081d9f7938c59b1f71399bf32ce3fb738ad66) on master to avoid a test on the field maximum length when the maximum length is undefined (i.e. Precision = 0).

JPL
Comment 7 Jean-Pierre Ledure 2018-11-15 15:36:41 UTC
*** Bug 121424 has been marked as a duplicate of this bug. ***