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

calling isc_database_info with a resquest for isc_info_user_names does not return all connected users anymore? [CORE3471] #3832

Open
firebird-automations opened this issue May 9, 2011 · 1 comment

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: HaeRim Lee (ehaerim)

I downloaded ibpp from http://www.ibpp.org and compiled the tests project using VC6.
When running it from debug mode, Test1-Test5 was ok.
However Test6() raisied the following exception:

From Test6(),

// Connecting two users
db1 = IBPP::DatabaseFactory(ServerName, DbName, "EPOCMAN", "test");
db1->Connect();
IBPP::Database db2 = IBPP::DatabaseFactory(ServerName, DbName, UserName, Password);
db2->Connect();
// Checking their names
std::vectorstd::string\ usernames;
db1->Users(usernames);
if (usernames.size() != 2)
{
_Success = false;
printf(_(" Expected 2 users connected, found %d.\n"), (int)usernames.size());
}
printf(" Connected users : ");
for (unsigned int i = 0; i < usernames.size(); i++)
{
printf("%s", usernames[i].c_str());
if (i < usernames.size()-1) printf(", ");
}
printf("\n");

The above code seems to expect to get two users, but
usernames.size() returned 1, not 2 and.
Is this normal?
I haven't changed anything from the tests project at all.

Olivier Mascia from ibpp said:

FB2.5 changed a lot of semantic details about user management and reporting. The old reporting method (calling isc_database_info with a resquest for isc_info_user_names) might not return all connected users anymore, might return them all except the current one running the query, or might have a minor bug - compared to previous FB versions).

Please confirm if FB2.5 changed that way compared to previous FB versions.

thx
HaeRim

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

isc_database_info( isc_info_user_names ) will return
a) current user name only, if
- you run CS\SC, or
- you are not SYSDBA and not an owner of database
b) all attached user names if you run SS AND you are SYSDBA (or owner)

this behavior is very old and not new for v2.5.

---
Olivier Mascia from ibpp said:

FB2.5 changed a lot of semantic details about user management and reporting. The old reporting method (calling isc_database_info with a resquest for isc_info_user_names) might not return all connected users anymore, might return them all except the current one running the query, or might have a minor bug - compared to previous FB versions).
---
This is very strange to hear, especially "might return them all except the current one running the query". I never heard such complains.

Again, this ticket looks like attempt to get support which should be done using support list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant