Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect CURRENT_TIMESTAMP DDL generated with MariaDB 10.2 #13999

Closed
ChrisHSandN opened this Issue Feb 12, 2018 · 2 comments

Comments

Projects
None yet
4 participants
@ChrisHSandN
Copy link

ChrisHSandN commented Feb 12, 2018

Steps to reproduce

CREATE TABLE `t` (
 `id` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB
  1. Go to Structure tab on phpmyadmin
  2. Click change on id field
  3. Rename it to id1
  4. Click Save

Expected behaviour

Table should update correctly

Actual behaviour

SQL query:
ALTER TABLE `t` CHANGE `id` `id1` TIMESTAMP NOT NULL DEFAULT 'current_timestamp()'
MySQL said: Documentation
#1292 - Incorrect datetime value: 'current_timestamp()' for column 'id1' at row 1

Server configuration

Operating system:
CentOS
Web server:
Apache/2.4.6
Database:
10.2.12-MariaDB
PHP version:
5.6.33
phpMyAdmin version:
4.7.7

@ibennetch

This comment has been minimized.

Copy link
Member

ibennetch commented Mar 1, 2018

MySQL 8.0.0 is unaffected; in MariaDB the default is "as defined: current_timestamp()" whereas for MySQL, the dropdown value CURRENT_TIMESTAMP is selected. Even trying to pull the dropbox down to CURRENT_TIMESTAMP resets to the as defined: value.

The bug goes back at least as far as phpMyAdmin 4.7.0.

@cejpmart

This comment has been minimized.

Copy link

cejpmart commented May 20, 2018

Thank you for fixing this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.