MariaDB not use DEFAULT value even when inserted NULL for NOT NULLABLE column.

Description

MariaDB not use DEFAULT value even when inserted NULL for NOT NULLABLE column.

Expected similar behavior as for AUTOINCREMENT and would be usefull for generation right value in trigger.
http://stackoverflow.com/questions/15473654/mariadb-before-insert-trigger-for-uuid

Of course in described example much better if MariaDB would support UUID data type and generate automaticaly UUID for AUTOINCREMENT fields.

But I think it would be good idea if MariaDB would allow use any function for default value it would be good replacement of generators.

For example:

And it would here appropriate analogy with the behavior of AUTOINCREMENT

And if make possible to work with property table autoincrement into functions would be generally be a bomb. It would be possible create complicated ID with concatenation static identifier if schema and autoincrement.

For example:
A-1
A-2
A-3
A-5

and on another schema for same table
B-1
B-2
B-3
B-4

Environment

Linux

Assignee

Sergei Golubchik

Reporter

МихаилГ

Labels

Time tracking

0m

Components

Sprint

None

Fix versions

Affects versions

Priority

Major
Configure