Review Request: KexiDB: Remove limits for Text data type, leave as option
Jarosław Staniek
staniek at kde.org
Thu Jun 7 21:15:20 BST 2012
> On June 7, 2012, 4:51 p.m., Adam Pigg wrote:
> > kexi/kexidb/connection.cpp, line 990
> > <http://git.reviewboard.kde.org/r/105161/diff/2/?file=66507#file66507line990>
> >
> > What happens here when maxLength == 0 ie What does the generated SQL look like for a text field?
>
> Jarosław Staniek wrote:
> por postgres:
> maxLength > 0: CHARACTER VARYING(maxLength)
> maxLength == 0: CHARACTER VARYING
>
> OK?
>
> Adam Pigg wrote:
> as it happens, it is Ok in Postgresql, but only because this is a postgresql specific extension. In this case, it is roughly equivalent to TEXT type. I havnt worked out mysql will do though...depending on the version, there is a max of 255 or 65535 applied
>
> Jarosław Staniek wrote:
> For MySQL Text is VARCHAR, and VARCHAR(maxLength) is supported. Yes there's 65,535 limit, even worse:
>
> "The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used."
>
> http://dev.mysql.com/doc/refman/5.5/en/char.html
>
> One day we may want add some extra checking and APIs for declaring Text type with specified parameters. For now we have pretty good support, and at worst case, the server will scream about breaking the rules.
OK, found nice link (shows equivalent types): http://www.ispirer.com/wiki/sqlways/mysql/data-types/varchar_n
MySQL expects N in VARCHAR, so we have issue in mysql here and we need to specify VARCHAR(someLIMIT) for 'unlimited' option. someLIMIT can be 65535 or 255...
I'll update the patch.
- Jarosław
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105161/#review14482
-----------------------------------------------------------
On June 7, 2012, 12:44 p.m., Jarosław Staniek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105161/
> -----------------------------------------------------------
>
> (Updated June 7, 2012, 12:44 p.m.)
>
>
> Review request for Calligra, Adam Pigg, Dimitrios Tanis, and Oleg Kukharchuk.
>
>
> Description
> -------
>
> KexiDB: Remove limits for Text data type, leave as option
>
> Now: by default there are no limits in Text data type
>
>
> This addresses bug 301277.
> http://bugs.kde.org/show_bug.cgi?id=301277
>
>
> Diffs
> -----
>
> kexi/doc/dev/CHANGELOG-Kexi-js f4c055c
> kexi/kexidb/alter.h 95b869e
> kexi/kexidb/alter.cpp 447bb78
> kexi/kexidb/connection.cpp 1eac0b9
> kexi/kexidb/drivers/xbase/xbaseexport.cpp 08ddbe2
> kexi/kexidb/expression.cpp d177834
> kexi/kexidb/field.h 4db4b4e
> kexi/kexidb/field.cpp f5cf3ab
> kexi/kexidb/utils.cpp bb3f78c
> kexi/migration/xbase/xbasemigrate.cpp cc434df
> kexi/plugins/forms/widgets/kexidblineedit.cpp 9b2b98f
> kexi/plugins/forms/widgets/kexidbtextedit.cpp eb3182b
> kexi/plugins/scripting/kexidb/kexidbfield.cpp 442e4e9
> kexi/plugins/tables/kexitabledesignerview.cpp a801bc7
> kexi/plugins/tables/kexitabledesignerview_p.cpp 25f5b76
> kexi/widget/tableview/kexiinputtableedit.cpp 9691390
>
> Diff: http://git.reviewboard.kde.org/r/105161/diff/
>
>
> Testing
> -------
>
> Created new tables with fields of Text type, works.
>
>
> Thanks,
>
> Jarosław Staniek
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20120607/2f71da86/attachment.htm>
More information about the calligra-devel
mailing list