Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-13377

current_timestamp variable being replaced in create table statement

    XMLWordPrintable

    Details

      Description

      table definition is being altered by server:
      create a simple table:

      CREATE TABLE t1 (
        ts TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
      );
      

      ...this is being returned by the server to read:

      CREATE TABLE t1 (
        ts timestamp DEFAULT current_timestamp() ON UPDATE current_timestamp()
      );
      

      The brackets appearing after the variable CURRENT_TIMESTAMP are being added (presumably replacing the variable with the function), which causes problems with unexpected changes in the DDL.

      This does not happen in 10.0.24.
      I do not know whether it happens in 10.1.x

        Attachments

        1. 10.1.26h2.png
          10.1.26h2.png
          58 kB
        2. 10.1.26heidisql.png
          10.1.26heidisql.png
          59 kB
        3. 10.2.7h2.png
          10.2.7h2.png
          58 kB
        4. 10.2.7heidi.png
          10.2.7heidi.png
          59 kB

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            amramsay Andrew Ramsay
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated: