Re: [Firebird-devel] Handling NULL in XSQLVAR

2012-09-01 Thread Mark Rotteveel
On 30-8-2012 10:11, Alex Peshkoff wrote: On 08/29/12 23:53, Mark Rotteveel wrote: BTW: Out of curiosity: why is sqlind a pointer? Are there any other use cases for it being a pointer, because honestly I don't really see the point of having a pointer to a short in a structure like xsqlvar.

Re: [Firebird-devel] Handling NULL in XSQLVAR

2012-08-30 Thread Alex Peshkoff
On 08/29/12 23:53, Mark Rotteveel wrote: BTW: Out of curiosity: why is sqlind a pointer? Are there any other use cases for it being a pointer, because honestly I don't really see the point of having a pointer to a short in a structure like xsqlvar. IMHO people who designed SQLDA were much

Re: [Firebird-devel] Handling NULL in XSQLVAR

2012-08-29 Thread Mark Rotteveel
On 25-8-2012 11:49, Mark Rotteveel wrote: I have a question about handling NULL in XSQLVAR: Is it required to have sqldata set to null, or is setting sqlind to -1 sufficient? The reason I am asking is http://tracker.firebirdsql.org/browse/JDBC-271. When doing SELECT cast(? as varchar(1))

Re: [Firebird-devel] Handling NULL in XSQLVAR

2012-08-29 Thread Mark Rotteveel
On 29-8-2012 21:41, Mark Rotteveel wrote: On 29-8-2012 21:31, Dimitry Sibiryakov wrote: 29.08.2012 21:01, Mark Rotteveel wrote: I have created CORE-3913 as I think it would be a good idea to have the value of sqlind be leading instead of the nullable bit when sending parameters from client to

Re: [Firebird-devel] Handling NULL in XSQLVAR

2012-08-29 Thread Dimitry Sibiryakov
29.08.2012 21:41, Mark Rotteveel wrote: Why would that break existing applications and lead to Access Violations? Read my comment in ticket. sqlind may be not initialized for non-nullable parameters. -- WBR, SD.

Re: [Firebird-devel] Handling NULL in XSQLVAR

2012-08-29 Thread Mark Rotteveel
On 29-8-2012 21:44, Dimitry Sibiryakov wrote: 29.08.2012 21:41, Mark Rotteveel wrote: Why would that break existing applications and lead to Access Violations? Read my comment in ticket. sqlind may be not initialized for non-nullable parameters. Yes, this is what you get from working

Re: [Firebird-devel] Handling NULL in XSQLVAR

2012-08-25 Thread Dimitry Sibiryakov
25.08.2012 12:20, Mark Rotteveel wrote: I don't think that is entirely true Thinking is unreliable. Read this: // Make sure user has specified a data location (unless NULL) if (!xvar-sqldata !*null_ind (xvar-sqltype ~1) != SQL_NULL) return error_dsql_804(status,

Re: [Firebird-devel] Handling NULL in XSQLVAR

2012-08-25 Thread Mark Rotteveel
On 25-8-2012 12:25, Dimitry Sibiryakov wrote: 25.08.2012 12:20, Mark Rotteveel wrote: I don't think that is entirely true Thinking is unreliable. Read this: // Make sure user has specified a data location (unless NULL) if (!xvar-sqldata !*null_ind (xvar-sqltype ~1) != SQL_NULL)