dolt icon indicating copy to clipboard operation
dolt copied to clipboard

Add support for case-sensitive text in ENUM options

Open dlscanada opened this issue 1 year ago • 2 comments

It appears that dolt sql-server cannot create case-sensitive (i.e., upper-case) ENUM options.

Reproduce

  1. Run the follow CREATE TABLE command.
CREATE TABLE `test_table` (
  `LSD` char(18) NOT NULL,
  `QSEC` enum('SE','SW','NE','NW') NOT NULL
  PRIMARY KEY (`LSD`),
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Test table';
  1. Reload the table columns view in DBeaver.
  2. See that all the enum options show as lower-case (like enum('se','sw','ne','nw')), when viewed from the table columns list.
  3. After inserting some rows with uppercase values, it appears that they show as upper case in the actual table view.

Notes/Environment

  • DBeaver 22.1.3
  • Windows 10
  • Dolt v0.40.10

dlscanada avatar Aug 02 '22 17:08 dlscanada

Thank you for the bug @dlscanada! We will take a look at this as soon as possible.

VinaiRachakonda avatar Aug 02 '22 23:08 VinaiRachakonda

Another customer request for enum case preservation with enums in https://github.com/dolthub/go-mysql-server/issues/1161. Also a good callout in that issue that the enum naming doesn't appear to match MySQL's behavior.

fulghum avatar Aug 08 '22 15:08 fulghum

Hey @dlscanada, just wanted to let you know that Dolt 0.40.26 was just released this afternoon, and contains this fix.

Thanks for taking the time to report this. Please don't hesitate to cut us more issues if you notice anything else odd!

fulghum avatar Aug 17 '22 00:08 fulghum