Bug 278295

Summary: Field length constraint is not enforced
Product: [Applications] KEXI Reporter: Dimitrios T Tanis <dimitrios.tanis>
Component: TablesAssignee: Jarosław Staniek <staniek>
Status: CLOSED FIXED    
Severity: normal    
Priority: NOR    
Version: 2.4 alpha3 (Calligra 2.4 alpha3)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 2.4.0
Sentry Crash Report:

Description Dimitrios T Tanis 2011-07-22 21:46:33 UTC
Version:           2.4 alpha3 (Calligra 2.4 alpha3) (using KDE 4.6.0) 
OS:                Linux

Field length constraint althgough inserted during table design is not enforced when entering data.

Reproducible: Always

Steps to Reproduce:
Create a table > set a field's type to text > set length to any value

Actual Results:  
Any data length can be inserted in the field at data view. The length property is ignored.

Expected Results:  
The field should obey the length contraint.

It doesn't even work with the initial 200 limit. (Yes I typed 201 ABCs) :)
Comment 1 Jarosław Staniek 2011-07-22 21:54:19 UTC
Good shot.
Are forms affected too?
Comment 2 Dimitrios T Tanis 2011-07-22 22:01:06 UTC
Yes forms are affected also
Comment 3 Dimitrios T Tanis 2011-07-22 22:29:31 UTC
Forgot to say:
As SQLite's type affinity and dynamic typing does not enforce length constrains, enforcing this behaviour should be handled in kexi (using SQLite's length property though)
Comment 4 Dimitrios T Tanis 2012-03-09 15:23:21 UTC
Git commit ad8ead2d8cd5dec1ffbb0c452d5dc58618c2b35c by Dimitrios T. Tanis.
Committed on 09/03/2012 at 16:14.
Pushed by tanis into branch 'kexi-features-tanis'.

Enforce field length contraint in table view

Field length constraint is now enforced in table view as set in length
property. Since SQLite has dynamic types and does not enforce it, it is
handled internally in Kexi.

M  +2    -0    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/ad8ead2d8cd5dec1ffbb0c452d5dc58618c2b35c
Comment 5 Dimitrios T Tanis 2012-03-12 23:43:46 UTC
Git commit 35d45f6539057d1338e70292b884d0ccbf4c798f by Dimitrios T. Tanis.
Committed on 13/03/2012 at 00:35.
Pushed by tanis into branch 'kexi-features-tanis'.

Enforce field length constraint in Forms for LineEdit and TextEdit

Field length constraint is enforced in forms when using either a
lineEdit or textEdit. Since SQLite has dynamic types and does not
enforce it, it is handled internally in Kexi.
FIXED-IN: 2.5 ALPHA 2
GUI: Field Length constraint is now enforced.
DIGEST: Field Length constraint is now enforced in Kexi.

M  +5    -0    kexi/plugins/forms/widgets/kexidblineedit.cpp
M  +18   -1    kexi/plugins/forms/widgets/kexidbtextedit.cpp
M  +3    -0    kexi/plugins/forms/widgets/kexidbtextedit.h

http://commits.kde.org/calligra/35d45f6539057d1338e70292b884d0ccbf4c798f
Comment 6 Jarosław Staniek 2012-03-13 13:00:26 UTC
Git commit ee6341e6334e5820409c687853b72e0717dccef5 by Jaroslaw Staniek, on behalf of Dimitrios T. Tanis.
Committed on 09/03/2012 at 16:14.
Pushed by staniek into branch 'calligra/2.4'.

Enforce field length contraint in table view

Field length constraint is now enforced in table view as set in length
property. Since SQLite has dynamic types and does not enforce it, it is
handled internally in Kexi.

REVIEWED by staniek@kde.org

M  +2    -0    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/ee6341e6334e5820409c687853b72e0717dccef5
Comment 7 Jarosław Staniek 2012-03-13 13:00:26 UTC
Git commit 9a26b59891f83f874d122984190d4b0c740da626 by Jaroslaw Staniek, on behalf of Dimitrios T. Tanis.
Committed on 13/03/2012 at 00:35.
Pushed by staniek into branch 'calligra/2.4'.

Enforce field length constraint in Forms for LineEdit and TextEdit

Field length constraint is enforced in forms when using either a
lineEdit or textEdit. Since SQLite has dynamic types and does not
enforce it, it is handled internally in Kexi.
FIXED-IN: 2.4.0

REVIEWED by staniek@kde.org

M  +5    -0    kexi/plugins/forms/widgets/kexidblineedit.cpp
M  +18   -1    kexi/plugins/forms/widgets/kexidbtextedit.cpp
M  +3    -0    kexi/plugins/forms/widgets/kexidbtextedit.h

http://commits.kde.org/calligra/9a26b59891f83f874d122984190d4b0c740da626
Comment 8 Dimitrios T Tanis 2012-03-13 23:12:07 UTC
Git commit 63026a960095f881d0c7d230049a7cc6b1aa636f by Dimitrios T. Tanis.
Committed on 13/03/2012 at 00:35.
Pushed by tanis into branch 'master'.

Enforce field length constraint in Forms for LineEdit and TextEdit

Field length constraint is enforced in forms when using either a
lineEdit or textEdit. Since SQLite has dynamic types and does not
enforce it, it is handled internally in Kexi.
FIXED-IN: 2.5 ALPHA 2
GUI: Field Length constraint is now enforced.
DIGEST: Field Length constraint is now enforced in Kexi.

M  +5    -0    kexi/plugins/forms/widgets/kexidblineedit.cpp
M  +18   -1    kexi/plugins/forms/widgets/kexidbtextedit.cpp
M  +3    -0    kexi/plugins/forms/widgets/kexidbtextedit.h

http://commits.kde.org/calligra/63026a960095f881d0c7d230049a7cc6b1aa636f
Comment 9 Dimitrios T Tanis 2012-03-13 23:12:07 UTC
Git commit 25d96f54966c36e3695ec4224675957b0cac704e by Dimitrios T. Tanis.
Committed on 09/03/2012 at 16:14.
Pushed by tanis into branch 'master'.

Enforce field length contraint in table view

Field length constraint is now enforced in table view as set in length
property. Since SQLite has dynamic types and does not enforce it, it is
handled internally in Kexi.

M  +2    -0    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/25d96f54966c36e3695ec4224675957b0cac704e