Обсуждение: Regression tests for deprecated functions
Hi all, I have created the attached patch, that adds a new set of regression tests for all the deprecated functions of ODBC listed here: http://msdn.microsoft.com/en-us/library/ms716309%28v=vs.85%29.aspx Btw, I noticed that we use in most of the regression tests deprecated functions (SQLFreeStmt mainly). I think that we should change them to the latest ODBC 3.X functions. I don't mind sending another patch for that... Regards, -- Michael
Вложения
On 03/19/2014 01:27 PM, Michael Paquier wrote: > I have created the attached patch, that adds a new set of regression > tests for all the deprecated functions of ODBC listed here: > http://msdn.microsoft.com/en-us/library/ms716309%28v=vs.85%29.aspx SQLFreeStmt isn't completely deprecated, just the SQL_DROP option. Which you're not testing ;-). SQLBindParam isn't really deprecated, see http://msdn.microsoft.com/en-us/library/ms710955%28v=vs.85%29.aspx. I think we'll want to keep that, even if we remove the rest of the deprecated functions, to stay compatible with a ISO / Open Group driver manager that doesn't know about the Microsoft extensions. (AFAIK no such driver manager actually exists, but as a matter of principle...) Please also add the new test case to test/Makefile and Makefile.am > Btw, I noticed that we use in most of the regression tests deprecated > functions (SQLFreeStmt mainly). I think that we should change them to > the latest ODBC 3.X functions. I agree. - Heikki
Updated patch is attached. On Thu, Mar 20, 2014 at 9:15 AM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote: > On 03/19/2014 01:27 PM, Michael Paquier wrote: >> >> I have created the attached patch, that adds a new set of regression >> tests for all the deprecated functions of ODBC listed here: >> http://msdn.microsoft.com/en-us/library/ms716309%28v=vs.85%29.aspx > > > SQLFreeStmt isn't completely deprecated, just the SQL_DROP option. Which > you're not testing ;-). Oops. It looks like a typo. I changed the test to use SQL_DROP. > SQLBindParam isn't really deprecated, see > http://msdn.microsoft.com/en-us/library/ms710955%28v=vs.85%29.aspx. I think > we'll want to keep that, even if we remove the rest of the deprecated > functions, to stay compatible with a ISO / Open Group driver manager that > doesn't know about the Microsoft extensions. (AFAIK no such driver manager > actually exists, but as a matter of principle...) OK, I thought so... Now test is removed. > Please also add the new test case to test/Makefile and Makefile.am Fixed. Regards, -- Michael
Вложения
On Thu, Mar 20, 2014 at 9:45 AM, Michael Paquier <michael.paquier@gmail.com> wrote: >> Please also add the new test case to test/Makefile and Makefile.am > Fixed. Please find attached an updated patch, I forgot to add deprecated.out in Makefile.am. Thanks. -- Michael
Вложения
On 03/20/2014 06:24 AM, Michael Paquier wrote: > On Thu, Mar 20, 2014 at 9:45 AM, Michael Paquier > <michael.paquier@gmail.com> wrote: >>> Please also add the new test case to test/Makefile and Makefile.am >> Fixed. > Please find attached an updated patch, I forgot to add deprecated.out > in Makefile.am. Thanks, pushed. - Heikki
I spotted one more issue in the regression test for deprecated functions: The comment in it correctly states, SQLColAttributes has been replaced with SQLColAttribute. But the regression test then calls SQLColAttribute, i.e. the new functions, not the deprecated one. I haven't looked what difference it makes in practice. (We don't have any other regression tests for the new SQLColAttribute, which would be nice to have anyway) - Heikki
On Thu, Jun 12, 2014 at 11:13 PM, Heikki Linnakangas <hlinnakangas@vmware.com> wrote: > I spotted one more issue in the regression test for deprecated functions: > > The comment in it correctly states, SQLColAttributes has been replaced with > SQLColAttribute. But the regression test then calls SQLColAttribute, i.e. > the new functions, not the deprecated one. I haven't looked what difference > it makes in practice. The field identifiers have been changed from SQL_COLUMN_* to SQL_DESC_*: http://msdn.microsoft.com/en-us/library/ms710910%28v=vs.85%29.aspx Hence I think that the patch attached is enough, even if we do not test all the field identifiers.. > (We don't have any other regression tests for the new SQLColAttribute, which > would be nice to have anyway) True. -- Michael