mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-8441 Bad SHOW CREATE TABLE output for a table with a virtual column
This commit is contained in:
@@ -3061,6 +3061,9 @@ CHARSET_INFO* get_sql_field_charset(Create_field *sql_field,
|
||||
Modifies the first column definition whose SQL type is TIMESTAMP
|
||||
by adding the features DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP.
|
||||
|
||||
If the first TIMESTAMP column appears to be nullable, or to have an
|
||||
explicit default, or to be a virtual column, then no promition is done.
|
||||
|
||||
@param column_definitions The list of column definitions, in the physical
|
||||
order in which they appear in the table.
|
||||
*/
|
||||
@@ -3076,7 +3079,8 @@ void promote_first_timestamp_column(List<Create_field> *column_definitions)
|
||||
{
|
||||
if ((column_definition->flags & NOT_NULL_FLAG) != 0 && // NOT NULL,
|
||||
column_definition->def == NULL && // no constant default,
|
||||
column_definition->unireg_check == Field::NONE) // no function default
|
||||
column_definition->unireg_check == Field::NONE && // no function default
|
||||
column_definition->vcol_info == NULL)
|
||||
{
|
||||
DBUG_PRINT("info", ("First TIMESTAMP column '%s' was promoted to "
|
||||
"DEFAULT CURRENT_TIMESTAMP ON UPDATE "
|
||||
|
Reference in New Issue
Block a user