-
Catalin Besleaga authored
Currently MySQL only permits a literal value as column default. This WL is removing this limitation by also allowing expressions to generate values as DEFAULT. With these changes the following syntax for defining/altering a column will be allowed: <column name> <column data type> DEFAULT (expression) This worklog reuses some of the infrastructure around Generated Columns and expands the range of functions that can be used as default expressions by also allowing the following non-deterministic functions: uuid, rand, statement_digest, statement_digest_text, curdate, current_date, curtime, current_time, current_timestamp, localtime, localtimestamp, now, sysdate, unix_timestamp, utc_date, utc_time, utc_timestamp, connection_id, database. Also all the deterministic functions that were previously allowed for Generated Columns are also allowed as default expressions. Change-Id: Ieeb72efd87ae3e98349a257c40061bcf2d3ddb22
Catalin Besleaga authoredCurrently MySQL only permits a literal value as column default. This WL is removing this limitation by also allowing expressions to generate values as DEFAULT. With these changes the following syntax for defining/altering a column will be allowed: <column name> <column data type> DEFAULT (expression) This worklog reuses some of the infrastructure around Generated Columns and expands the range of functions that can be used as default expressions by also allowing the following non-deterministic functions: uuid, rand, statement_digest, statement_digest_text, curdate, current_date, curtime, current_time, current_timestamp, localtime, localtimestamp, now, sysdate, unix_timestamp, utc_date, utc_time, utc_timestamp, connection_id, database. Also all the deterministic functions that were previously allowed for Generated Columns are also allowed as default expressions. Change-Id: Ieeb72efd87ae3e98349a257c40061bcf2d3ddb22
Loading