On 12/16/2015 08:23 PM, aaf...@users.sourceforge.net wrote:
> Revision: 62678
>            http://sourceforge.net/p/firebird/code/62678
> Author:   aafemt
> Date:     2015-12-16 17:23:02 +0000 (Wed, 16 Dec 2015)
> Log Message:
> -----------
> Restore raising of error from last tried provider as pointed by Alex

Dmitry - I once again, now publically, ask you to restore _OLD_ code 
regarding error handling.
I did NOT ask to "raise of error from last tried provider". Because it's 
WRONG here.
And later DO NOT change the code where you do not understand it. 
Moreover it was more efficient than calling setErrors(), though it does 
not matter here.
It was absolutely unneeded for you to make key holders be used on the 
client.

One more advice - check the result before committing. After this commit 
we once get:

# ./isql -z aa
ISQL Version: LI-V3.0.0.32222-dev Firebird 3.0 Release Candidate 2
Statement failed, SQLSTATE = 08006
Unable to complete network request to host "localhost".
-Failed to establish a connection.
Use CONNECT or CREATE DATABASE to specify a database
SQL>

Instead of correct:

# ./isql -z aa
ISQL Version: LI-V3.0.0.32064-dev Firebird 3.0 Release Candidate 1
Statement failed, SQLSTATE = 08001
I/O error during "open" operation for file "aa"
-Error while trying to open file
-No such file or directory
Use CONNECT or CREATE DATABASE to specify a database
SQL>

> Modified Paths:
> --------------
>      firebird/trunk/src/yvalve/why.cpp
>
> Modified: firebird/trunk/src/yvalve/why.cpp
> ===================================================================
> --- firebird/trunk/src/yvalve/why.cpp 2015-12-16 17:17:12 UTC (rev 62677)
> +++ firebird/trunk/src/yvalve/why.cpp 2015-12-16 17:23:02 UTC (rev 62678)
> @@ -5027,6 +5027,7 @@
>       if (orgFilename != expandedFilename && 
> !newDpb.find(isc_dpb_org_filename))
>               newDpb.insertPath(isc_dpb_org_filename, orgFilename);
>   
> +     StatusVector lastStatus(NULL);
>       StatusVector temp(NULL);
>       CheckStatusWrapper status(&temp);
>   
> @@ -5075,7 +5076,7 @@
>               case isc_io_error:
>               case isc_lock_dir_access:
>               case isc_no_priv:
> -//                   currentStatus = &tempCheckStatusWrapper;
> +                     lastStatus.setErrors(temp);
>                       // fall down...
>               case isc_unavailable:
>                       break;
> @@ -5088,6 +5089,9 @@
>       }
>   
>       // If execution reached this point, no suitable provider has been found
> +     // Raise error returned by last tried one
> +     lastStatus.check();
> +     // if no errors, raise isc_unavailable
>       Arg::Gds(isc_unavailable).raise();
>   }
>   
>



------------------------------------------------------------------------------
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to