Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-1322

LP #1532681: pt-osc is not run with column that default value is 0000-00-00 00:00:00

    XMLWordPrintable

    Details

      Description

      **Reported in Launchpad by almaz last update 29-03-2016 04:17:18

      mysql version : 5.6.25
      tool version : percona-toolkit-2.2.16

      • i want add column with pt-osc.
      • command : ./bin/pt-online-schema-change --dry-run --statistics --nodrop-old-table --critical-load="Threads_running=500" --nocheck-replication-filters --charset=utf8mb4 --alter-foreign-keys-method=auto --set-vars SQL_MODE=\'\' --alter "ADD COLUMN PT_TEMP varchar(50) DEFAULT NULL" D=idb,t=err_msg

      But error is occur like that :
      Error creating new table: DBD::mysql::db do failed: Invalid default value for 'CREATE_DT' [for Statement "CREATE TABLE `idb`.`_err_msg_new` (
      `ERR_CD` varchar(5) COLLATE utf8mb4_bin NOT NULL,
      `ERR_MSG` varchar(100) COLLATE utf8mb4_bin DEFAULT NULL,
      `USE_FG` varchar(1) COLLATE utf8mb4_bin DEFAULT 'N',
      `START_DT` timestamp NULL DEFAULT NULL,
      `END_DT` timestamp NULL DEFAULT NULL,
      `CREATE_DT` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
      `MODIFY_DT` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
      PRIMARY KEY (`ERR_CD`)
      ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=8"] at ./bin/pt-online-schema-change line 10035.

      • the default value of 'CREATE_DT' is '0000-00-00 00:00:00'. is it problem for using pt-osc?
        please check and answer.

      thanks

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            lpjirasync lpjirasync (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Smart Checklist