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

Invalid result of ClickHouseDatabase.TableExists method #6

Closed
freem-trg opened this issue Feb 11, 2020 · 3 comments
Closed

Invalid result of ClickHouseDatabase.TableExists method #6

freem-trg opened this issue Feb 11, 2020 · 3 comments

Comments

@freem-trg
Copy link

Reproduction:

  1. Create default connection with clickhouse (connectionSettings.Database = "default")
  2. Then call database.ChangeDatabase( "someDatabase" );
  3. Then call database.TableExists( "existingTable" ). It will check default.existingTable instead of someDatabase.existingTable because of link

I think there should be:
cmd.AddParameter("database", _connection.Database);
instead of
cmd.AddParameter("database", _connectionSettings.Database);

Or i'm missing something?

@AntonAlekseevAA
Copy link
Contributor

Hello, thanks for you response. I fix it and create pull request, but if you want, i close it and you can open it youself, because i only repeat you code.

@freem-trg
Copy link
Author

Thank you! It's ok. Your pull request will be enough

ilyabreev added a commit that referenced this issue Feb 13, 2020
…exists

#6 fixed database name parameter in TableExists method.
@ilyabreev
Copy link
Owner

@freem-trg Thanks for reporting this issue!
@AntonAlekseevAA Thanks for the fix man!

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

3 participants