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
Closed

Incorrect CURRENT_TIMESTAMP DDL generated with MariaDB 10.2 #13999

ChrisHSandN opened this issue Feb 12, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@ChrisHSandN
Copy link

@ChrisHSandN 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
Copy link
Member

@ibennetch 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.

Loading

@mcejp
Copy link

@mcejp mcejp commented May 20, 2018

Thank you for fixing this :)

Loading

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants