You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the issue #207 the user dropped default database without a ClickHouse restart.
Which is not supported by CH, see source code on global context.
User must set the new default database name in the server settings.
And user must restart the whole server.
Now in a default scenario of c = create_client() c.database is None and not default
Which leads to any code relying on the default to fail.
The text was updated successfully, but these errors were encountered:
Do you know of any code actually relying on a value of Client.database?. None of the client methods rely on this value since all functionality must operate correctly in the user's default database which ClickHouse will use if the database parameter is not specified. If the user actually needs that value, they can substitute the currentDatabase() function in their query or use a client.command(SELECT currentDatabase()) to get it. (The better argument is that Client.database should be a private _database property, since it's intended use is internal functionality, but that would be even more of a breaking change.)
Also, in addition to the situation where the default was dropped without resetting the server wide default_database setting, the previous code was broken even if the just default_database for the specified user was dropped. While in theory the operator should not do that, it's cleaner and more user friendly to remove the unnecessary and possibly invalid currentDatabase() call, and not break existing clients or client applications with confusing error messages.
In the issue #207 the user dropped default database without a ClickHouse restart.
Which is not supported by CH, see source code on global context.
User must set the new
default
database name in the server settings.And user must restart the whole server.
Now in a default scenario of
c = create_client()
c.database
isNone
and notdefault
Which leads to any code relying on the default to fail.
The text was updated successfully, but these errors were encountered: