Bug 301277 - Remove limits for Text data type, leave as option
Summary: Remove limits for Text data type, leave as option
Status: CLOSED FIXED
Alias: None
Product: KEXI
Classification: Unclassified
Component: Tables (show other bugs)
Version: 2.5 alpha1
Platform: Compiled Sources All
: NOR task (vote)
Target Milestone: ---
Assignee: Jarosław Staniek
URL: http://forum.kde.org/viewtopic.php?f=...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-06 12:06 UTC by Jarosław Staniek
Modified: 2013-11-07 14:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.4.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jarosław Staniek 2012-06-06 12:06:07 UTC
Kexi <= 2.5 Alpha 1 sets limit of 200 characters for Text data type. For file-based projects (sqlite3) this is superficial since there's no such limitation in sqlite3. Limits are useful in some cases generally not needed. They can also lead to usability issues: https://bugs.kde.org/show_bug.cgi?id=301136.

Steps to Reproduce: 1. Create table with Text field

Actual Results:
Length property indicates value: 200.

Expected Results:
Length property should indicate value: 0, i.e. no limits.

Additional info:
Backport to 2.4.3 to avoid the issue explained in bug 301136.
Comment 1 Jarosław Staniek 2012-06-06 12:08:17 UTC
Setting the Length property to value > 0 should be still possible to have access to the limit feature.
Comment 2 Jarosław Staniek 2012-06-07 22:56:47 UTC
Git commit 094bc376058cbf21ab3fb211377c7557fa71f9e5 by Jaroslaw Staniek.
Committed on 06/06/2012 at 14:26.
Pushed by staniek into branch 'master'.

KexiDB: Remove limits for Text data type, leave as option

Now: by default there are no limits in Text data type
REVIEW:105161

M  +11   -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +2    -2    kexi/kexidb/alter.cpp
M  +1    -1    kexi/kexidb/alter.h
M  +19   -5    kexi/kexidb/connection.cpp
M  +1    -1    kexi/kexidb/drivers/xbase/xbaseexport.cpp
M  +4    -1    kexi/kexidb/expression.cpp
M  +40   -14   kexi/kexidb/field.cpp
M  +64   -25   kexi/kexidb/field.h
M  +5    -5    kexi/kexidb/utils.cpp
M  +4    -1    kexi/migration/xbase/xbasemigrate.cpp
M  +3    -1    kexi/plugins/forms/widgets/kexidblineedit.cpp
M  +3    -1    kexi/plugins/forms/widgets/kexidbtextedit.cpp
M  +3    -2    kexi/plugins/scripting/kexidb/kexidbfield.cpp
M  +1    -1    kexi/plugins/tables/kexitabledesignerview.cpp
M  +3    -3    kexi/plugins/tables/kexitabledesignerview_p.cpp
M  +2    -2    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/094bc376058cbf21ab3fb211377c7557fa71f9e5
Comment 3 Jarosław Staniek 2012-06-09 10:32:17 UTC
Git commit a2eab2585489341ee359f612ab54fc5f14b5a5b0 by Jaroslaw Staniek.
Committed on 06/06/2012 at 14:26.
Pushed by staniek into branch 'calligra/2.4'.

KexiDB: Remove limits for Text data type, leave as option

Now: by default there are no limits in Text data type
REVIEW:105161

M  +11   -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +2    -2    kexi/kexidb/alter.cpp
M  +1    -1    kexi/kexidb/alter.h
M  +19   -5    kexi/kexidb/connection.cpp
M  +1    -1    kexi/kexidb/drivers/xbase/xbaseexport.cpp
M  +4    -1    kexi/kexidb/expression.cpp
M  +40   -16   kexi/kexidb/field.cpp
M  +64   -25   kexi/kexidb/field.h
M  +5    -5    kexi/kexidb/utils.cpp
M  +4    -1    kexi/migration/xbase/xbasemigrate.cpp
M  +5    -2    kexi/plugins/forms/widgets/kexidblineedit.cpp
M  +5    -2    kexi/plugins/forms/widgets/kexidbtextedit.cpp
M  +3    -2    kexi/plugins/scripting/kexidb/kexidbfield.cpp
M  +1    -1    kexi/plugins/tables/kexitabledesignerview.cpp
M  +3    -3    kexi/plugins/tables/kexitabledesignerview_p.cpp
M  +3    -2    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/a2eab2585489341ee359f612ab54fc5f14b5a5b0
Comment 4 Jarosław Staniek 2012-06-09 11:54:23 UTC
Git commit da2bf9b689ead286dbed755d51802c581aea4ca4 by Jaroslaw Staniek.
Committed on 08/06/2012 at 01:35.
Pushed by staniek into branch 'master'.

