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

Error: mysql: parse precision "/*" for MariaDB #2019

Closed
arroadie opened this issue Aug 25, 2023 · 14 comments
Closed

Error: mysql: parse precision "/*" for MariaDB #2019

arroadie opened this issue Aug 25, 2023 · 14 comments

Comments

@arroadie
Copy link

Didn't find a way to print debug logs, but this is the configuration I'm using (information replaced to $VAR)

env "staging" {
  // Define the URL of the database which is managed
  // in this environment.
  url = "maria://$USER:$PASS@$HOST:3306/$DB"

}

Let me know if there's a way to get more insight on the error

@a8m
Copy link
Member

a8m commented Aug 25, 2023

Hey @arroadie 👋

Please see @giautm's answer here: #1985 (comment)

You can pre-encode your password and store it this way, or use the urlescape function this way:

env "staging" {
  url = "maria://${var.user}:${urlescape(var.password)}@${var.host}/database"
}

Closing, but please feel free to reopen or join our Discord community in case you need more help with this.

@a8m a8m closed this as completed Aug 25, 2023
@arroadie
Copy link
Author

The problem is not the password. Atlas can reach other schemas in the same DB.
The problem seems to be related to when it tried to parse a schema from a table that contains some kind of precision based field.

@a8m a8m reopened this Aug 25, 2023
@a8m
Copy link
Member

a8m commented Aug 25, 2023

Oh, got it. Sorry for the misunderstanding.

Can you please write here the MariaDB and Atlas versions are you using? Do you get it also with the latest version of Atlas?

@arroadie
Copy link
Author

No problem. I tried to make it clearer and it actually caused more confusion :P

Atlas info

atlas version
atlas version v0.13.3-97e15ac-canary
https://github.com/ariga/atlas/releases/latest

MariaDB

# select version()
10.11.2-MariaDB-1:10.11.2+Maria~deb10

@a8m
Copy link
Member

a8m commented Aug 25, 2023

@arroadie, are you able to detect what table is causing this? If so, can you please paste it here (or send me on Discord its definition - show create table T? This will help me to troubleshoot this faster. Thanks

@arroadie
Copy link
Author

I can't. There are 64 tables in this database. Is there a way to increase the verbosity of the process?

@arroadie
Copy link
Author

Or if there's a way to tell the process to run on a single table, I can iterate over all programmatically and check which one is at fault...

@a8m
Copy link
Member

a8m commented Aug 25, 2023

I added a small patch to add this info (table and column): #2023. I'll merge it and release binaries, you can test it right after.

@a8m
Copy link
Member

a8m commented Aug 26, 2023

@arroadie, I released new binaries in case you want to check this. Thanks 🙏

@arroadie
Copy link
Author

are those obtained with the same curl > bash process?

I updated the same way and had the same results

$ atlas version
atlas version v0.13.3-ede48df-canary
https://github.com/ariga/atlas/releases/latest

$ atlas schema inspect --env staging
Error: mysql: parse precision "/*"

@a8m
Copy link
Member

a8m commented Aug 28, 2023

I released yesterday a tagged version (below is the latest canary version). Can you test it again?

atlas version v0.13.4-f9354db-canary

@arroadie
Copy link
Author

arroadie commented Aug 28, 2023

Is the artifact created or should I build it?
edit: never mind, got it from the installer

@arroadie
Copy link
Author

this version inspected the tables without issues!

@a8m
Copy link
Member

a8m commented Aug 28, 2023

Happy to hear this. Thanks for confirming this.

@a8m a8m closed this as completed Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants