Problem description: When selecting the Text [VARCHAR] , the Length property varies depending upon what field type has been selected before it. If the the previous selection was Yes/No [BOOLEAN], the Length is 1. If the previous selection was Binary [BINARY], the Length is 2147483647. But when a new field is created, Change the Field Type to Text [VARCHAR] and observe the Length in the Field Properties. But if a new field is created, Text [VARCHAR] is the selected Field Type and the Length is 100. The same situation seems to be true for Text [CHAR] Steps to reproduce: 1. Open the Table Design dialog. 2. Enter a field name. 3. Enter the Field Type as Yes/No [BOOLEAN] 4. Change the Field Type to Text [VARCHAR] and observe the Length in the Field Properties. 5. Change the Field Type to Binary [BINARY] and observe the Length in the Field Properties. 6. Change the Field Type to Text [VARCHAR] and observe the Length in the Field Properties. Current behavior: When changing a Field Type to Text [VARCHAR] or Text [CHAR], the Length property does not change from what it was before. Expected behavior: When selecting Text [VARCHAR] or Text [CHAR] as the Field Type, the Length should be 100 in the Field Properties. Platform (if different from the browser): Browser: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120715 SeaMonkey/2.11
I can reproduce this behaviour on Linux Mint 64 bit with : LibreOffice 3.4.4 OOO340m1 (Build:402) Changing version to earliest version known to display buggy behaviour and confirming. @Lionel : assigning to you, if you have time to take a look, otherwise reassign to default. Alex
And also reproducible in Version 3.6.0.4 (Build ID: 932b512) Alex
Although I haven't tested, I'm assuming that if a user was not paying attention and saved the table as he/she had designed it with the buggy behaviour defaults, then any attempt to enter data subsequently, which was greater than the length of the assigned default length would truncate or fail ? Alex
Yep, the following error message : SQL Status: 22001 Error code: -124 Value too long in statement [INSERT INTO "Table1" ( "active","ctry","top","txt") VALUES ( ?,?,?,?)] The final field "txt" was defined first as BOOLEAN, then I used the dropdown list to change it to VARCHAR and saved the table. Opened table in data entry mode, and started typing, using tab to switch between fields. The error message is produced when I try to tab out of the tuple and into the next new one. So at least there is some kind of warning for the user at the data entry level. Alex
Oooh, this behaviour has just caused me to notice an unwanted side effect that IMO is a bug : Each failed insert causes the autoincrement index to update itself such that when the record is finally successfully written, the index with the latest increment gets written to the table. Failed inserts should not update the autoincrement counter. I'll file a separate issue for that. Alex
I'm not 100% convinced that we should always reset the length to its (type-specific) default value. Not even sure we should *ever* do it. After all, the data that is already in these columns is type-converted, and the length specifier tells us how long it needs to be! For example: - change from VARCHAR to CHAR or vice-versa: these are similar datatypes, the length should be kept always. - change from FLOAT/NUMERIC/INTEGER to (VAR)CHAR: the number will be changed to a decimal representation, and the length specifier tells us the maximal length the result will have.
I'm not sure I completely agree with you. However, this is a small issue since a person is suppose to know what length each field should be before creating the database. There is another another bug I plan to file this afternoon that needs much more attention than this does (LO 3.6.0.4 corrupts the Base database document file).
*** This bug has been marked as a duplicate of bug 49054 ***