Set limit to 255 for Text type in MySQL Driver

MySQL Driver:
*set limit to 255 characters for Text type (VARCHAR)
*call "SET SESSION sql_mode='TRADITIONAL'" on opening database - needed to turn warnings about trimming string values into SQL errors
*practical solution for 'Kexi shows no indication that text is trimmed' bug in case of MySQL: error is displayed eg. "Record inserting on the server failed.Message from server: Data too long for column 'hn' at row 1. SQL statement: INSERT INTO table4 (hn) VALUES ('...................'). Server result: 1406"

More info on VARCHAR support in databases: http://www.ispirer.com/wiki/sqlways/mysql/data-types/varchar_n
Related: bug 301136
REVIEW:105182
FIXED-IN:2.4.3

M  +12   -2    kexi/doc/dev/CHANGELOG-Kexi-js
M  +18   -2    kexi/kexidb/connection.cpp
M  +1    -0    kexi/kexidb/driver.cpp
M  +7    -0    kexi/kexidb/driver_p.h
M  +8    -1    kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp
M  +2    -0    kexi/kexidb/drivers/mySQL/mysqldriver.cpp

http://commits.kde.org/calligra/da2bf9b689ead286dbed755d51802c581aea4ca4
Comment 5 Jarosław Staniek 2012-06-09 12:49:54 UTC
Git commit 366d03dbbf73d7773235b4ee45be99d5b02b33bf by Jaroslaw Staniek.
Committed on 08/06/2012 at 01:35.
Pushed by staniek into branch 'calligra/2.4'.

Set limit to 255 for Text type in MySQL Driver

MySQL Driver:
*set limit to 255 characters for Text type (VARCHAR)
*call "SET SESSION sql_mode='TRADITIONAL'" on opening database - needed to turn warnings about trimming string values into SQL errors
*practical solution for 'Kexi shows no indication that text is trimmed' bug in case of MySQL: error is displayed eg. "Record inserting on the server failed.Message from server: Data too long for column 'hn' at row 1. SQL statement: INSERT INTO table4 (hn) VALUES ('...................'). Server result: 1406"

More info on VARCHAR support in databases: http://www.ispirer.com/wiki/sqlways/mysql/data-types/varchar_n
Related: bug 301136
REVIEW:105182
FIXED-IN:2.4.3

M  +34   -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +18   -2    kexi/kexidb/connection.cpp
M  +1    -0    kexi/kexidb/driver.cpp
M  +7    -0    kexi/kexidb/driver_p.h
M  +8    -1    kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp
M  +2    -0    kexi/kexidb/drivers/mySQL/mysqldriver.cpp

http://commits.kde.org/calligra/366d03dbbf73d7773235b4ee45be99d5b02b33bf
Comment 6 Yue Liu 2012-06-13 09:51:29 UTC
Git commit 23a73bd2190c2cab44c5797fb4259ba192072a13 by Yue Liu, on behalf of Jaroslaw Staniek.
Committed on 06/06/2012 at 14:26.
Pushed by liu into branch 'connection-interaction-yue'.

KexiDB: Remove limits for Text data type, leave as option

Now: by default there are no limits in Text data type
REVIEW:105161

