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

Tool dolphie needs @@admin_version system variable to return a numeric type. #8585

Open
timsehn opened this issue Nov 22, 2024 · 3 comments
Open
Labels
bug Something isn't working correctness We don't return the same result as MySQL good repro Easily reproducible bugs integrations Issues with tools connecting to/querying Dolt

Comments

@timsehn
Copy link
Contributor

timsehn commented Nov 22, 2024

Repro:

  1. Start a Dolt sql-server on localhost.
  2. Install dolphie
$ brew install dolphie
  1. Run:
dolphie mysql://root@localhost:3306*

Error in dolphie:
image

Error in dolt sql-server:

 09:39:41.202391 -0800 PST m=+40.711971418" connectionDb= connectionID=1 error="Unknown system variable '@@admin'" query="SELECT @@admin-version"

I think we've also got a parsing problem with the - in system variables.

@timsehn timsehn added bug Something isn't working integrations Issues with tools connecting to/querying Dolt correctness We don't return the same result as MySQL good repro Easily reproducible bugs labels Nov 22, 2024
@timsehn
Copy link
Contributor Author

timsehn commented Nov 22, 2024

Once this fix is in: dolthub/go-mysql-server#2759

Dolt and MySQL fail in the exact same spot:

AttributeError: module 'os' has no attribute 'getloadavg'

Looks like a Python os package version issue.

@jycor
Copy link
Contributor

jycor commented Nov 22, 2024

The SELECT @@admin-version query is supposed fail. dolphie is using it to determine if this is a ProxySQL or MySQL connection.

           # If the query is successful, then the connection is to ProxySQL
            try:
                self.cursor.execute("SELECT @@admin-version")
                self.source = ConnectionSource.proxysql
            except Exception:
                self.source = ConnectionSource.mysql

Source: https://github.com/charles-001/dolphie/blob/9000c7167b97f192f53c1de22c954a7e7bde70a1/dolphie/Modules/MySQL.py#L72-L77

@jycor
Copy link
Contributor

jycor commented Nov 22, 2024

Update: It looks like one the system variables has a null value when it should be empty string

AttributeError: 'NoneType' object has no attribute 'isnumeric'
time="2024-11-22T12:31:51-08:00" level=debug msg="Query finished in 1 ms" connectTime="2024-11-22 12:31:46.1455538 -0800 PST m=+250.274868101" connectionDb=tmp2 connectionID=3 query="show global variables"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctness We don't return the same result as MySQL good repro Easily reproducible bugs integrations Issues with tools connecting to/querying Dolt
Projects
None yet
Development

No branches or pull requests

2 participants