Skip to content

Data truncated error with current_timestamp().000000 and mariaDB 10.2 #13968

Closed
@anaaviles

Description

@anaaviles

Steps to reproduce

  1. Create a table with a field type TIMESTAMP ON DEFAULT CURRENT_TIMESTAMP
CREATE TABLE t (id int NOT NULL UNIQUE AUTO_INCREMENT, 
                              name VARCHAR(30), 
                               ts TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP);
  1. Go to Insert tab on phpmyadmin interface
  2. Check default value for TIMESTAMP field is current_timestamp().000000
  3. Click GO

Expected behaviour

Insert the row with the current date and time

Actual behaviour

Inserts the row with 0000-00-00 00:00:00 on the timestamp field, and shows a warning message in red:

Warning: #1265 Data truncated for column 'ts' at row 1

Server configuration

Operating system: Debian jessie

Web server: Apache 2.4

Database: mariaDB 10.2

PHP version: php7.1

phpMyAdmin version: 4.7.7

Client configuration

Browser: Firefox 57.0.4

Operating system: Ubuntu xenial

Metadata

Metadata

Assignees

Labels

BugA problem or regression with an existing feature

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions