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

why comma in field length for int big int #869

Closed
mailparikshit opened this issue Jan 27, 2020 · 9 comments
Closed

why comma in field length for int big int #869

mailparikshit opened this issue Jan 27, 2020 · 9 comments
Milestone

Comments

@mailparikshit
Copy link

@mailparikshit mailparikshit commented Jan 27, 2020

Steps to reproduce this issue

  1. Step 1; open any database for mysql 8.0
  2. Step 2; create a table having double(10,3) , int(10), enum (Y,N)

Current behavior

after table is created when you see table details in editor it displays comma separator in field length for int and bigint which is giving error.
also enum default value appears without single quote crashing down query for alter table, create table code

current appearance
INT(10,3)
enum default value N

Expected behavior

enum default value should appear with single quote 'N'
int and bigint length should appear without comma .

Possible solution

should be as expected output

Environment

wnidows 10 pro 64 bit

  • HeidiSQL version:
    heidisql 10.3.0.5850
  • Database system and version:
    database mysql 8.0.19
  • Operating system:
    windows 10 pro 64 bit
@fifonik

This comment has been minimized.

Copy link

@fifonik fifonik commented Feb 5, 2020

I could not re-produce the comma issue. Everything as expected in HeidiSQL 10.3.0.5862 & MySQL 5.7.23.

As per quoted for the default enum, I can confirm it. But I'd create separate bug report for this with better explanation.

@marthieme

This comment has been minimized.

Copy link

@marthieme marthieme commented Mar 19, 2020

Same here.
I Have to remove the part after the comma everytime before i can save the table which makes HeidiSQL practically unusable.

image

mysql version 8.0.19

edit:
HeidiSQL version 11.0.0.5919 (64Bit)
Windows 10 64Bit

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

@ansgarbecker ansgarbecker commented Mar 19, 2020

Is that reproducible with HeidiSQL 11.0?

@rentalhost

This comment has been minimized.

Copy link
Collaborator

@rentalhost rentalhost commented Mar 19, 2020

@ansgarbecker I could not reproduce at r5919 (11.0). I will check when it was fixed. BTW, where I can search the full archive of versions? I can't download 5850 via site.

Edit: I have checked 5870 (minimum that I have access) and it seems works fine. I suggests @mailparikshit to update to the last available version.

CREATE TABLE `test_869` (
	`double` DOUBLE(10,3) NULL DEFAULT NULL,
	`int` INT(10) NULL DEFAULT NULL,
	`enum` ENUM('Y','N') NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci'
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB;
@marthieme

This comment has been minimized.

Copy link

@marthieme marthieme commented Mar 19, 2020

Is that reproducible with HeidiSQL 11.0?

I edited my comment above. I use HeidiSQL version 11.0.0.5919 (64Bit).

@rentalhost

This comment has been minimized.

Copy link
Collaborator

@rentalhost rentalhost commented Mar 19, 2020

@ansgarbecker @marthieme @mailparikshit

Ok, I could reproduce with MySQL 8.0.19 at least, using r5919. But INT(10, 0) will not cause any error, except if you try to rename the column, for instance.

In this case, it will generate the following code:

ALTER TABLE `test_869`
	CHANGE COLUMN `int` `int2` INT(10,0) NULL DEFAULT NULL AFTER `double`;

About the ENUM case, I still can't reproduce. In case, I am setting the default value as "custom text", and it wrap with a single quote correctly.

image

ALTER TABLE `test_869`
	CHANGE COLUMN `enum` `enum` ENUM('Y','N') NULL DEFAULT 'N' COLLATE 'utf8mb4_general_ci' AFTER `int`;
@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

@ansgarbecker ansgarbecker commented Mar 19, 2020

I already broke something here for #876. Just pushed a modification which should now never add that numeric scale value to integer typed columns. Please update to the latest build and retry.

@ansgarbecker ansgarbecker added this to the v11.1 milestone Mar 19, 2020
@rentalhost

This comment has been minimized.

Copy link
Collaborator

@rentalhost rentalhost commented Mar 19, 2020

Fix checked and now works fine.

@ansgarbecker

This comment has been minimized.

Copy link
Collaborator

@ansgarbecker ansgarbecker commented Mar 19, 2020

@rentalhost thanks for all your feedback, also in other threads!

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
5 participants
You can’t perform that action at this time.