On 03/21/14 07:47, Claudio Valderrama C. wrote:
>> -----Original Message-----
>> From: Claudio Valderrama C. [mailto:[email protected]]
>> Sent: Jueves, 20 de Marzo de 2014 16:51
>>
>> F:\fb3dev\fbbuild\firebird30\temp\Win32\Debug\firebird>isql
>> localhost:x.fdb
>> -user sysdba -pass masterkey
>> Statement failed, SQLSTATE = 28000
>> Your user name and password are not defined. Ask your
>> database administrator
>> to set up a Firebird login.
>> -attempt to fetch past the last record in a record stream
>> Use CONNECT or CREATE DATABASE to specify a database
> Apart from my doubt why sysdba is not a default user, I think
> "attempt to fetch past the last record in a record stream"
> should not appear as error. It's meaningless. I found the place in
> SrpServer.cpp,
> SrpServer::authenticate(...), line 177
>
> stmt->execute(status, tra, par.metadata, par.buffer, dat.metadata,
> dat.buffer);
> if (!status->isSuccess())
> {
> status_exception::raise(status->get());
> }
>
> Here we get isc_stream_eof in the status vector and raise it. Later in the
> same function we raise it again
>
> catch(const Exception&)
> {
> LocalStatus s;
>
> if (stmt) stmt->free(&s);
> if (tra) tra->rollback(&s);
> if (att) att->detach(&s);
>
> throw;
> }
>
> We go back to server.cpp's ServerAuth::authenticate()
Not at all.
Exception is caught at the end of authenticate, there is unconditional
catch at SrpServer.cpp:275
catch (const Exception& ex)
{
status->init();
ex.stuffException(status);
}
return AUTH_FAILED;
which makes authenticate return auth error with detailed reason in
status. Now please look at server.cpp:520.
Arg::Gds loginError(isc_login);
#ifndef DEV_BUILD
if (st.get()[1] == isc_missing_data_structures)
#endif
{
loginError << Arg::StatusVector(st.get());
}
status_exception::raise(loginError.value());
return false; // compiler warning silencer
Depending upon being or not DEV_BUILD original error from st may be show
or not to user. Really:
Debug build:
# ./isql -user sysdba -pass masterkey localhost:employee
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database
administrator to set up a Firebird login.
-attempt to fetch past the last record in a record stream
Use CONNECT or CREATE DATABASE to specify a database
SQL>
Release build:
# ./isql -user sysdba -pass masterkey localhost:employee
Statement failed, SQLSTATE = 28000
Your user name and password are not defined. Ask your database
administrator to set up a Firebird login.
Use CONNECT or CREATE DATABASE to specify a database
SQL>
When debugging it's so nice to know exact reason. In release I fully
agree with you - that messages should not be seen.
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel