Issue Details (XML | Word | Printable)

Key: CORE-3471
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: HaeRim Lee
Votes: 0
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Firebird Core

calling isc_database_info with a resquest for isc_info_user_names does not return all connected users anymore?

Created: 09/May/11 04:31 PM   Updated: 09/May/11 06:20 PM
Component/s: API / Client Library
Affects Version/s: 2.5.0
Fix Version/s: None

Environment: Win XP SP3


 Description  « Hide
I downloaded ibpp from 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::vector<std::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


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 09/May/11 06:20 PM
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.