distal-attribute
distal-attribute
distal-attribute
distal-attribute

Column default value of uuid_short() for bigint 20 says "Incorrect integer value"

pawan163 posted 2 weeks ago in Feature discussion

Friends,

I am trying to save table with column having primary key of BIGINT datatype with default value to AUTO_INCREMENT and so far it is working fine. But when i try to set the default value to uuid_short() it throws an alert saying: "SQL Error (1366): Incorrect integer value: 'uuid_short()' for column 'id' at row 1".

HeidiSQL runs the following query:

ALTER TABLE hello_world CHANGE COLUMN id id BIGINT(20) NULL DEFAULT 'uuid_short()' FIRST;

Unquoting uuid_short() works:

ALTER TABLE hello_world CHANGE COLUMN id id BIGINT(20) NULL DEFAULT uuid_short() FIRST;

Can you please allow uuid_short() function to work in default?

Or as a new feature, an option to select function can be added along with existing four options:

  1. No default value
  2. Custom:
  3. NULL
  4. AUTO_INCREMENT
  5. Function: [NEW] (A list of mariadb functions can be displayed in dropdown for developer to select)

A screenshot is attached for reference.

Thank you.

1 attachment(s):
  • uuid_short-as-column-default-does-not-allow-to-save
ansgar posted 2 weeks ago

Reasonable. Could you please copy the above post as a new a request on Github?

pawan163 posted 2 weeks ago

Just did. Thank you very much.

Please login to leave a reply, or register at first.