Default parameters in FbRestore 
--------------------------------

                 Key: DNET-255
                 URL: http://tracker.firebirdsql.org/browse/DNET-255
             Project: .NET Data provider
          Issue Type: Task
            Reporter: Konstantin Dombrugov
            Assignee: Jiri Cincura


Current source code sets page size = 4096 by default. 
If "a priori" page size of backup is unknown and if it is not set (right) this 
could lead to error during restore. For example: "key size for index exceeds 
limit" can happen because limit for key size depends on page size 

Imho, optional parameters such as page size and page buffers should not be 
passed to Spb if they are not specified.

fix is simple:
1) remove initialization of pageBuffers and pageSize from constructor 
FbRestore()
2) update setter of PageSize to allow 0 value  
3) replace in FbRestore.Execute() 
                    this.StartSpb.Append(IscCodes.isc_spb_res_buffers, 
this.pageBuffers);
                    this.StartSpb.Append(IscCodes.isc_spb_res_page_size, 
this.pageSize);
with
                if (pageBuffers!=0)
                    this.StartSpb.Append(IscCodes.isc_spb_res_buffers, 
this.pageBuffers);
                if (pageSize!=0)
                    this.StartSpb.Append(IscCodes.isc_spb_res_page_size, 
this.pageSize);


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have 
the opportunity to enter the BlackBerry Developer Challenge. See full prize 
details at: http://p.sf.net/sfu/blackberry
_______________________________________________
Firebird-net-provider mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to