M  +11   -0    kexi/doc/dev/CHANGELOG-Kexi-js
M  +2    -2    kexi/kexidb/alter.cpp
M  +1    -1    kexi/kexidb/alter.h
M  +19   -5    kexi/kexidb/connection.cpp
M  +1    -1    kexi/kexidb/drivers/xbase/xbaseexport.cpp
M  +4    -1    kexi/kexidb/expression.cpp
M  +40   -14   kexi/kexidb/field.cpp
M  +64   -25   kexi/kexidb/field.h
M  +5    -5    kexi/kexidb/utils.cpp
M  +4    -1    kexi/migration/xbase/xbasemigrate.cpp
M  +3    -1    kexi/plugins/forms/widgets/kexidblineedit.cpp
M  +3    -1    kexi/plugins/forms/widgets/kexidbtextedit.cpp
M  +3    -2    kexi/plugins/scripting/kexidb/kexidbfield.cpp
M  +1    -1    kexi/plugins/tables/kexitabledesignerview.cpp
M  +3    -3    kexi/plugins/tables/kexitabledesignerview_p.cpp
M  +2    -2    kexi/widget/tableview/kexiinputtableedit.cpp

http://commits.kde.org/calligra/23a73bd2190c2cab44c5797fb4259ba192072a13
Comment 7 Yue Liu 2012-06-13 09:51:29 UTC
Git commit 4e699bbf5628f140b68786d84c232eee5220550e by Yue Liu, on behalf of Jaroslaw Staniek.
Committed on 07/06/2012 at 23:55.
Pushed by liu into branch 'connection-interaction-yue'.

KexiDB: Add option for setting default length limit of Text values

KexiDB
*Added maxLengthIsDefault property of table field for Text types to extended schema
**stores a hint that limit comes from default setting
*Added DefaultMaxLengthForTextFields config in Tables group
**specifies default maximum length for fields of type Text
**0 (the default) means unlimited or up to engine's limit

DIGEST: Kexi gets option for setting default length limit of Text values

M  +25   -3    kexi/doc/dev/CHANGELOG-Kexi-js
M  +8    -1    kexi/doc/dev/settings.txt
M  +41   -10   kexi/kexidb/connection.cpp
M  +36   -6    kexi/kexidb/lookupfieldschema.cpp
M  +40   -16   kexi/kexidb/utils.cpp
M  +1    -1    kexi/kexidb/utils.h
M  +9    -0    kexi/main/KexiMainWindow.cpp
M  +18   -4    kexi/plugins/tables/kexitabledesignerview.cpp

http://commits.kde.org/calligra/4e699bbf5628f140b68786d84c232eee5220550e
Comment 8 Yue Liu 2012-06-13 09:51:29 UTC
Git commit 4e699bbf5628f140b68786d84c232eee5220550e by Yue Liu, on behalf of Jaroslaw Staniek.
Committed on 07/06/2012 at 23:55.
Pushed by liu into branch 'connection-interaction-yue'.

KexiDB: Add option for setting default length limit of Text values

KexiDB
*Added maxLengthIsDefault property of table field for Text types to extended schema
**stores a hint that limit comes from default setting
*Added DefaultMaxLengthForTextFields config in Tables group
**specifies default maximum length for fields of type Text
**0 (the default) means unlimited or up to engine's limit

DIGEST: Kexi gets option for setting default length limit of Text values

M  +25   -3    kexi/doc/dev/CHANGELOG-Kexi-js
M  +8    -1    kexi/doc/dev/settings.txt
M  +41   -10   kexi/kexidb/connection.cpp
M  +36   -6    kexi/kexidb/lookupfieldschema.cpp
M  +40   -16   kexi/kexidb/utils.cpp
M  +1    -1    kexi/kexidb/utils.h
M  +9    -0    kexi/main/KexiMainWindow.cpp
M  +18   -4    kexi/plugins/tables/kexitabledesignerview.cpp

http://commits.kde.org/calligra/4e699bbf5628f140b68786d84c232eee5220550e
Comment 9 Yue Liu 2012-06-13 09:51:35 UTC
Git commit bb65aa5fe7cc9121b04942c569e2d2c9ba1ca955 by Yue Liu, on behalf of Jaroslaw Staniek.
Committed on 08/06/2012 at 01:35.
Pushed by liu into branch 'connection-interaction-yue'.

