[Libreoffice-bugs] [Bug 116253] 'NULL' appears as default text in text and combo boxes when editing a newly inserted record in a form's table control

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Jun 7 18:52:33 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=116253

Howard Johnson <BridgeportContractor at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WORKSFORME                  |---
             Status|RESOLVED                    |REOPENED

--- Comment #9 from Howard Johnson <BridgeportContractor at gmail.com> ---
STEPS TO RECREATE THIS BUG:

1) Load the SQL (please cut and paste from bottom of this description) into a
MariaDB database.  This creates a simple database called 'journal' with two
tables.

2) Open 'NULL bug - mariadb.odb' (attached).  

3) Right click on one of the tables and set the database properties so you can
connect to, and then view the tables.  

I use the following setup but yours may vary:

  ---------------------------------------------------------
  Advanced Properties tab:
    General
        Name of the MySQL database:   journal

    User Authentication
        User name: _____________
        x Password required
  ---------------------------------------------------------
  Additional Settings tab:
      Host name: localhost
      Port number: 3306
      MySQL JDBC driver class: org.mariadb.jdbc.Driver

  Data Conversion
      Character set:   System
  ---------------------------------------------------------


4) In Forms, open the form named 'JOURNAL'.  

5) In the Table Control, in the white space under 'Debit' enter any number and
then save the record (either by clicking down arrow, Return-Return (twice), or
the save icon).


BUGGY RESULT: 'NULL' appears just to the right of the number you just entered,
(same line but under the 'To (in Combo Box)' column header).

Expected result: This box should have remained empty, as nothing was entered in
it.

Notes:

* Embedded HSQLDB 1.8 doesn't fail this way.  Test with 'NULL bug - hsqldb.odb'
(also attached).

* Setting the Filter property seems to make this bug become visible.  If you
edit the 'JOURNAL' form and open the Form Navigator, then right click on
'Main', and open properties, and then select the Data tab, you'll notice that
the Filter property is set to '( `journal`.`Account ID` = 11 )' which is used
to provide a sub-set of the table to edit.  



=============================================================================
=== Cut and use this SQL below to create your MariaDB test database =========
=============================================================================

-- --------------------------------------------------------
-- Host:                         127.0.0.1
-- Server version:               10.2.15-MariaDB-10.2.15+maria~stretch-log -
mariadb.org binary distribution
-- Server OS:                    debian-linux-gnu
-- HeidiSQL Version:             9.5.0.5196
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0
*/;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


-- Dumping database structure for journal
CREATE DATABASE IF NOT EXISTS `journal` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `journal`;

-- Dumping structure for table journal.journal
CREATE TABLE IF NOT EXISTS `journal` (
  `Journal ID` int(11) NOT NULL AUTO_INCREMENT,
  `Account ID` int(11) DEFAULT NULL COMMENT 'Financial account',
  `Debit` decimal(19,2) DEFAULT NULL,
  `To` varchar(50) DEFAULT NULL COMMENT 'For debits who the money goes to.  For
credits who the money goes from.',
  PRIMARY KEY (`Journal ID`),
  KEY `Account ID` (`Account ID`),
  KEY `To` (`To`)
) ENGINE=InnoDB AUTO_INCREMENT=22364 DEFAULT CHARSET=utf8;

-- Dumping data for table journal.journal: ~10 rows (approximately)
/*!40000 ALTER TABLE `journal` DISABLE KEYS */;
/*!40000 ALTER TABLE `journal` ENABLE KEYS */;

-- Dumping structure for table journal.tos
CREATE TABLE IF NOT EXISTS `tos` (
  `To ID` int(11) NOT NULL AUTO_INCREMENT,
  `To` varchar(50) NOT NULL,
  PRIMARY KEY (`To`),
  KEY `To ID` (`To ID`)
) ENGINE=InnoDB AUTO_INCREMENT=715 DEFAULT CHARSET=utf8;

-- Dumping data for table journal.tos: ~2 rows (approximately)
/*!40000 ALTER TABLE `tos` DISABLE KEYS */;
/*!40000 ALTER TABLE `tos` ENABLE KEYS */;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1,
@OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180607/8ec6c318/attachment.html>


More information about the Libreoffice-bugs mailing list