title: MySQL 8.0.13: Default Value as uuid not working
body: <p>I am trying to set the Default value as UUID() in MySQL version 8.0.13. But upon successful execution, the default value resets to NOT NULL. </p>
  
  <p>MySQL version:</p>
  
  <p><a href="https://i.stack.imgur.com/WgELam.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WgELam.png" alt="&quot;version script&quot;"></a></p>
  
  <p>Here is my CREATE TABLE script</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE `session` (
    `id` binary(16) NOT NULL DEFAULT (UUID_TO_BIN(UUID(), TRUE)),
    `start_timestamp` timestamp NOT NULL,
    `end_timestamp` timestamp NULL DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `status` varchar(20) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
  </code></pre>
  
  <p>the log output on table generation, 
  <code>SQL script was successfully applied to the database.</code></p>
  
  <p>The TABLE definition post execution:</p>
  
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE `session` (
    `id` binary(16) NOT NULL,
    `start_timestamp` timestamp NOT NULL,
    `end_timestamp` timestamp NULL DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
    `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
    `status` varchar(20) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci
  </code></pre>
  
  <p>I am not able to figure out why this could happen when documentation clearly mentions that parenthesis enclosed functions are allowed. </p>