Attaching derby-4716-01-ab-enableBooleanColumns.diff. This is the first increment of enabling BOOLEAN-typed columns in tables. This patch supports the ability to declare BOOLEAN columns in CREATE TABLE statements and verifies that casting semantics are correct for INSERTs. Follow-on patches should address ALTER TABLE and index creation. Regression tests passed cleanly for me.
One oddity which will have to be addressed in a follow-on patch is this:
1) If you select from an unindexed BOOLEAN column, NULLs sort at the end, as they do for other Derby datatypes.
2) But if you put an index on the BOOLEAN column, this causes NULLs to sort before other values.
BOOLEAN-valued indexes should follow the sorting conventions of other datatypes. There should be no backward compatibility issues here because none of the system indexes carry BOOLEAN columns today.
Touches the following files:
Allows BOOLEAN as a column data type. Removes scaffolding put in at the beginning of 10.7 development. That scaffolding added a parameter to the dataTypeDDL() production so that we could incrementally enable BOOLEAN in different parts of the syntax without enabling BOOLEAN wholesale everywhere. That parameter is now removed. As of this patch, BOOLEAN is allowed everywhere that the other system datatypes are allowed--provided that the database level is 10.7 or higher.
Tests for INSERTing various datatypes into BOOLEAN columns.
ParameterMetaData test for INSERTs into BOOLEAN-valued columns.
Canon change because BOOLEAN columns are supported now.