Set limit to 255 for Text type in MySQL Driver

MySQL Driver:
*set limit to 255 characters for Text type (VARCHAR)
*call "SET SESSION sql_mode='TRADITIONAL'" on opening database - needed to turn warnings about trimming string values into SQL errors
*practical solution for 'Kexi shows no indication that text is trimmed' bug in case of MySQL: error is displayed eg. "Record inserting on the server failed.Message from server: Data too long for column 'hn' at row 1. SQL statement: INSERT INTO table4 (hn) VALUES ('...................'). Server result: 1406"

More info on VARCHAR support in databases: http://www.ispirer.com/wiki/sqlways/mysql/data-types/varchar_n
Related: bug 301136
REVIEW:105182
FIXED-IN:2.4.3

M  +12   -2    kexi/doc/dev/CHANGELOG-Kexi-js
M  +18   -2    kexi/kexidb/connection.cpp
M  +1    -0    kexi/kexidb/driver.cpp
M  +7    -0    kexi/kexidb/driver_p.h
M  +8    -1    kexi/kexidb/drivers/mySQL/mysqlconnection_p.cpp
M  +2    -0    kexi/kexidb/drivers/mySQL/mysqldriver.cpp

http://commits.kde.org/calligra/bb65aa5fe7cc9121b04942c569e2d2c9ba1ca955
Comment 10 Jarosław Staniek 2012-06-27 22:39:08 UTC
Git commit d3f9a2c0f2c2ba266c0971b0f5c41ec0e934b895 by Jaroslaw Staniek.
Committed on 28/06/2012 at 00:37.
Pushed by staniek into branch 'master'.

Remove limits for Text data type, leave as option

*Now by default there are no limits in Text data type
*(2012-06-06 calligra master commit 094bc376058c)

M  +4    -0    CHANGELOG
M  +1    -1    Drivers/xbase/XbaseExport.cpp
M  +3    -3    Predicate/Alter.cpp
M  +1    -1    Predicate/Alter.h
M  +19   -5    Predicate/Connection.cpp
M  +40   -14   Predicate/Field.cpp
M  +63   -25   Predicate/Field.h
M  +5    -5    Predicate/Utils.cpp
M  +7    -4    Predicate/expression/ConstExpression.cpp

http://commits.kde.org/predicate/d3f9a2c0f2c2ba266c0971b0f5c41ec0e934b895
Comment 11 Jarosław Staniek 2012-06-29 20:40:26 UTC
Git commit 0a7667c32063831fff3c8e6ba9346d061cf56191 by Jaroslaw Staniek.
Committed on 29/06/2012 at 22:37.
Pushed by staniek into branch 'master'.

Set limit to 255 for Text type in MySQL Driver

*set limit to 255 characters for Text type (VARCHAR)
*call "SET SESSION sql_mode='TRADITIONAL'" on opening database - needed to turn warnings about trimming string values into SQL errors
*practical solution for 'Kexi shows no indication that text is trimmed' bug in case of MySQL: error is displayed eg. "Record inserting on the server failed.Message from server: Data too long for column 'hn' at row 1. SQL statement: INSERT INTO table4 (hn) VALUES ('...................'). Server result: 1406"
*More info on VARCHAR support in databases: http://www.ispirer.com/wiki/sqlways/mysql/data-types/varchar_n
*(2012-06-08 calligra master commit da2bf9b689e)
Related: bug 301136

M  +9    -2    Drivers/mysql/MysqlConnection_p.cpp
M  +2    -0    Drivers/mysql/MysqlDriver.cpp
M  +18   -2    Predicate/Connection.cpp
M  +2    -1    Predicate/Driver_p.cpp
M  +8    -1    Predicate/Driver_p.h

http://commits.kde.org/predicate/0a7667c32063831fff3c8e6ba9346d061cf56191