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

Support "show status" #4017

Open
MichaelScofield opened this issue May 23, 2024 · 7 comments
Open

Support "show status" #4017

MichaelScofield opened this issue May 23, 2024 · 7 comments
Assignees
Labels
C-feature Category Features good first issue Good for newcomers

Comments

@MichaelScofield
Copy link
Collaborator

What problem does the new feature solve?

For the compatibility of some mysql clients(like navicat), we'd better implement the "show status". Otherwise the client may report some annoying error messages, which makes people confused. (In the older version of navicat, it seems the error of "show status" can't be omitted.)

What does the feature do?

Implement the "show status" in mysql as its document here. But we don't need to fully implement it all, just:

  • the plain "show status" is enough; no others like "like" or "where"
  • pick some meaningful server status variables here, as best as we can

Implementation challenges

No response

@MichaelScofield MichaelScofield added good first issue Good for newcomers C-feature Category Features labels May 23, 2024
@LYZJU2019
Copy link
Contributor

Can I have a try?

@LYZJU2019
Copy link
Contributor

I am confused about where to get the value of server status variables. It seems that Greptime does not have a performance_schema table, which is used to inspect the internal execution of the server at runtime. The information_schema table provides metadata about the database but does not reflect the current state of the server.

@WenyXu
Copy link
Member

WenyXu commented May 26, 2024

... but does not reflect the current state of the server

Yes, we may need a place(a global status registry or something else) to track all related info. cc @killme2008 @MichaelScofield

@MichaelScofield
Copy link
Collaborator Author

I am confused about where to get the value of server status variables. It seems that Greptime does not have a performance_schema table, which is used to inspect the internal execution of the server at runtime. The information_schema table provides metadata about the database but does not reflect the current state of the server.

Fow now, it doesn't matter what variables should be returned by "show status". All we want is to make Navicat not complained. So I think we can simply add a regex rule in federated.rs for "show status" first, returning empty contents, and see how Navicat satisfy about it. If Navicat then still complains some variables are missing, we can "fake" them (at last we are not really mysql, don't need to fully comply to it).

@MichaelScofield
Copy link
Collaborator Author

Just tried the "show status", it prints empty set. However, I think we'd better print the table header as well even there's indeed no value. Like this:

+--------------------+----------+
| Variable_name      | Value    |
+--------------------+----------+
+--------------------+----------+

So this issue is still opened.

@LindaSummer
Copy link

Hi @MichaelScofield ,

I'm a newbie of GreptimeDB and want to make some contribution.
Can this task be assigned to me?

Best Regards,
Edward

@killme2008
Copy link
Contributor

Hi @MichaelScofield ,

I'm a newbie of GreptimeDB and want to make some contribution. Can this task be assigned to me?

Best Regards, Edward

Of course, thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category Features good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants