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

MariaDB - unable to ALTER TABLE with DOUBLE #876

Closed
cedbesafilm opened this issue Feb 4, 2020 · 2 comments
Closed

MariaDB - unable to ALTER TABLE with DOUBLE #876

cedbesafilm opened this issue Feb 4, 2020 · 2 comments
Labels
Milestone

Comments

@cedbesafilm
Copy link

@cedbesafilm cedbesafilm commented Feb 4, 2020

Steps to reproduce this issue

  1. Create a table with a column of double type (or open an existing table with a column of double type);
    image
  2. Add a column after the column;
  3. The query result is
 ALTER TABLE `test`
	ADD COLUMN `colonna_2` DOUBLE(22) NULL DEFAULT NULL AFTER `colonna_1`;

so the save fails with sql error
image

  1. Copy the query from Code ALTER tab and remove the (22) in the query and execute it
  2. The query run without error
    image

Current behavior

The query created in the Code ALTER table is wrong

Expected behavior

The query run without error

Possible solution

Remove length of field in the alter table query

Environment

  • HeidiSQL version: 10.3.0.5862
  • Database system and version: MariaDB 10.4.12
  • Operating system: Windows 10
@rentalhost

This comment has been minimized.

Copy link
Collaborator

@rentalhost rentalhost commented Feb 4, 2020

Could not reproduce as specified, but I could reproduce on try moving colonna_2 above colonna_1. So ALTER code is (that is invalid):

ALTER TABLE `test`
	CHANGE COLUMN `colonna_2` `colonna_2` DOUBLE(22) NULL DEFAULT NULL FIRST;
@rentalhost

This comment has been minimized.

Copy link
Collaborator

@rentalhost rentalhost commented Feb 4, 2020

Identified first at: r5845 after #864 (995749c).

@ansgarbecker ansgarbecker added this to the v11.0 milestone Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.