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

ENUM - alter table syntax error #12701

Closed
tlghacc opened this issue Nov 15, 2016 · 1 comment
Closed

ENUM - alter table syntax error #12701

tlghacc opened this issue Nov 15, 2016 · 1 comment
Assignees

Comments

@tlghacc
Copy link

tlghacc commented Nov 15, 2016

Steps to reproduce

  1. Login in to the PMA version 4.6.4
  2. Go to your database, select any table -> Structure -> Add 1 column (at the end of table)
  3. Set any column Name, Type -> ENUM, set Values (anything you like) for ex. '0','1' all other values you can keep empty / default
  4. Run Preview SQL and you can see SQL statement like this:

ALTER TABLE testADDxxxENUM(0) NOT NULL AFTERtest;

where you can see is missing ENUM values. After you run it (Save button) you get SQL syntax error like this:

SQL query:

ALTER TABLE test ADD xxx ENUM(0) NOT NULL AFTER test;

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '0) NOT NULL AFTER test' at line 1

Expected behaviour

Insert new column with ENUM type with specified values.
SQL should looks like:
ALTER TABLE test ADDxxxENUM('0','1') NOT NULL AFTERtest;

Actual behaviour

SQL Syntax error

Server configuration

Operating system: Debian Linux

Web server: Apache 2.4

Database: MySQL 5.5.53

PHP version: 5.6

phpMyAdmin version: 4.6.4

Client configuration

Browser: Firefox / Chrommium

Operating system: Ubuntu Linux / Windows 10

@devenbansod devenbansod self-assigned this Nov 15, 2016
@devenbansod
Copy link
Member

Hi @tlghacc thanks for the report but it seems this has already been reported and fixed at #12480. The fix would be a part of the next bug-fix release 4.6.5

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

No branches or pull requests

2 participants