TINYINT set as signed in formcontrolfactory.cxx

Lionel Elie Mamane lionel at mamane.lu
Sat Jan 19 23:42:31 PST 2013


On Sat, Jan 19, 2013 at 09:52:08AM +0100, Alex Thurgood wrote:
> On 01/19/2013 04:40 AM, Lionel Elie Mamane wrote:

>> The central question is: what are the consequences of this code? If it

> I seem to recall that using TINYINT as a boolean field (...)

Well, hmmm, from a "standard SQL" point of view, boolean fields should
be ... of type boolean. Now, indeed MySQL does not support that, and
TINYINT(1) is the "suggested" replacement. However, since 5.0.x for
some x, BIT(1) is probably a better choice.

Since TINYINT(1) is historically popular in MySQL, I'm open to any
patch that improves the seamless support of this in LibreOffice,
without breaking other things.

> OOo with the tristate nature of its boolean form control (and I
> presume LO, but haven't checked recently) set the default value to
> -127, or 0 or 127 - very strange, at least, it seemed that way to
> me.

Hmm... I have in mind that a tristate boolean form control should in
general be TRUE / FALSE / NULL. If it can be manually forced to be
three different non-NULL values, that's nice, but not by default.

-- 
Lionel


More information about the LibreOffice mailing list