Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-38562

Mysql: Timestamp values needs default defined in sql

    Details

    • Type: Bug
    • Status: OPEN
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.9.x
    • Fix Version/s: None
    • Component/s: Kernel
    • Labels:
    • Conversion Script Required:
      Yes
    • CLE Team Issue:
      Yes
    • Previous Issue Keys:
      KNL-1072

      Description

      The current sql for SAKAI_SESSION is:

      CREATE TABLE SAKAI_SESSION
      (
      SESSION_ID VARCHAR (36),
      SESSION_SERVER VARCHAR (64),
      SESSION_USER VARCHAR (99),
      SESSION_IP VARCHAR (128),
      SESSION_HOSTNAME VARCHAR (255),
      SESSION_USER_AGENT VARCHAR (255),
      SESSION_START TIMESTAMP,
      SESSION_END TIMESTAMP,
      SESSION_ACTIVE tinyint(1)
      );

      as there is no default for session_start this field it gets created as:

      `SESSION_START` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,

      as per the mysql docs:

      "With neither DEFAULT CURRENT_TIMESTAMP nor ON UPDATE CURRENT_TIMESTAMP, it is the same as specifying both DEFAULT CURRENT_TIMESTAMP and ON UPDATE CURRENT_TIMESTAMP. "
      http://dev.mysql.com/doc/refman/5.1/en/timestamp-initialization.html

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  k1team KERNEL TEAM (Inactive)
                  Reporter:
                  dhorwitz David Horwitz
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                    Dates

                    Created:
                    Updated:

                      Git Integration