Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

information_schema.columns data_type has uppercase values #849

Closed
andremarianiello opened this issue Oct 18, 2019 · 1 comment · Fixed by #851
Closed

information_schema.columns data_type has uppercase values #849

andremarianiello opened this issue Oct 18, 2019 · 1 comment · Fixed by #851
Assignees
Labels
bug Something isn't working

Comments

@andremarianiello
Copy link

I was trying to use the Grafana MySQL data source with this library, and it makes the following query to get autocomplete results for a column dropdown:

SELECT column_name FROM information_schema.columns WHERE table_schema = database() AND table_name = 'mytable' AND data_type IN ('timestamp','datetime','bigint','int','double','float') ORDER BY column_name

This works on real MySQL servers (at least the one I tested), but returns no results for the information_schema database provided by this library. I believe the reason is that the information_schema from this library uses uppercase values for the data_type column (e.g 'DOUBLE', 'BIGINT', etc.), so no results come back. Would it make sense to make the values in this column lowercase?

@erizocosmico erizocosmico added the bug Something isn't working label Oct 22, 2019
@erizocosmico
Copy link
Contributor

Yes, it would totally make sense to make them lowercase.

@erizocosmico erizocosmico self-assigned this Oct 22, 2019
erizocosmico added a commit to erizocosmico/go-mysql-server that referenced this issue Oct 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants