Bug 96572 - garbage for null in non-nullable integer field
Summary: garbage for null in non-nullable integer field
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
5.2.0.0.alpha0+
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:5.1.0.2 target:5.2.0 target:5...
Keywords: bibisected, regression
Depends on:
Blocks:
 
Reported: 2015-12-17 22:58 UTC by Terrence Enger
Modified: 2016-10-25 19:11 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample database, Firebird (41.51 KB, application/vnd.oasis.opendocument.database)
2015-12-18 14:43 UTC, Terrence Enger
Details
example database, HSQLDB (3.44 KB, application/vnd.oasis.opendocument.database)
2015-12-18 14:44 UTC, Terrence Enger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Terrence Enger 2015-12-17 22:58:34 UTC
STR
---

( 0) In the following steps, I have inserted blanks for readability in
     the strings to be typed.  Do not actually type the blanks,

( 1) Enable experimental features.

( 2) Download and open attached fb.odb.  The enclosed Table1 has the
     first column "number" as primary key.

( 3) In pane Database, click icon <Tables>.

( 4) In pane Tables, right click Table1, and from pop-up menu select
     Open.

( 5) In window "Table 1 - fb", observe two columns and three rows of
     data, the values of "number" being (1,2,3), followed by a fourth
     empty row.

( 6) Type "<Down><Down><Down> 3 <Tab> drei <Tab>".  Program displays error message (newlines inserted):

         Error inserting the new record

         firebird_sdbc error:
         *violation of PRIMARY or UNIQUE KEY constraint "INTEG_2" on
             table "Table1"
         *Problematic key value is ("number = 3)
         caused by
         'isc_dsql_execute'

     This message is appropriate.

( 7) Click <OK>.  Program returns focus to "Table 1 - fb"; "drei" is
     reverse-image.

( 8) Type "<Backspace> <shift>+<Tab> <Backspace>".  The fourth row of
     the table is blank.

( 9) Type "<Alt>+F S".

(10) Type "<Alt>+F C".  Program returns focus to window "fb.odb".

(11) In pane Tables, right click Table1, and from pop-up menu select
     Open.

(12) In window "Table1 - fb", observe ...

     Expected : Three rows of data followed by a fourth blank row.

     Actual : The fourth row in column "number" shows a large number
              like -100920357 or 12632430 or -724851064; there is a
              fifth blank row.


I have observed this with LibreOffice daily dbgutil bibisect version
2015-12-04 ...

    Version: 5.2.0.0.alpha0+
    Build ID: 1fd41f43eb73c373cb94d32d82c5fb7a7e243367
    Threads 1; Ver: Linux 3.2; Render: default; 

    Locale: en-CA (en_CA.UTF-8)

... running in an environment chroot'd to debian-sid, and on some
Windows daily build, so I am setting O/S=All An embedded HSQLDB
database is similarly afflicted.

Within the daily dbgutil bibisect repository started 2015-05-20, I get
from `git bisect good` ...

    f39c4096f247626f7447321154de73b0c0dbc6b7 is the first bad commit
    commit f39c4096f247626f7447321154de73b0c0dbc6b7
    Author: Miklos Vajna <vmiklos@collabora.co.uk>
    Date:   Sun May 24 05:47:28 2015 +0200

        2015-05-24: source-hash-891304bb0ad3af9d8d73f947f25477abf57485a4

    :100644 100644 52f908d74b08372c4af8ab39a1d305b4340a9814 a8025630e6a3b02c8689947005f15c432a3d9124 M	build-info.txt
    :040000 040000 690e3195db7163c207fe50b4510f02058f5531f7 039a1db6db12117a8679909399f865b4dc0d0d16 M	opt

... and from `git bisect log` ...

    # bad: [c5625a3e1014766a488ca42e986be5dd3efbf051] 2015-11-24: source-hash-e5b3ec9683e4c5761633a1a3c4819a039e796b01
    # good: [2b392af9c8f54629e3a3a98a8c92fa5af1c6722f] 2015-05-20: source-hash-90e2dabb8d0bb5382234be776c2ad0e2d5d9e224
    git bisect start 'c5625a3' '2b392af'
    # bad: [a8d19eafb9e195a85359dd8cdc5c46c38295caa0] 2015-08-22: source-hash-79fb61efb847405fa47235002b52ee8efad5e339
    git bisect bad a8d19eafb9e195a85359dd8cdc5c46c38295caa0
    # bad: [c9abefa2facd9d5f2989bbc2138e55970e60c4cd] 2015-07-06: source-hash-64385c7555c6bbb089f3ab8b2a5b623cadd6ee7d
    git bisect bad c9abefa2facd9d5f2989bbc2138e55970e60c4cd
    # bad: [d3328123e5e86a74111ff9f1fcdd742973bd3c80] 2015-06-12: source-hash-bb9dad2ef23829b2500c9f99154bca6a8ba7d49a
    git bisect bad d3328123e5e86a74111ff9f1fcdd742973bd3c80
    # bad: [f66b13d237da5d0a5ec7b5856a2c3b8224c30aa6] 2015-05-31: source-hash-4618d15cb73d0f0c15e0f4d2a6ce9cdbe6eeef24
    git bisect bad f66b13d237da5d0a5ec7b5856a2c3b8224c30aa6
    # bad: [a63d7336fa8ea346b4deb2d4076cbe8a1cd75d65] 2015-05-25: source-hash-b9630867d17c01ec41f6461b1e96288f3932248c
    git bisect bad a63d7336fa8ea346b4deb2d4076cbe8a1cd75d65
    # good: [33e7c549fd7aa03e831a939201aa06dd80edb2b0] 2015-05-22: source-hash-edcd1d5a9c88455fd1d52ab25815fc8d439f31ec
    git bisect good 33e7c549fd7aa03e831a939201aa06dd80edb2b0
    # bad: [f39c4096f247626f7447321154de73b0c0dbc6b7] 2015-05-24: source-hash-891304bb0ad3af9d8d73f947f25477abf57485a4
    git bisect bad f39c4096f247626f7447321154de73b0c0dbc6b7
    # good: [6178f2a1052f501e7b34ad168708c6744a1838eb] 2015-05-23: source-hash-9db629b8a1fa9b63bc320f8d47594ec82511a9c5
    git bisect good 6178f2a1052f501e7b34ad168708c6744a1838eb
    # first bad commit: [f39c4096f247626f7447321154de73b0c0dbc6b7] 2015-05-24: source-hash-891304bb0ad3af9d8d73f947f25477abf57485a4

... so I am setting keywords regression bibisected.
Comment 1 Alex Thurgood 2015-12-18 08:59:00 UTC
Can't currently test on my Mac dbgutil builds as firebird support disabled.
Comment 2 Robinson Tryon (qubit) 2015-12-18 09:38:20 UTC Comment hidden (obsolete)
Comment 3 Terrence Enger 2015-12-18 14:43:46 UTC
Created attachment 121386 [details]
sample database, Firebird

Whoops.  I forgot to attached the promised database file.  Also
attaching an HSQLDB example.  They seem to work the same way.
Comment 4 Terrence Enger 2015-12-18 14:44:38 UTC
Created attachment 121387 [details]
example database, HSQLDB
Comment 5 Lionel Elie Mamane 2015-12-18 15:20:03 UTC
(In reply to Terrence Enger from comment #4)
> Created attachment 121387 [details]
> example database, HSQLDB

I can't reproduce with HSQLDB... There, when trying to insert the blank row, I get an error message "Error inserting the new record. Attempt to insert null intoa non-nullable colum, ..."

Can reproduce with Firebird
Comment 6 Commit Notification 2015-12-18 15:58:07 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=3ac3aff895ceb466934a2e22641f5340ea6d23f7&h=libreoffice-5-1

tdf#96572 firebird correctly transmit request for NULL

It will be available in 5.1.0.2.

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 7 Commit Notification 2015-12-18 16:00:01 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

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

tdf#96572 firebird correctly transmit request for NULL

It will be available in 5.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 8 Terrence Enger 2015-12-19 05:04:35 UTC
With daily dbgutil version 2015-12-19, the program at step (9) is
admirably persistent in complaining ...

    Error updating the current record
    Attempt to insert null into a non-nullable column ...

and it is equally persistent if I try to save the record in response
to the dialog at step (10).


Thank you, Lionel.  That was a fast response.  I am setting status
VERIFIED FIXED.
Comment 9 Commit Notification 2015-12-24 21:01:42 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-5-0":

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

tdf#96572 firebird correctly transmit request for NULL

It will be available in 5.0.5.

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.