Note: this patch was reverted from 10.5 on Monty's request.
It makes the engine code incompatible between 10.5 and earlier versions.
We should eventually split numeric type handlers into separate signed and unsigned variants. This is needed for function collection plugins, to define function prototypes easier.
For example, instead of Type_handler_longlong there should be Type_handler_slonglong and Type_handler_ulonglong.
In order to do this easier, let's change Field::flags and Column_definition::flags from a member to:
To share the code between Field and Column_definition, let's add a new class:
and derive Field and Column definition from it.
Field::flags() and Column_definition::flags() will do something like this:
where type_handler()->flags() will be a new method in Type_handler:
Type_handler descendants will override the default implementation and will return data type specific flags:
or their combination when necessary.
Note, under terms of this task will change only ENUM_FLAG, SET_FLAG and BLOB_FLAG to Type_handler::flags().
UNSIGNED_FLAG will be moved to Type_handler::flags() later, under terms of a separate task.