/perl/vendor/lib/DBD/ODBC/Changes.pm

http://github.com/dwimperl/perl-5.12.3.0 · Perl · 2158 lines · 1832 code · 326 blank · 0 comment · 135 complexity · ec49078a39feaa8557c3aa5757e2f848 MD5 · raw file

  1. =head1 NAME
  2. DBD::ODBC::Changes - Log of significant changes to the DBD::ODBC
  3. As of $LastChangedDate: 2011-03-06 17:18:35 +0000 (Sun, 06 Mar 2011) $
  4. $Revision: 10667 $
  5. =head2 Changes in DBD::ODBC 1.29 March 8, 2011
  6. * An official release of the 1.28 development releases.
  7. [NOTE]
  8. * The 1.28 development releases made a change which causes a generic
  9. error to be reported when an ODBC call fails but an error message
  10. is not retrieved from the ODBC Driver. It appears this has caught
  11. out a few ODBC drivers - notably freeTDS and Firebird. You now may
  12. see errors that were missed before e.g., DBIx::Class's tests for
  13. Firebird now errors test 21 "outer txn rolled back" (and others)
  14. because SQLRowCount returns an error after "ROLLBACK TO SAVEPOINT
  15. savepoint_0"; before this error was missed.
  16. =head2 Changes in DBD::ODBC 1.28_5 March 6, 2011
  17. [BUG FIXES]
  18. * rt_59621.t had wrong skip count
  19. * Fixed missing SQL_MAX_TABLE_NAME_LEN definition from test.
  20. * Fixed problem with some drivers which batch "insert;select" where
  21. SQLMoreResults is not required and an extra describe is done.
  22. * Fixed "select 1" in 02simple.t for Firebird ODBC Driver.
  23. * disconnect call added to 70execute_array.t was in the wrong place.
  24. * In non-unicode mode we bind strings as SQL_CHAR but the driver may
  25. have described them as SQL_WCHAR and we were not doing ChopBlanks
  26. processing in that case.
  27. [REQUIREMENTS]
  28. * Now needs Test::Simple 0.90.
  29. [OTHER]
  30. * Added dml_counts.pl example
  31. * worked around a problem in freeTDS in the 20SqlServer.t test
  32. provided by Ralph Doncaster.
  33. * Changed test rt_62033.t to try and make it work with freeTDS - I
  34. failed. It now skips attempts to fetch when the insert fails.
  35. * Worked around problem in Firebird ODBC driver which reports
  36. timestamps have a display size of 24 characters but then can
  37. return 29 which could lead to data truncation errors.
  38. See http://tracker.firebirdsql.org/browse/ODBC-112
  39. * Worked around problem in Firebird ODBC driver which reports
  40. VARCHARs have a maximum length of 32765 but in fact it is 4000.
  41. See http://tracker.firebirdsql.org/browse/ODBC-111
  42. * Improvements in tracing to take account of DBI's neatsvpv lops 5
  43. characters off maxsize on a string.
  44. =head2 Changes in DBD::ODBC 1.28_4 February 24, 2011
  45. [BUG FIXES]
  46. * Fixed compilation problems with DBIf_TRACE_TXN
  47. * Added missing disconnect call to 70execute_array.t
  48. =head2 Changes in DBD::ODBC 1.28_3 February 22, 2011
  49. [BUG FIXES]
  50. * Fixed MANIFEST in 1.28_2 which named 2 files incorrectly.
  51. * Fixed use of PREREQ_PRINT in versions of ExtUtils::MakeMaker which
  52. don't support it.
  53. * Fixed a check on LD_LIBRARY_PATH for unixODBC which could report
  54. you've not set LD_LIBRARY_PATH correctly.
  55. [ENHANCEMENTS]
  56. * Added Perl and ExtUtils::MakeMaker version output to build process.
  57. * Added support for DBI's new trace flags ENC, CON, TXN and
  58. DBD. From DBI 1.617 you should be able to use: DBI_TRACE=DBD to
  59. ONLY get DBD::ODBC tracing without DBI tracing ENC and CON DBI
  60. flags are synonymous with DBD::ODBC's odbcconnection and
  61. odbcunicode trace flags which you can still use for now.
  62. [OTHER]
  63. * From now on I'm changing the way the Changes file is written as
  64. per article at
  65. http://blog.urth.org/2011/01/changes-file-how-and-how-not-to.html
  66. * Some broken drivers (freeTDS in this case) can return SQL_ERROR
  67. from an ODBC API function and then SQLError does not return
  68. error details. In this case set a generic error saying an error
  69. occurred but we could not retrieve it.
  70. * Added FAQ entry on MS Access and text columns limited to 255 chrs.
  71. * Added 70execute_array.t test.
  72. =head2 Changes in DBD::ODBC 1.28_2 January 24, 2011
  73. Added -x argument to Makefile.PL saying you prefer unixODBC over
  74. iODBC driver managers as a) we need to look for iODBC first on some
  75. platforms to detect iODBC and b) some platforms (Debian/Ubuntu)
  76. people have both binary packages installed but only unixODBC dev
  77. package.
  78. Patch from Rafael Kitover (Caelum) for better Cygwin handling.
  79. Minor change to data sources test to cope with someone having no
  80. data sources and using a DSN-less connection for testing.
  81. Fixed MARS test when a DSN-less connection used for testing - thanks
  82. to Rafael Kitover (Caelum) for spotting this.
  83. pod patch for "CPAN Testers Reporting" to point at cpan testers wiki
  84. from Rafael Kitover (Caelum).
  85. Fixed some broken links in the FAQ.
  86. Add a multiple active statement document link to random links and
  87. the FAQ entry.
  88. A call to SQLNumResultCols was not checked to test it succeeded.
  89. Not seen anyone run into this as yet.
  90. =head2 Changes in DBD::ODBC 1.28_1 December 29, 2010
  91. Rewrote documentation on odbc_SQL_ROWSET_SIZE and added loads of
  92. notes so I don't have to go through a huge irc conversation with
  93. ribasushi again.
  94. Workaround bug in DBI (prior to 1.616) which mistakenly issues a
  95. FETCH on any attribute passed to the connect method and sometimes
  96. driver managers error on SQL_ROWSET_SIZE in SQLGetConnectAttr.
  97. ChopBlanks was not working on UCS-2 encoded data written into bound
  98. columns and was also sometimes reading off the end of the bound
  99. array.
  100. Minor FAQ changes:
  101. Added an additional way to read MS Access dbs from Unix
  102. Clarified versions for MARS_Connection
  103. updates to cancel_big_fetch.pl
  104. Updated TO_DO with more stuff to do
  105. Improved tracing output
  106. Tidied up some of the examples
  107. =head2 Changes in DBD::ODBC 1.27 December 29, 2010
  108. Official release of the 1.26 development releases.
  109. =head2 Changes in DBD::ODBC 1.26_4 December 14, 2010
  110. Fixed bug highlighted by investigation into rt 62033 where the
  111. active flag was sometimes not set on the statement after
  112. SQLMoreResults indicates a result-set exists.
  113. Fix rt 63550 reported by John Corcoran where if a do method call
  114. fails the SQL C<Statement> is not available in an error handler as
  115. we never created a DBI statement in the first place. Added a note
  116. to "do" deviations pod.
  117. Minor fix to head at wrong level in the pod.
  118. Fix a possible snprintf buffer overflow in GetTypeInfo when
  119. the type is specified and it is negative.
  120. =head2 Changes in DBD::ODBC 1.26_3 November 18, 2010
  121. Fixed rt 63108. The change to column binding in 1.24_2 was not
  122. complete and causes bound columns to be rebound on each execute
  123. wasting time and leaking memory. Found, diagnosed and proposed fix
  124. by Steve Bentley.
  125. =head2 Changes in DBD::ODBC 1.26_2 November 9, 2010
  126. Fixed bug found by frew where an snprintf can overflow when binding
  127. a lot of parameters.
  128. =head2 Changes in DBD::ODBC 1.26_1 October 24, 2010
  129. There are over 200 block changes in the source code for this release
  130. from the previous one (see below). If you are using DBD::ODBC in
  131. production you should not upgrade without testing this release first
  132. as it introduces a lot of internal changes. DBD::ODBC has now gone
  133. entirely ODBC 3 and relies on an ODBC Driver Manager to map calls
  134. to ODBC 2.0 drivers (why are you still using ODBC 2.0 drivers?).
  135. From now on DBD::ODBC needs to be linked with an ODBC Driver Manager
  136. and I recommend unixODBC on UNIX and the MS ODBC Driver Manager
  137. on Windows. There are really good reasons for this but mainly it
  138. is because an ODBC Driver Manager will map ODBC 2.0 calls to an
  139. ODBC 3.0 driver and vice versa and handle UNICODE transparently.
  140. Bumped Test::Simple requirement up to 0.90 so we can use done_testing
  141. and note.
  142. Bump Perl requirement to 5.8 as per DBI.
  143. Workaround a bug in mdbtools which fails to set the out connection
  144. string in a SQLDriverConnect call. This can lead to:
  145. Fixed panic: sv_setpvn called with negative strlen at
  146. blib/lib/DBD/ODBC.pm line 107.
  147. Added rt_61370.t for rt 61370.
  148. Removed last remaining sprintf calls and replaced with snprintf.
  149. Changed the point at which DBD::ODBC switches from VARCHAR to
  150. LONGVARCHAR or WVARCHAR to WLONGVARCHAR when SQLDesribeParam fails. It
  151. was 4000 and is now 2000 for unicode builds. Works around a daft issue
  152. in the MS SQL Server driver which will not allow 'x' x 2001 converted to
  153. wide characters to be inserted into a varchar(8000).
  154. Minor change to Makefile.PL to print out found libs for iODBC and
  155. unixODBC.
  156. Added some FAQs for problems with iODBC and a recent bug in DBI.
  157. Added FAQ on my_snprintf problem.
  158. Fixed some pod errors in FAQ document.
  159. Fixed warning on 64 bit Strawberry Perl when compiling dbdimp.c for
  160. cast from ptr to UDWORD.
  161. Moved to_do items from Changes to TO_DO.
  162. Reformatted this file to save Jens work.
  163. Changed calls to SQLTransact (ODBC 2.0) to SQLEndTran (ODBC 3.0).
  164. There really shouldn't be any ODBC 2.0 drivers still around but even
  165. if there are, the ODBC driver manager should do the mapping for us.
  166. Changed calls to SQLGetConnectOption/SQLSetConnectOption to
  167. to SQLGetConnectAttr/SQLSetConnectAttr for ODBC 3.0.
  168. Changed calls to SQLColAttributes (ODBC 2.0) to SQLColAttribute
  169. (ODBC 3.0).
  170. Bumped requirement on DBI to 1.609 because that is the first version
  171. to contain a dbipport.h which defined my_snprintf - see
  172. https://rt.cpan.org/Public/Bug/Display.html?id=62346 and
  173. http://www.nntp.perl.org/group/perl.dbi.dev/2010/10/msg6335.html
  174. Various small changes to dbdimp.c which should have no effect other
  175. than to make it leaner:
  176. Removed all dTHR occurrences from dbdimp.c as it is a NOOP since 5.8
  177. and we need 5.8 at least.
  178. Removed dbd_param_err as it was not used
  179. Removed odbc_get_query_timeout as it was never compiled
  180. Removed eod field from statement as it was never used
  181. Removed a load of commented out code
  182. Replaced some SvPV calls with SvPV_nolen when we didn't used the
  183. length
  184. Removed some silly code from dbd_db_execdirect which attempted to
  185. return -3 - don't think it could ever get run.
  186. Minor tracing output tidy up
  187. Removed dbd_caution as it was no used
  188. Localised more variable declarations
  189. =head2 Changes in DBD::ODBC 1.25 September 22, 2010
  190. Official release of 1.25 combining all the changes in the 1.24_x
  191. development releases.
  192. =head2 Changes in DBD::ODBC 1.24_6 September 16, 2010
  193. rt 61370 - default XML type parameters in SQL Server to SQL_WCHAR so
  194. they accept unicode strings.
  195. =head2 Changes in DBD::ODBC 1.24_5 September 15, 2010
  196. Fixed missing SvSETMAGIC on a bound scalar which was causing length() to
  197. return the wrong result - see http://www.perlmonks.org/?node_id=860211
  198. and a big thank you to Perl Monks and in particular ikegami.
  199. Changed bind_col so it actually pays attention to the TYPE attribute as
  200. you could not override the bind type of a bound column before.
  201. =head2 Changes in DBD::ODBC 1.24_4 September 8, 2010
  202. Left a sv_undef in - thanks smoke testers for finding that.
  203. Change sprintf to snprintf for safety.
  204. =head2 Changes in DBD::ODBC 1.24_3 September 6, 2010
  205. Added note from Robert Freimuth for obtaining the last insert ID in MS
  206. Access.
  207. Changed all &sv_yes/&sv_no occurrances in XS to PL_sv_yes/PL_sv_no as
  208. the originals have now gone from blead Perl.
  209. Minor change to fix missing newline in trace output.
  210. Added a FAQ entry for how "use regional settings" in MS SQL Server
  211. breaks things.
  212. =head2 Changes in DBD::ODBC 1.24_2 July 23, 2010
  213. Fix rt57957 reported by Marc Prewitt. DBD::ODBC was not ignoring named
  214. placeholders and ? inside comments. Comments are deemed as text between
  215. "/*" and "*/" (if not in a literal) and line comments begin with "--".
  216. Added a FAQ on procedures not completing in MS SQL Server. Thanks to
  217. Peter Rabbitson for hitting this problem and reminding me I'd seen it a
  218. couple of times before.
  219. Added a FAQ on equality comparisons with ntext columns.
  220. Added pod for last_insert_id which is not currently supported.
  221. Fix bug where if SQLMoreResults was called and failed it was not
  222. reported.
  223. Removed some unused fields from the fbh structure which should save a
  224. little memory for each column in a result-set.
  225. Started adding support for DBI's DiscardString and StrictlyTyped but not
  226. complete yet so don't use them yet.
  227. Added experimental odbc_lob_read method - see pod. Thanks to tye and
  228. ikegami on perlmonks for pointing out some problems with my initial
  229. implementation.
  230. Moved the binding of columns to the first call to fetch instead of after
  231. execute is called as it prevents bind_col overrriding the type used for
  232. binding and I needed it to support odbc_lob_read. This may have
  233. undesired affects so any testing of this release would be appreciated.
  234. Added bind_col method so DBD::ODBC can support attributes on a bind_col
  235. call.
  236. Removed support for DBI's blob_read - it was totally flawed and did not
  237. work at all. May replace in the future.
  238. Added support for MS SQL Server XML type (SQL type -152). See rt 59621.
  239. Added note on do method implementation in DBD::ODBC and how some may
  240. consider it to deviate from the DBI specification.
  241. =head2 Changes in DBD::ODBC 1.24_1 May 27, 2010
  242. Corrected pod and private attributes for the odbc_SQL_DRIVER_ODBC_VER
  243. attribute which was documented as SQL_DRIVER_ODBC_VER.
  244. Added FAQ on pauses on statement destruction when all the result-set has
  245. not been retrieved (mostly freeTDS and MS SQL Server ODBC Driver).
  246. Fixed bug introduced in 1.24 where if you are using MS SQL Server, and
  247. you are preparing, binding placeholders and re-executing multiple times
  248. you may get a "Invalid character value for cast specification"
  249. error. Thanks to anonymous for spotting this and producing a standalone
  250. example of the problem that made it so much easier to find.
  251. =head2 Changes in DBD::ODBC 1.24 May 14, 2010
  252. Minor change in Makefile.PL to only use NO_META if ExtUtils::MakeMaker
  253. is at least at version 6.10. Reported by Chunmei Wu.
  254. Minor change to test rt_50852 which had wrong skip count.
  255. =head2 Changes in DBD::ODBC 1.23_5 May 6, 2010
  256. Added advice from Jan Dubois (ActiveState) on building DBD::ODBC for
  257. ActivePerl (see README.windows).
  258. rt56692. Fix spelling mistake in DBD::ODBC pod - thanks to Ansgar
  259. Burchardt.
  260. Added a 7th way to help documentation - become a tester.
  261. Hopefully fixed problems building on windows 32 bit platforms that have
  262. old sql header files not mentioning SQLLEN/SQLULEN.
  263. =head2 Changes in DBD::ODBC 1.23_4 April 13, 2010
  264. Added more FAQs.
  265. Small optimization to remove calls to SQLError when tracing is not
  266. turned on. This was a bug. We only need to call SQLError when SQLExecute
  267. succeeds if there is an error handler or if tracing is enabled. The test
  268. was for tracing disabled!
  269. Large experimental change primarily affecting MS SQL Server users but it
  270. does impact on other drivers too. Firstly, for MS SQL Server users we no
  271. longer SQLFreeStmt(SQL_RESET_PARAMS) and rebind bound parameters as it
  272. is causing the MS SQL Server ODBC driver to re-prepare the SQL.
  273. Secondly (for all drivers) we no longer call SQLBindParameter again IF
  274. all the arguments to it are the same as the previous call. If you find
  275. something not working you better let me know as this is such a speed up
  276. I'm going to go with this unless anyone complains.
  277. Minor change to avoid a double call to SQLGetInfo for SQL_DBMS_NAME
  278. immediately after connection.
  279. Small change for rt 55736 (reported by Matthew Kidd) to not assume a
  280. parameter is varXXX(max) if SQLDescribeParam failed in the Microsoft
  281. Native Client driver.
  282. =head2 Changes in DBD::ODBC 1.23_3 March 24, 2010
  283. Minor changes to Makefile.PL and dbdimp.c to remove some compiler
  284. warnings.
  285. Fix some calls to SQLMoreResults which were not passing informational
  286. messages on to DBI's set_err. As you could not see all the informational
  287. messages from procedures, only the first.
  288. Fix minor issue in 02simple test which printed the Perl subversion
  289. before the version.
  290. Changes to 20SqlServer.t to fix a few typos and make table names
  291. consistent wrt to case - (as someone had turned on case-sensitivity in
  292. SQL Server) Similar changes in rt_38977.t and rt_50852.t
  293. =head2 Changes in DBD::ODBC 1.23_2 January 26, 2010
  294. Fixed bug in Makefile.PL which could fail to find unixODBC/iODBC header
  295. files but not report it as a problem. Thanks to Thomas J. Dillman and
  296. his smoker for finding this.
  297. Fixed some compiler warnings in dbdimp.c output by latest gcc wrt to
  298. format specifiers in calls to PerlIO_printf.
  299. Added the odbc_force_bind_type attribute to help sort out problems with
  300. ODBC Drivers which support SQLDescribeParam but describe the parameters
  301. incorrectly (see rt 50852). Test case also added as rt_50852.t.
  302. =head2 Changes in DBD::ODBC 1.23_1 October 21, 2009
  303. makefile.PL changes:
  304. some formatting changes to output warn if unixodbc headers are not
  305. found that the unixodbc-dev package is not installed use $arext
  306. instead of "a"
  307. pattern match for pulling libodbc.* changed
  308. warn if DBI_DSN etc not defined
  309. change odbc_config output for stderr to /dev/null
  310. missing / on /usr/local wheb finding find_dm_hdr_files()
  311. New FAQ entries from Oystein Torget for bind parameter bugs in SQL
  312. Server.
  313. rt_46597.rt - update on wrong table
  314. Copied dbivport.h from the latest DBI distribution into DBD::ODBC.
  315. Added if_you_are_taking_over_this_code.txt.
  316. Add latest Devel::PPPort ppport.h to DBD::ODBC and followed all
  317. recommendations for changes to dbdimp.c.
  318. Added change to Makefile.PL provided by Shawn Zong to make
  319. Windows/Cygwin work again.
  320. Minor change to Makefile.PL to output env vars to help in debugging
  321. peoples build failures.
  322. Added odbc_utf8_on attribute to dbh and sth handles to mark all strings
  323. coming from the database as utf8. This is for Aster (based on
  324. PostgreSQL) which returns all strings as UTF-8 encoded unicode. Thanks
  325. to Noel Burton-Krahn.
  326. =head2 Changes in DBD::ODBC 1.23 September 11, 2009
  327. Only a readme change and version bumped to 1.23. This is a full release
  328. of all the 1.22_x development releases.
  329. =head2 Changes in DBD::ODBC 1.22_3 August 19, 2009
  330. Fix skip count in rt_38977.t and typo in ok call.
  331. Workaround a bug in unixODBC 2.2.11 which can write off the end of the
  332. string buffer passed to SQLColAttributes.
  333. Fix skip count in rt_null_nvarchar.t test for non SQL Server drivers.
  334. Fix test in 02simple.t which reported a fail if you have no ODBC
  335. datasources.
  336. In 99_yaml.t pick up the yaml spec version from the meta file instead of
  337. specifying it.
  338. Change calls to SQLPrepare which passed in the string lenth of the SQL
  339. to use SQL_NTS because a) they are null terminated and more importantly
  340. b) unixODBC contains a bug in versions up to 2.2.16 which can overwrite
  341. the stack by 1 byte if the string length is specified and not built with
  342. iconv support and converting the SQL from ASCII to Unicode.
  343. Fixed bug in ping method reported by Lee Anne Lester where it dies if
  344. used after the connection is closed.
  345. A great deal of changes to Makefile.PL to improve the automatic
  346. detection and configuration for ODBC driver managers - especially on
  347. 64bit platforms. See rt47650 from Marten Lehmann which started it all
  348. off.
  349. Add changes from Chris Clark for detecting IngresCLI.
  350. Fix for rt 48304. If you are using a Microsoft SQL Server database and
  351. nvarchar(max) you could not insert values between 4001 and 8000
  352. (inclusive) in size. A test was added to the existing rt_38977.t test.
  353. Thanks to Michael Thomas for spotting this.
  354. Added FAQ on UTF-8 encoding and IBM iSeries ODBC driver.
  355. Add support for not passing usernames and passwords in call to connect.
  356. Previously DBD::ODBC would set an unspecified username/password to '' in
  357. ODBC.pm before calling one of the login_xxx functions. This allows the
  358. driver to pull the username/password from elsewhere e.g., like the
  359. odbc.ini file.
  360. =head2 Changes in DBD::ODBC 1.22_1 June 16, 2009
  361. Applied a slightly modified version of patch from Jens Rehsack to
  362. improve support for finding the iODBC driver manager.
  363. A UNICODE enabled DBD::ODBC (the default on Windows) did not handle
  364. UNICODE usernames and passwords in the connect call properly.
  365. Updated "Attribution" in ODBC.pm.
  366. Unicode support is no longer experimental hence warning and prompt
  367. removed from the Makefile.PL.
  368. old_ping method removed.
  369. Fixed bug in 02simple.t test which is supposed to check you have at
  370. least one data source defined. Unfortunately, it was checking you had
  371. more than 1 data source defined.
  372. rt_null_varchar had wrong skip count meaning non-sql-server drivers or
  373. sql server drivers too old skipped 2 tests more than were planned.
  374. =head2 Changes in DBD::ODBC 1.22 June 10, 2009
  375. Fixed bug which led to "Use of uninitialized value in subroutine entry"
  376. warnings when writing a NULL into a NVARCHAR with a unicode-enabled
  377. DBD::ODBC. Thanks to Jirka Novak and Pavel Richter who found, reported
  378. and patched a fix.
  379. Fixed serious bug in unicode_helper.c for utf16_len which I'm ashamed
  380. to say was using an unsigned short to return the length. This meant you
  381. could never have UTF16 strings of more than ~64K without risking
  382. serious problems. The DBD::ODBC test code actually got a
  383. *** glibc detected *** /usr/bin/perl: double free or corruption
  384. (out): 0x406dd008 ***
  385. If you use a UNICODE enabled DBD::ODBC (the default on Windows) and
  386. unicode strings larger than 64K you should definitely upgrade now.
  387. =head2 Changes in DBD::ODBC 1.21_1 June 2, 2009
  388. Fixed bug referred to in rt 46597 reported by taioba and identified by
  389. Tim Bunce. In Calls to bind_param for a given statement handle if you
  390. specify a SQL type to bind as, this should be "sticky" for that
  391. parameter. That means if you do:
  392. $sth->bind_param(1, $param, DBI::SQL_LONGVARCHAR)
  393. and follow it up with execute calls that also specify the parameter:
  394. $sth->execute("a param");
  395. then the parameter should stick with the SQL_LONGVARCHAR type and not
  396. revert to the default parameter type. The DBI docs (from 1.609) make it
  397. clear the parameter type is sticky for the duration of the statement but
  398. some DBDs allow the parameter to be rebound with a different type -
  399. DBD::ODBC is one of those drivers.
  400. =head2 Changes in DBD::ODBC 1.21 April 27, 2009
  401. Change 02simple test to output Perl, DBI and DBD::ODBC versions.
  402. Fixed bug where if ODBC driver supports SQLDescribeParam and it succeeds
  403. for a parameterised query but you override the parameter type, DBD::ODBC
  404. was still using the size returned by SQLDescribeParam. Thanks to Brian
  405. Becker for finding, diagnosing and fixing this issue.
  406. Added FAQ entry about SQL Server and calling procedures with named
  407. parameters out of order.
  408. Added test_results.txt containing some supplied make test results.
  409. =head2 Changes in DBD::ODBC 1.20 April 20, 2009
  410. Fix bug in handling of SQL_WLONGVARCHAR when not built with unicode
  411. support. The column was not identified as a long column and hence the
  412. size of the column was not restricted to LongReadLen. Can cause
  413. DBD::ODBC to attempt to allocate a huge amount of memory.
  414. Minor changes to Makefile.PL to help diagnose how it decided which
  415. driver manager to use and where it was found.
  416. Offer suggestion to debian-based systems when some of unixODBC is found
  417. (the bin part) but the development part is missing.
  418. In 20SqlServer.t attempt to drop any procedures we created if they still
  419. exist at the end of the test. Reported by Michael Higgins.
  420. In 12blob.t separate code to delete test table into sub and call at
  421. being and end, handle failures from prepare there were two ENDs.
  422. In ODBCTEST.pm when no acceptable test column type is found output all
  423. the found types and BAIL_OUT the entire test.
  424. Skip rt_39841.t unless actually using the SQL Server ODBC driver or
  425. native client.
  426. Handle drivers which return 0 for SQL_MAX_COLUMN_NAME_LEN.
  427. Double the buffer size used for column names if built with unicode.
  428. =head2 Changes in DBD::ODBC 1.19 April 2, 2009
  429. Some minor diagnostic output during tests when running against freeTDS
  430. to show we know of issues in freeTDS.
  431. Fixed issue in 20SqlServer.t where the connection string got set with
  432. two consecutive semi-colons. Most drivers don't mind this but freeTDS
  433. ignores everything after that point in the connection string.
  434. Quieten some delete table output during tests.
  435. Handle connect failures in 20SqlServer.t in the multiple active
  436. statement tests.
  437. In 02simple.t cope with ODBC drivers or databases that do not need a
  438. username or password (MS Access).
  439. In 20SqlServer.t fix skip count and an erroneous assignment for
  440. driver_name.
  441. Change some if tests to Test::More->is tests in 02simple.t.
  442. Fix "invalid precision" error during tests with the new ACEODBC.DLL MS
  443. Access driver. Same workaround applied for the old MS Access driver
  444. (ODBCJT32.DLL) some time ago.
  445. Fix out of memory error during tests against the new MS Access driver
  446. (ACEODBC.DLL). The problem appears to be that the new Access driver
  447. reports ridiculously large parameter sizes for "select ?" queries and
  448. there are some of these in the unicode round trip test.
  449. Fixed minor typo in Makefile.PL - diagnostic message mentioned "ODBC
  450. HOME" instead of ODBCHOME.
  451. 12blob.t test somehow got lost from MANIFEST - replaced. Also changed
  452. algorithm to get a long char type column as some MS Access drivers only
  453. show SQL_WLONGVARCHAR type in unicode.
  454. Added diagnostic output to 02simple.t to show the state of
  455. odbc_has_unicode.
  456. =head2 Changes in DBD::ODBC 1.18_4 March 13, 2009
  457. A mistake in the MANIFEST lead to the rt_43384.t test being omitted.
  458. Brian Becker reported the tables PERL_DBD_39897 and PERL_DBD_TEST are
  459. left behind after testing. I've fixed the former but not the latter yet.
  460. Yet another variation on the changes for rt 43384. If the parameter is
  461. bound specifically as SQL_VARCHAR, you got invalid precision
  462. error. Thanks to Øystein Torget for finding this and helping me verify
  463. the fix.
  464. If you attempt to insert large amounts of data into MS Access (which
  465. does not have SQLDescribeParam) you can get an invalid precision error
  466. which can be worked around by setting the bind type to
  467. SQL_LONGVARCHAR. This version does that for you.
  468. 08bind2.t had a wrong skip count.
  469. 12blob.t had strict commented out and GetTypeInfo was not quoted. Also
  470. introduced a skip if the execute fails as it just leads to more obvious
  471. failures.
  472. In dbdimp.c/rebind_ph there was a specific workaround for SQL Server
  473. which was not done after testing if we are using SQL Server - this was
  474. breaking tests to MS Access.
  475. =head2 Changes in DBD::ODBC 1.18_2 March 9, 2009
  476. Added yet another workaround for the SQL Server Native Client driver
  477. version 2007.100.1600.22 and 2005.90.1399.00 (driver version 09.00.1399)
  478. which leads to HY104, "Invalid precision value" in the rt_39841.t test.
  479. =head2 Changes in DBD::ODBC 1.18_1 March 6, 2009
  480. Fixed bug reported by Toni Salomäki leading to a describe failed error
  481. when calling procedures with no results. Test cases added to
  482. 20SqlServer.t.
  483. Fixed bug rt 43384 reported by Øystein Torget where you cannot insert
  484. more than 127 characters into a Microsoft Access text(255) column when
  485. DBD::ODBC is built in unicode mode.
  486. =head2 Changes in DBD::ODBC 1.18 January 16, 2009
  487. Major release of all the 1.17 development releases below.
  488. =head2 Changes in DBD::ODBC 1.17_3 December 19, 2008
  489. Reinstated the answer in the FAQ for "Why do I get invalid value for
  490. cast specification" which had got lost - thanks to EvanCarroll in
  491. rt41663.
  492. rt 41713. Applied patch from JHF Remmelzwaal to handle ODBC drivers
  493. which do not support SQL_COLUMN_DISPLAY_SIZE and SQL_COLUMN_LENGTH
  494. attributes in the SQLColAttributes calls after SQLTables and
  495. SQLColumns. Specifically, the driver he was using was the "Infor
  496. Integration ODBC driver".
  497. Added notes from JHF Remmelzwaal on resolving some problems he came
  498. across building DBD::ODBC on Windows with Visual Studio 6.0 and SDK Feb
  499. 2003.
  500. New odbc_column_display_size attribute for when drivers does not return
  501. a display size.
  502. Loads of tracing changes to make it easier for me to debug problems.
  503. Fixed bug in tracing of dbd_execute when parameter is char but undef
  504. which was leading to an access violation on Windows when tracing
  505. enabled.
  506. Minor changes to diagnostic output in some rt tests.
  507. One of the rt tests was not skipping the correct number of tests if the
  508. driver was not SQL Server.
  509. =head2 Changes in DBD::ODBC 1.17_2 November 17, 2008
  510. Changed ParamTypes attribute to be as specification i.e.,
  511. {
  512. parameter_1 => {TYPE => sql_type}
  513. parameter_2 => {TYPE => sql_type}
  514. ...
  515. }
  516. and changed the tests in 07bind.t to reflect this.
  517. A few minor perlcritic changes to ODBC.pm.
  518. Added 99_yaml.t test to check META.yml.
  519. Added patch from Spicy Jack to workaround problems with Strawberry Perl
  520. setting INC on the command line when running Makefile.PL.
  521. =head2 Changes in DBD::ODBC 1.17_1 October 10, 2008
  522. Missing newline from end of META.yml upsets cpan
  523. Add code to Makefile.PL to spot command line containing INC, outline
  524. problem and resolution and not generate Makefile to avoid cpan-testers
  525. failures.
  526. Loads of pod formatting changes including a section in the wrong place
  527. New kwalitee test
  528. Fix rt 39841. Bug in SQL Server ODBC driver which describes parameters
  529. by rearranging your SQL to do a select on the columns matching the
  530. parameters. Sometimes it gets this wrong and ends up describing the
  531. wrong column. This can lead to a varchar(10) being described with a
  532. column-size less than 10 and hence you get data truncation on execute.
  533. Added a test case for rt 39841.
  534. Fix rt 39897. 1.17 added support for varchar(max) in SQL Server but it
  535. broke support for SQL_VARCHAR columns in that they had LongReadLen and
  536. LongTruncOk applied to them. This means that in 1.16 you could retrieve
  537. a SQL_VARCHAR column without worrying about how long it was but in 1.17
  538. if the same column was greater than 80 characters then you would get a
  539. truncated error. The only way the around this was to set LongTruncOk or
  540. LongReadLen.
  541. Added a test case for rt 39897.
  542. =head2 Changes in DBD::ODBC 1.17 September 22, 2008
  543. In the absence of any bug reports since 1.16_4 this is the official 1.17
  544. release. See below for changes since 1.16.
  545. Minor pod changes.
  546. Added support for ParamTypes (see DBI spec) and notes in DBD::ODBC pod.
  547. =head2 Changes in DBD::ODBC 1.16_4 September 12, 2008
  548. Small change to Makefile.PL to work around problem in darwin 8 with
  549. iODBC which leads to "Symbol not found: _SQLGetPrivateProfileString"
  550. errors.
  551. Added new [n]varXXX(max) column type tests to 20SqlServer.t.
  552. Fixed support for SQL_WCHAR and SQL_WVARCHAR support in non-unicode
  553. build. These types had ended up only being included for unicode builds.
  554. More changes to ODBC pod to 1) encourage people to use CPAN::Reporter,
  555. 2) rework contributing section, 3) mention DBIx::Log4perl 4) add a BUGS
  556. section 5) add a "ODBC Support in ODBC Drivers" section etc.
  557. Changed default fallback parameter bind type to SQL_WVARCHAR for unicode
  558. builds. This affects ODBC drivers which don't have
  559. SQLDescribeParam. Problem reported by Vasili Galka with MS Access when
  560. reading unicode data from one table and inserting it into another table.
  561. The read data was unicode but it was inserted as SQL_CHARs because
  562. SQLDescribeParam does not exist in MS Access so we fallback to either a
  563. default bind type (which was SQL_VARCHAR) or whatever was specified in
  564. the bind_param call.
  565. Fixed bug in 20SqlServer.t when DBI_DSN is defined including "DSN=".
  566. =head2 Changes in DBD::ODBC 1.16_3 September 3, 2008
  567. Changed Makefile.PL to add "-framework CoreFoundation" to linker line on
  568. OSX/darwin.
  569. Disallow building with iODBC if it is a unicode build.
  570. More tracing for odbcconnect flag.
  571. Fix bug in out connection string handling that attempted to use an out
  572. connection string when SQLDriverConnect[W] fails.
  573. Fixed yet more test count problems due to Test::NoWarnings not being
  574. installed.
  575. Skip private_attribute_info tests if DBI < 1.54
  576. About a 30% rewrite of bound parameter code which started with an
  577. attempt to support the new VARBINARY(MAX) and VARCHAR(MAX) columns in
  578. SQL Server when the parameter length is > 400K in size (see elsewhere in
  579. this Changelog). This is a seriously big change to DBD::ODBC to attempt
  580. to be a bit more clever in its handling of drivers which either do not
  581. support SQLDescribeParam or do support SQLDescribeParam but cannot
  582. describe all parameters e.g., MS SQL Server ODBC driver cannot describe
  583. "select ?, LEN(?)". If you specify the bound parameter type in your
  584. calls to bind_param and run them to an ODBC driver which supports
  585. SQLDescribeParam you may want to check carefully and probably remove the
  586. parameter type from the bind_param method call.
  587. Added rt_38977.t test to test suite to test varchar(max) and
  588. varbinary(max) columns in SQL Server.
  589. Moved most of README.unicode to ODBC.pm pod.
  590. Added workaround for problem with the Microsoft SQL Server driver when
  591. attempting to insert more than 400K into a varbinary(max) or
  592. varchar(max) column. Thanks to Julian Lishev for finding the problem and
  593. identifying 2 possible solutions.
  594. =head2 Changes in DBD::ODBC 1.16_2 September 2, 2008
  595. Removed szDummyBuffer field from imp_fbh_st and code in dbd_describe
  596. which clears it. It was never used so this was a waste of time.
  597. Changed the remaining calls to SQLAllocEnv, SQLAllocConnect and
  598. SQLAllocStmt and their respective free calls to the ODBC 3.0
  599. SQLAllocHandle and SQLFreeHandle equivalents.
  600. Rewrote ColAttributes code to understand string and numeric attributes
  601. rather than trying to guess by what the driver returns. If you see any
  602. change in behaviour in ColAttributes calls you'll have to let me know as
  603. there were a number of undocumented workarounds for drivers.
  604. Unicode build of DBD::ODBC now supports:
  605. column names
  606. The retrieval of unicode column names
  607. SQL strings
  608. Unicode in prepare strings (but not unicode parameter names) e.g.,
  609. select unicode_column from unicode_table
  610. is fine but
  611. select * from table where column = :unicode_param_name
  612. is not so stick to ascii parameter names if you use named
  613. parameters.
  614. Unicode SQL strings passed to the do method are supported.
  615. SQL strings passed to DBD::ODBC when the odbc_exec_direct attribute
  616. is set will not be passed as unicode strings - this is a
  617. limitation of the odbc_exec_direct attribute.
  618. connection strings
  619. True unicode connection string support will require a new version of
  620. DBI (post 1.607).
  621. Note that even though unicode connection strings are not
  622. supported currently DBD::ODBC has had to be changed to call
  623. SQLDriverConnectW/SQLConnectW to indicate to the driver manager it's
  624. intention to use some of the ODBC wide APIs. This only affects
  625. DBD::ODBC when built for unicode.
  626. odbcunicode trace flag
  627. There is a new odbcunicode trace flag to enable unicode-specific
  628. tracing.
  629. Skipped 40Unicode.t test if the ODBC driver is Oracle's ODBC as I cannot
  630. make it work.
  631. Changes internally to use sv_utf8_decode (where defined) instead of
  632. setting utf8 flag.
  633. Fix problems in the test when Test::NoWarnings is not installed.
  634. Removed some unused variables that were leading to compiler warnings.
  635. Changed a lot of tracing to use new odbcconnection flag
  636. Changed to use dbd_db_login6_sv if DBI supports it.
  637. Commented out a diag in 20SqlServer.t that was leading to confusion.
  638. Added diag to 20SqlServer.t in mars test to explain why it may fail.
  639. Various pod changes for clarification and to note odbc_err_handler is
  640. deprecated.
  641. Removed odbcdev trace flag - it was not really used.
  642. New odbc_out_connect_string attribute for connections which returns the
  643. ODBC driver out connection string.
  644. =head2 Changes in DBD::ODBC 1.16_1 August 28, 2008
  645. Fixed bug in odbc_cancel which was checking the ACTIVE flag was on
  646. before calling SQLCancel. Non-select statements can also be cancelled so
  647. this was wrong. Thanks to Dean Arnold for spotting.
  648. Minor changes to test 01base to attempt to catch install_driver failing,
  649. report it as a fail and skip other tests.
  650. Fixed bug reported by James K. Lowden with asynchronous mode and
  651. SQLParamData where the code was not expecting SQL_STILL_EXECUTING and
  652. did not handle it
  653. Added odbc_putdata_start attribute to determine when to start using
  654. SQLPutData on lobs.
  655. Fixed bug in lob inserts where decimal_digits was being set to the size
  656. of the bound lob unnecessarily.
  657. Minor change to connect/login code to delete driver-specific attributes
  658. passed to connect so they do not have to be processed again when DBI
  659. calls STORE with them.
  660. New 12blob.t test.
  661. A lot of code tidy up but not expecting any real benefit or detriment
  662. when using DBD::ODBC.
  663. Fixed retrieving [n]varchar(max) columns which were only returning 1
  664. byte - thanks to Fumiaki Yoshimatsu and perl monks for finding it. See
  665. http://markmail.org/message/fiym5r7q22oqlzsf#query:Fumiaki Yoshimatsu
  666. odbc+page:1+mid:fiym5r7q22oqlzsf+state:results
  667. Various minor changes to get the CPANTS kwalitee score up.
  668. fixed pod issues in FAQ.pm
  669. moved mytest dir to examples
  670. added generated_by and requires perl version to META.yml
  671. added pod and pod-coverage tests
  672. removed executable flag from Makefile.PL
  673. added use warnings to some modules and tests
  674. fixed pod errors in ODBC.pm
  675. added AUTHOR and LICENSE section to ODBC.pm
  676. added Test::NoWarnings to tests
  677. Added support for setting the new(ish) DBI ReadOnly attribute on a
  678. connection. See notes in pod.
  679. Changes to test suite to work around problems in Oracle's instant client
  680. 11r1 ODBC driver for Linux (SQLColAttributes problems - see 02simple.t).
  681. New tests in 30Oracle.t for oracle procedures.
  682. =head2 Changes in DBD::ODBC 1.16 May 13, 2008
  683. =head3 Test Changes
  684. Small change to the last test in 10handler.t to cope with the prepare
  685. failing instead of the execute failing - spotted by Andrei Kovalevski
  686. with the ODBCng Postgres driver.
  687. Changed the 20SqlServer.t test to specifically disable MARS for the test
  688. to check multiple active statements and added a new test to check that
  689. when MARS_Connection is enabled multiple active statements are allowed.
  690. Changed the 09multi.t test to use ; as a SQL statement seperator instead
  691. of a newline.
  692. A few minor "use of unitialised" fixes in tests when a test fails.
  693. In 02simple.t Output DBMS_NAME/VER, DRIVER_NAME/VER as useful debugging
  694. aid when cpan testers report a fail.
  695. 2 new tests for odbc_query_timeout added to 03dbatt.t.
  696. Changed 02simple.t test which did not work for Oracle due to a "select
  697. 1" in the test. Test changed to do "select 1 from dual" for Oracle.
  698. New tests for numbered and named placeholders.
  699. =head3 Documentation Changes
  700. Added references to DBD::ODBC ohloh listing and markmail archives.
  701. Added Tracing sections.
  702. Added "Deviations from the DBI specification" section.
  703. Moved the FAQ entries from ODBC.pm to new FAQ document. You can view the
  704. FAQ with perldoc DBD::ODBC::FAQ.
  705. Added provisional README.windows document.
  706. Rewrote pod for odbc_query_timeout.
  707. Added a README.osx.
  708. =head3 Internal Changes
  709. More tracing in dbdimp.c for named parameters.
  710. #ifdeffed out odbc_get_primary_keys in dbdimp.c as it is no longer used.
  711. $h->func($catalog, $schema, $table, 'GetPrimaryKeys') ends up in
  712. dbdimp.c/dbd_st_primary_keys now.
  713. Reformatted dbdimp.c to avoid going over 80 columns.
  714. Tracing changed. Levels reviewed and changed in many cases avoiding
  715. levels 1 and 2 which are reserved for DBI. Now using DBIc_TRACE macro
  716. internally. Also tracing SQL when 'SQL' flag set.
  717. =head3 Build Changes
  718. Changes to Makefile.PL to fix a newly introduced bug with 'tr', remove
  719. easysoft OOB detection and to try and use odbc_config and odbcinst if we
  720. find them to aid automatic configuration. This latter change also adds
  721. "odbc_config --cflags" to the CC line when building DBD::ODBC.
  722. Avoid warning when testing ExtUtils::MakeMaker version and it is a test
  723. release with an underscore in the version.
  724. =head3 Functionality Changes
  725. Added support for parse_trace_flag and parse_trace_flags methods and
  726. defined a DBD::ODBC private flag 'odbcdev' as a test case.
  727. Add support for the 'SQL' trace type. Added private trace type odbcdev
  728. as an experimental start.
  729. Change odbc_query_timeout attribute handling so if it is set to 0 after
  730. having set it to a non-zero value the default of no time out is
  731. restored.
  732. Added support for DBI's statistics_info method.
  733. =head3 Bug Fixes
  734. Fix bug in support for named placeholders leading to error "Can't rebind
  735. placeholder" when there is more than one named placeholder.
  736. Guard against scripts attempting to use a named placeholder more than
  737. once in a single SQL statement.
  738. If you called some methods after disconnecting (e.g., prepare/do and any
  739. of the DBD::ODBC specific methods via "func") then no error was
  740. generated.
  741. Fixed issue with use of true/false as fields names in structure on MAC
  742. OS X 10.5 (Leopard) thanks to Hayden Stainsby.
  743. Remove tracing of bound wide characters as it relies on null-terminated
  744. strings that don't exist.
  745. Fix issue causing a problem with repeatedly executing a stored procedure
  746. which returns no result-set. SQLMoreResults was only called on the first
  747. execute and some drivers (SQL Server) insist a procedure is not finished
  748. until SQLMoreResults returns SQL_NO_DATA.
  749. =head2 Changes in DBD::ODBC 1.15 January 29, 2008
  750. 1.15 final release.
  751. Fixed bug reported by Toni Salomaki where DBD::ODBC may call
  752. SQLNumResultCols after SQLMoreResults returns SQL_NO_DATA. It led to the
  753. error:
  754. Describe failed during DBI::st=HASH(0x19c2048)->FETCH(NUM_OF_FIELDS,0)
  755. when NUM_OF_FIELDS was referenced in the Perl script.
  756. Updated odbc_exec_direct documentation to describe its requirement when
  757. creating temporary objects in SQL Server.
  758. Added FAQ on SQL Server temporary tables.
  759. Fixed bug in dbdimp.c which was using SQL_WCHAR without testing it was
  760. defined - thanks Jergen Dutch.
  761. Fixed use of "our" in UCHelp.pm which fails on older Perls.
  762. Minor changes to 02simple.t and 03dbatt.t to fix diagnostics output and
  763. help debug DBD which does not handle long data properly.
  764. Further changes to Makefile.PL to avoid change in behavior of
  765. ExtUtils::MakeMaker wrt order of execution of PREREQ_PM and CONFIGURE.
  766. Now if DBI::DBD is not installed we just warn and exit 0 to avoid a
  767. cpan-testers failure.
  768. =head2 Changes in DBD::ODBC 1.15_2 November 14, 2007
  769. Fix bug in DBD::ODBC's private function data_sources which was returning
  770. data sources prefixed with "DBI:ODBC" instead of "dbi:ODBC".
  771. If you don't have at least DBI 1.21 it is now a fatal error instead of
  772. just a warning.
  773. DBI->connect changed so informational diagnostics like "Changed database
  774. context to 'master'" from SQL Server are available in
  775. errstr/state. These don't cause DBI->connect to die but you can test
  776. $h->err eq "" after connect and obtain the informational diagnostics
  777. from errstr/state if you want them.
  778. Fixed problem in 41Unicode.t where utf8 was used before testing we had a
  779. recent enough Perl - thank you cpan testers.
  780. Changed "our" back to "my" in Makefile.PL - thank you cpan testers.
  781. Removed all calls to DBIh_EVENT2 in dbdimp.c as it is no longer used
  782. (see posts on dbi-dev).
  783. Changed text output when a driver manager is not found to stop referring
  784. to iodbcsrc which is no longer included with DBD::ODBC.
  785. Changed Makefile.PL to attempt to find unixODBC if -o or ODBCHOME not
  786. specified.
  787. Updated META.yml based on new 1.2 spec.
  788. Changed Makefile.PL so if an ODBC driver manager is not found then we
  789. issue warning and exit cleanly but not generating a Makefile. This
  790. should stop cpan-testers from flagging a fail because they haven't got
  791. an ODBC driver manager.
  792. Changed Makefile.PL so it no longer "use"s DBI/DBI::DBD because this
  793. makes cpan-testers log a fail if DBI is not installed. Changed to put
  794. the DBI::DBD use in the CONFIGURE sub so PREREQ_PM will filter out
  795. machines where DBI is not installed.
  796. Fix a possible typo, used once in 10handler.t.
  797. =head2 Changes in DBD::ODBC 1.15_1 November 6, 2007
  798. Minor changes to 20SqlServer.t test for SQL Server 2008 (Katmai).
  799. Timestamps now return an extra 4 digits of precision (all 0000) and the
  800. driver reported in dbcc messages has a '.' in the version which was not
  801. handled.
  802. New FAQ entry and test code for "Datetime field overflow" problem in
  803. Oracle.
  804. Changed all ODBC code to use new SQLLEN/SQLULEN types where Microsoft's
  805. headers indicate, principally so DBD::ODBC builds and works on
  806. win64. NOTE: you will need an ODBC Driver Manager on UNIX which knows
  807. SQLLEN/SQLULEN types. The unixODBC driver manager uses SQLLEN/SQLULEN in
  808. versions from at least 2.2.12. Thanks to Nelson Oliveira for finding,
  809. patching and testing this and then fixing problems with bound parameters
  810. on 64 bit Windows.
  811. Added private_attribute_info method DBI introduced (see DBI docs) and
  812. test cases to 02simple.t.
  813. Fairly major changes to dbd_describe in dbdimp.c to reduce ODBC calls by
  814. 1 SQLDescribeCol call per column when describing result sets. Instead of
  815. calculating the amount of memory required to hold every column name we
  816. work on the basis that (num_columns + 1) * SQL_MAX_COLUMN_NAME_LEN can
  817. hold all column names. However, to avoid using a large amount of memory
  818. unnecessarily if an ODBC driver supports massive column name lengths the
  819. maximum size per column is restricted to 256.
  820. Changed to avoid using explicit use of DBIc_ERRXXX in favour of newish
  821. (ok, DBD::ODBC is a bit behind the times in this respect)
  822. DBIh_SET_ERR_CHAR. This involved a reworking or the error handling and
  823. although all test cases still pass I cannot guarantee it has no other
  824. effects - please let me know if you spot differences in error messages.
  825. Fixed bug in 20SqlServer test for multiple results that was passing but
  826. for the wrong reason (namely, that the odbc_err_handler was being called
  827. when it should not have been).
  828. Fixed bug in odbc_err_handler that prevented it from being reset so you
  829. don't have an error handler. Looks like the problem was in
  830. dbd_db_STORE_attrib where "if(valuesv == &PL_sv_undef)" was used to
  831. detect undef and I think it should be "if (!SvOK(valuesv))".
  832. Improvements to odbc_err_handler documentation.
  833. Added 10handler.t test cases.
  834. More tests in 02simple.t to check NUM_OF_FIELDS and NAMES_uc.
  835. Bit of a tidy up:
  836. Removed some unused variable declarations from dbdimp.c.
  837. Lots of changes to DBD::ODBC tracing, particularly in dbd_describe, and
  838. dbd_error2 and login6.
  839. Removed a lot of tracing code in comments or #if 0 as it never gets
  840. built.
  841. Changed dual tests on SQL_SUCCESS and SQL_SUCCESS_WITH_INFO to use
  842. SQL_SUCCEEDED.
  843. =head2 Changes in DBD::ODBC 1.14 July 17, 2007
  844. Fix bug reported where ping crashes after disconnect thanks to Steffen
  845. Goeldner.
  846. Fix bug in dbd_bind_ph which leads to the error Can't change param 1
  847. maxlen (51->50) after first bind in the 20SqlServer test. This is caused
  848. by svGROW in Perl 5.8.8 being changed to possibly grow by more than you
  849. asked (e.g. up to the next longword boundary).
  850. Fix problem with binding undef as an output parameter. Reported by
  851. Stephen More with IBM's ODBC driver for iSeries.
  852. Removed comment delimiters in comments in dbdimp.h leading to warnings.
  853. Removed some unused variable declarations leading to warnings.
  854. Removed PerlIO_flush calls as it is believed they are not required.
  855. Add logging for whether SQLDescribeParam is supported.
  856. Fixed use of unitialised variable in dbd_bind_ph where an undef is bound
  857. and tracing is enabled.
  858. Fixed issue with TRACESTATUS change in 20SqlServer.t tests 28, 31, 32
  859. and 33 leading to those tests failing when testing with SQL Server 2005
  860. or Express.
  861. Many compiler warnings fixed - especially for incompatible types.
  862. Add provisional Unicode support - thanks to Alexander Foken. This change
  863. is very experimental (especially on UNIX). Please see ODBC.pm
  864. documentation. Also see README.unicode and README.af. New database
  865. attribute odbc_has_unicode to test if DBD::ODBC was built with UNICODE
  866. support. New tests for Unicode. New requirement for Perl 5.8.1 if
  867. Unicode support required. New -[no]u argument to Makefile.PL. New
  868. warning in Makefile.PL if Unicode support built for UNIX.
  869. Fix use of unitialised var in Makefile.PL.
  870. Fix use of scalar with no effect on Makefile.PL
  871. Added warning to Makefile.PL about building/running with LANG using
  872. UTF8.
  873. Added warning to Makefile.PL about using thread-safe ODBC drivers.
  874. Updated MANIFEST to include more test code from mytest and remove
  875. MANIFEST.SKIP etc.
  876. Removed calls to get ODBC errors when SQLMoreResults returns
  877. SQL_NO_DATA. These are a waste of time since SQL_NO_DATA is expected
  878. and there is no error diagnostic to retrieve.
  879. Changes to test 17 of 02simple.t which got "not ok 17 - Col count
  880. matches correct col count" errors with some Postgres ODBC
  881. drivers. Caused by test expecting column names to come back
  882. uppercase. Fixes by uppercasing returned column names.
  883. Changes to tests in 03batt.t which correctly expects an ODBC 3 driver to
  884. return the column names in SQLTables result-set as per ODBC 3.0
  885. spec. Postgres which reports itself as an ODBC 3.0 driver seems to
  886. return the ODBC 2 defined column names. Changed tests to catch ODBC 2.0
  887. names are pass test put issue warning.
  888. For postgres skip test (with warning) checking $sth->{NAME} returns
  889. empty listafter execute on update
  890. Updated FAQ, added a few more questions etc.
  891. DBD::ODBC requires at least 5.6.0 of Perl.
  892. Many updates to pod documentation.
  893. Removed some dead HTTP links in the pod I could not find equivalents for
  894. - let me know if you have working replacements for ones removed
  895. Add some HTTP links to useful tutorials on DBD::ODBC
  896. =head2 Changes in DBD::ODBC 1.13 November 8, 2004
  897. Fix inconsistency/bug with odbc_exec_direct vs. odbc_execdirect
  898. settings. Now made consistent with odbc_exec_direct. For now, will
  899. still look for odbc_execdirect in prepare, but not as DBH attribute as a
  900. backup (which is what it was doing), but that support will be dropped at
  901. some time in the future. Please use odbc_exec_direct from now on...
  902. Fix handling of print statements for SQL Server thanks to Martin Evans!
  903. Thanks for all your work on this!
  904. Due to bug in SQL Server, you must use odbc_exec_direct. See
  905. t/20SqlServer.t for example. You will need to call
  906. $sth->{odbc_more_results} to clear out any trailing messages.
  907. Change tests to use Test::More. Whew, that's much nicer!
  908. Fix Oracle integral/numeric output params so that warning not printed
  909. about value not being numeric (even though it is!)
  910. =head2 Changes in DBD::ODBC 1.12 October 26, 2004
  911. Fix bug with odbc_execdirect attributed thanks to Martin Evans
  912. Fix bug(s) with odbc_query_timeout and tested with SQL*Server. Oracle
  913. tests failed with setting timeout. Probably not handled by Oracle's
  914. ODBC driver
  915. =head2 Changes in DBD::ODBC 1.11 October 11, 2004
  916. Added odbc_timeout, but untested
  917. =head2 Changes in DBD::ODBC 1.10 September 8, 2004
  918. Fixed bug in Makefile.PL.
  919. Added pod.t test, taken from DBI.
  920. Fixed various small POD issues, discovered during the pod test.
  921. Fixed bug in bind_param_inout
  922. =head2 Changes in DBD::ODBC 1.09 March 10, 2004
  923. Duh. I forgot to add new dbivport.h to MANIFEST and SVN before
  924. submitting. Fixed.
  925. =head2 Changes in DBD::ODBC 1.08 March 6, 2004
  926. Added check in Makefile.PL to detect if the environment variable LANG is
  927. Set. If so, prints a warning about potential makefile generation
  928. issues.
  929. Change to use dbivport.h per new DBI spec.
  930. Add ability to set the cursor type during the connect. This may allow
  931. some servers which do not support multiple concurrent statements to
  932. permit them -- tested with SQL Server. Thanks to Martin Busik! See
  933. odbc_cursortype information in the ODBC POD.
  934. =head2 Changes in DBD::ODBC 1.07 February 19, 2004
  935. Added to Subversion version control hosted by perl.org. Thanks Robert!
  936. See ODBC.pm POD for more information.
  937. Added contributing section to ODBC.pm POD -- see more details there!
  938. Added parameter to odbc_errhandler for the NativeError -- thanks to
  939. Martin Busik.
  940. Fix for Makefile.PL not having tab in front of $(NOOP) (Finally).
  941. Fix for SQLForeignKeys thanks to Kevin Shepherd.
  942. =head2 Changes in DBD::ODBC 1.06 June 19, 2003
  943. Fixed test in t/02simple.t to skip if the DSN defined by the user has
  944. DSN= in it.
  945. Added tests for wrong DSN, ensuring the DBI::errstr is appropriately
  946. set.
  947. Fixed small issue in Makefile.PL for Unix systems thanks to H.Merijn
  948. Brand.
  949. Update to NOT copy user id and password to connect string if UID or PWD
  950. parameter in connect string.
  951. Updated Makefile.PL for dmake, per patch by Steffen Goldner. Thanks
  952. Steffen!
  953. =head2 Changes in DBD::ODBC 1.05 March 14, 2003
  954. Cleaned up Makefile.PL and added Informix support thanks to Jonathan
  955. Leffler (see README.informix)
  956. Added nicer error message when attempting to do anything while the
  957. database is disconnected.
  958. Fixed fetchrow_hashref('NAME_uc | NAME_lc') with odbc_more_results.
  959. Added exporter to allow perl -MDBD::ODBC=9999 command line to determine
  960. version
  961. Fixed for building with DBI 1.33 and greater
  962. Removed all C++ style comments
  963. Ensured files are in Unix format, with the exception of the README type
  964. information and Makefile.PL
  965. =head2 Changes in DBD::ODBC 1.04 January 24, 2003
  966. It seems that case insensitive string comparison with a limit causes
  967. problems for multiple platforms. strncmpi, strncasecmp, _strcmpin are
  968. all functions hit and it seems to be a hit-or-miss. Hence, I rewrote it
  969. to upper case the string then do strncmp, which should be safe...sheesh.
  970. A simple thing turned into a headache...
  971. =head2 Changes in DBD::ODBC 1.03 January 17, 2003
  972. Add automatic detection of DRIVER= or DSN= to add user id and password
  973. to connect string.
  974. =head2 Changes in DBD::ODBC 1.02 January 6, 2003
  975. Fix to call finish() automatically if execute is re-called in a loop
  976. (and test in t/02simple.t to ensure it's fixed)
  977. Augmented error message when longs are truncated to help users determine
  978. where to look for help.
  979. Fixes for build under Win32 with Perl5.8.
  980. =head2 Changes in DBD::ODBC 1.01 December 9, 2002
  981. Forgot to fix require DBI 1.201 in ODBC.pm to work for perl 5.8. Fixed
  982. =head2 Changes in DBD::ODBC 1.00 December 8, 2002
  983. (Please see all changes since version 0.43)
  984. Updated Makefile.PL to handle SQL_Wxxx types correctly with unixODBC and
  985. linking directly with EasySoft OOB. Note that I could not find where
  986. iODBC defines SQL_WLONG_VARCHAR, so I'm not sure it's fixed on all other
  987. platforms. Should not have been a problem under Win32...
  988. Found that the fix in _18 was only enabled if debug enabled and it broke
  989. something else. removed the fix.
  990. Updated Makefile.PL to use DBI version 1.21 instead of 1.201 to
  991. facilitate builds under latest development versions of Perl.
  992. Updated code to use the *greater* of the column display size and the
  993. column length for allocating column buffers. This *should* workaround a
  994. problem with DBD::ODBC and the Universe database.
  995. Added code thanks to Michael Riber to handle SQLExecDirect instead of
  996. SQLPrepare. There are two ways to get this:
  997. $dbh->prepare($sql, { odbc_execdirect => 1});
  998. and
  999. $dbh->{odbc_execdirect} = 1;
  1000. When $dbh->prepare() is called with the attribute "ExecDirect" set to a
  1001. non-zero value dbd_st_prepare do NOT call SQLPrepare, but set the sth
  1002. flag odbc_exec_direct to 1.
  1003. Fixed numeric value binding when binding non-integral values. Now lets
  1004. the driver or the database handle the conversion.
  1005. Fixed makefile.pl generation of makefile to force the ODBC directory
  1006. first in the include list to help those installing ODBC driver managers
  1007. on systems which already have ODBC drivers in their standard include
  1008. path.
  1009. =head2 Changes in DBD::ODBC 0.45_18 September 26, 2002
  1010. Updated MANIFEST to include more of the mytest/* files (examples, tests)
  1011. Fixed problem when attempting to get NUM_OF_FIELDS after execute returns
  1012. no rows/columns.
  1013. =head2 Changes in DBD::ODBC 0.45_17 August 26, 2002
  1014. More fixes for multiple result sets. Needed to clear the DBIc_FIELDS_AV
  1015. when re-executing the multiple-result set stored procedure/query.
  1016. =head2 Changes in DBD::ODBC 0.45_16 August 26, 2002
  1017. Updated to fix output parameters with multiple result sets. The output
  1018. parameters are not set until the last result set has been retrieved.
  1019. =head2 Changes in DBD::ODBC 0.45_15 August 20, 2002
  1020. Updated for new DBIc_STATE macros (all debug, as it turned out) to be
  1021. thread safer in the long run
  1022. Updated for the new DBIc_LOGFP macros
  1023. Added CLONE method
  1024. Fix for SQL Server where multiple result sets being returned from a
  1025. stored proc, where one of the result sets was empty (insert/update).
  1026. Added new attribute odbc_force_rebind, which forces DBD::ODBC to check
  1027. recheck for new result sets every execute. This is only really
  1028. necessary if you have a stored procedure which returns different result
  1029. sets with each execute, given the same "prepare". Many times this will
  1030. be automatically set by DBD::ODBC, however, if there is only one result
  1031. set in the stored proc, but it can differ with each call, then DBD::ODBC
  1032. will not know to set it.
  1033. Updated the DBD::ODBC POD documentation to document DBD::ODBC private
  1034. attributes and usage.
  1035. =head2 Changes in DBD::ODBC 0.45_14 August 13, 2002
  1036. Added support to handle (better) DBI begin_work().
  1037. Fix for binding undef parameters on SQL Server.
  1038. Fix bug when connecting twice in the same script. Trying to set the
  1039. environment ODBC version twice against the same henv caused an error.
  1040. =head2 Changes in DBD::ODBC 0.45_13 August 9, 2002
  1041. Workaround problem with iODBC where SQLAllocHandleStd is not present in
  1042. iODBC.
  1043. Made Changes file accessible via perldoc DBD::ODBC::Changes. In the
  1044. near future the change log will be removed from here and put in changes
  1045. to tidy up a bit.
  1046. =head2 Changes in DBD::ODBC 0.45_12 August 9, 2002
  1047. Fixed global destruction access violation (which was seemingly random).
  1048. =head2 Changes in DBD::ODBC 0.45_11 August 8, 2002
  1049. Updated manifest to include more samples.
  1050. Working on checking for leaks on Linux, where I might get more
  1051. information about the process memory.
  1052. Working on fixing problems with MS SQL Server binding parameters. It
  1053. seems that SQLServer gets "confused" if you bind a NULL first. In
  1054. "older" (SQLServer 2000 initial release) versions of the driver, it
  1055. would truncate char fields. In "newer" versions of the SQL Server
  1056. driver, it seems to only truncate dates (actually, round them to the
  1057. nearest minute). If you have problems in the SQL Server tests, please
  1058. upgrade your driver to the latest version on Microsoft's website (MDAC
  1059. 2.7 or above) http://www.microsoft.com/data
  1060. =head2 Changes in DBD::ODBC 0.45_10 July 30, 2002
  1061. Added database specific tests to ensure things are working. Some of the
  1062. tests may not work for all people or may not be desirable. I have tried
  1063. to keep them as safe as possible, but if they don't work, please let me
  1064. know.
  1065. Added support for the internal function GetFunctions to handle ODBC 3's
  1066. SQL_API_ODBC3_ALL_FUNCTIONS. Would have caused a memory overwrite on
  1067. the stack if it was called.
  1068. =head2 Changes in DBD::ODBC 0.45_9 July 30, 2002
  1069. Fixed bug in procedure handling for SQLServer. Was not re-describing
  1070. the result sets if the SQLMoreResults in the execute needs to be called.
  1071. =head2 Changes in DBD::ODBC 0.45_8 July 25, 2002
  1072. Fixed bug in tracing code when binding an undef parameter which did not
  1073. happen to have a valid buffer with tracing level >= 2
  1074. Fixed bug when binding undef after a valid data bind on a timestamp.
  1075. The Scale value was being calculated based upon the string that had been
  1076. bound prior to the bind of the undef and if that had a sub-second value,
  1077. then the scale would be set to the wrong value...I.e.
  1078. bind_param(1, '2000-05-17 00:01:00.250', SQL_TYPE_TIMESTAMP) then
  1079. execute
  1080. bind_param(1, undef, SQL_TYPE_TIMESTAMP) then
  1081. Fixed SQL Server issue when binding a null and the length was set to 0
  1082. instead of 1
  1083. =head2 Changes in DBD::ODBC 0.45_7 July 25, 2002
  1084. Adding support for array binding, but not finished.
  1085. Fixed bug where SqlServer Stored procedures which perform INSERT would
  1086. not correctly return a result set. Thanks to Joe Tebelskis for finding
  1087. it and Martin Evans for supplying a fix.
  1088. Fixed bug where binding the empty string would cuase a problem. Fixed
  1089. and added test in t/07bind.t.
  1090. =head2 Changes in DBD::ODBC 0.45_6 July 24, 2002
  1091. Added support for new DBI ParamValues feature.
  1092. =head2 Changes in DBD::ODBC 0.45_5 July 23, 2002
  1093. Added odbc_err_handler and odbc_async_exec thanks to patches by David
  1094. L. Good. See example in mytest/testerrhandler.pl
  1095. Here's the notes about it:
  1096. I've implemented two separate functions. The first is an "error
  1097. handler" similar to that in DBD::Sybase. The error handler can be
  1098. used to intercept error and status messages from the server. It is
  1099. the only way (at least currently) that you can retrieve non-error
  1100. status messages when execution is successful.
  1101. To use the error handler, set the "odbc_err_handler" attribute on your
  1102. database handle to a reference to a subroutine that will act as the
  1103. error handler. This subroutine will be passed two args, the SQLSTATE
  1104. and the error message. If the subroutine returns 0, the error message
  1105. will be otherwise ignored. If it returns non-zero, the error message
  1106. will be processed normally.
  1107. The second function implemented is asynchronous execution. It's only
  1108. useful for retrieving server messages with an error handler during an
  1109. execute() that takes a long time (such as a DBCC on a large database)
  1110. ODBC doesn't have the concept of a callback routine like Sybase's
  1111. DBlib/CTlib does, so asynchronous execution is needed to be able to
  1112. get the server messages before the SQL statement is done processing.
  1113. To use asynchronous execution, set the "odbc_async_exec" attribute on
  1114. your database handle to 1. Not all ODBC drivers support asynchronous
  1115. execution. To see if yours does, set odbc_async_exec to 1 and then
  1116. check it's value. If the value is 1, your ODBC driver can do
  1117. asynchronous execution. If the value is 0, your ODBC driver cannot.
  1118. =head2 Changes in DBD::ODBC 0.45_4 July 22, 2002
  1119. More fixes for DB2 tests and timestamp handling.
  1120. =head2 Changes in DBD::ODBC 0.45_3 July 22, 2002
  1121. Changes to internal timestamp type handling and test structure to ensure
  1122. tests work for all platforms. DB2 was giving me fits due to bad
  1123. assumptions. Thanks to Martin Evans (again) for help in identifying the
  1124. problems and helping research solutions. This includes the
  1125. scale/precision values to correctly store full timestamps.
  1126. =head2 Changes in DBD::ODBC 0.45_2 July 19, 2002
  1127. Moving API usage to ODBC 3.0 specifications. With lots of help from
  1128. Martin Evans (again!). Thanks Martin!!!!!
  1129. =head2 Changes in DBD::ODBC 0.44 July 18, 2002
  1130. .44 was never officially released.
  1131. Fix for do() and execute to handle DB2 correctly. Patch/discovery
  1132. thanks to Martin Evans.
  1133. Partly moving towards defaulting to ODBC 3.x standards.
  1134. =head2 Changes in DBD::ODBC 0.43 July 18, 2002
  1135. Fix for FoxPro (and potentially other) Drivers!!!!!
  1136. Add support for DBI column_info
  1137. Fix for binding undef value which comes from dereferencing hash
  1138. Fix to make all bound columns word (int) aligned in the buffer.
  1139. =head2 Changes in DBD::ODBC 0.42 July 8, 2002
  1140. Added patches to the tests to support ActiveState's automated build
  1141. process.
  1142. Fix ping() to try SQLTables for a test, instead of a strange query.
  1143. =head2 Changes in DBD::ODBC 0.41 April 15, 2002
  1144. Fixed problem where SQLDescribeParam would fail (probably bug in ODBC
  1145. driver). Now reverts to SQL_VARCHAR if that happens, instead of failing
  1146. the query.
  1147. Fixed error report when using Oracle's driver. There is a known
  1148. problem. Left the error on the test, but added warning indicating it's
  1149. a known problem.
  1150. =head2 Changes in DBD::ODBC 0.40 April 12, 2002
  1151. Most significant change is the change in the default binding type which
  1152. forces DBD::ODBC to attempt to determine the bind type if one is not
  1153. passed. I decided to make this the default behavior to make things as
  1154. simple as possible.
  1155. Fixed connection code put in 0.39 to work correctly.
  1156. Two minor patches for building, one for Cygwin one if both iODBC and
  1157. unixODBC libraries are installed. Probably need better command line on
  1158. this, but if someone has the problem, please let me know (and hopefully
  1159. send a patch with it).
  1160. =head2 Changes in DBD::ODBC 0.39 March 12, 2002
  1161. See mytest/longbin.pl for demonstration of inserting and retrieving long
  1162. binary files to/from the db. Uses MD5 algorithm to verify data. Please
  1163. do some similar test(s) with your database before using it in
  1164. production. The various bind types are different for each database!
  1165. Finally removed distribution of old iODBC. See www.iodbc.org or
  1166. www.unixodbc.org for newer/better versions of the ODBC driver manager
  1167. for Unix (and others?).
  1168. Added ability to force ODBC environment version.
  1169. Fix to SQLColAttributes.
  1170. Changes to connect sequence to provide better error messages for those
  1171. using DSN-less connections.
  1172. =head2 Changes in DBD::ODBC 0.38 February 12, 2002
  1173. Fixed do function (again) thanks to work by Martin Evans.
  1174. =head2 Changes in DBD::ODBC 0.37 February 10, 2002
  1175. Patches for get_info where return type is string. Patches thanks to
  1176. Steffen Goldner. Thanks Steffen!
  1177. Patched get_info to NOT attempt to get data for SQL_DRIVER_HSTMT and
  1178. SQL_DRIVER_HDESC as they expect data in and have limited value (IMHO).
  1179. Further fixed build for ODBC 2.x drivers. The new SQLExecDirect code
  1180. had SQLAllocHandle which is a 3.x function, not a 2.x function. Sigh.
  1181. I should have caught that the first time. Signed, the Mad-and-
  1182. not-thorough-enough-patcher.
  1183. Additionally, a random core dump occurred in the tests, based upon the
  1184. new SQLExecDirect code. This has been fixed.
  1185. =head2 Changes in DBD::ODBC 0.36 February 10, 2002
  1186. Fixed build for ODBC 2.x drivers. The new SQLExecDirect code had
  1187. SQLFreeHandle which is a 3.x function, not a 2.x function.
  1188. =head2 Changes in DBD::ODBC 0.35 February 9, 2002
  1189. Fixed (finally) multiple result sets with differing numbers of columns.
  1190. The final fix was to call SQLFreeStmt(SQL_UNBIND) before repreparing the
  1191. statement for the next query.
  1192. Added more to the multi-statement tests to ensure the data retrieved was
  1193. what was expected.
  1194. Now, DBD::ODBC overrides DBI's do to call SQLExecDirect for simple
  1195. statements (those without parameters). Please advise if you run into
  1196. problems. Hopefully, this will provide some small speed improvement for
  1197. simple "do" statements. You can also call $dbh->func($stmt,
  1198. ExecDirect). I'm not sure this has great value unless you need to
  1199. ensure SQLExecDirect is being called. Patches thanks to Merijn Broeren.
  1200. Thanks Merijn!
  1201. =head2 Changes in DBD::ODBC 0.34 February 7, 2002
  1202. Further revamped tests to attempt to determine if SQLDescribeParam will
  1203. work to handle the binding types. The t/08bind.t attempts to determine
  1204. if SQLDescribeParam is supported. note that Oracle's ODBC driver under
  1205. NT doesn't work correctly when binding dates using the ODBC date
  1206. formatting {d } or {ts }. So, test #3 will fail in t/08bind.t
  1207. New support for primary_key_info thanks to patches by Martin Evans.
  1208. New support for catalog, schema, table and table_type in table_info
  1209. thanks to Martin Evans. Thanks Martin for your work and your continuing
  1210. testing, suggestions and general support!
  1211. Support for upcoming dbi get_info.
  1212. =head2 Changes in DBD::ODBC 0.33_3 February 4, 2002
  1213. Revamped tests to include tests for multiple result sets. The tests are
  1214. ODBC driver platform specific and will be skipped for drivers which do
  1215. not support multiple result sets.
  1216. =head2 Changes in DBD::ODBC 0.33_2 February 4, 2002
  1217. Finally tested new binding techniques with SQL Server 2000, but there is
  1218. a nice little bug in their MDAC and ODBC drivers according to the
  1219. knowledge base article # Q273813, titled
  1220. "FIX: "Incorrect Syntax near the Keyword 'by' "
  1221. Error Message with Column Names of "C", "CA" or "CAS" (Q273813)
  1222. DBD::ODBC now does not name any of the columns A, B, C, or D they are
  1223. now COL_A, COL_B, COL_C, COL_D.
  1224. *** NOTE: *** I AM STRONGLY CONSIDERING MAKING THE NEW BINDING the
  1225. default for future versions. I do not believe it will break much
  1226. existing code (if any) as anyone binding to non VARCHAR (without the
  1227. ODBC driver doing a good conversion from the VARCHAR) will have a
  1228. problem. It may be subtle, however, since much code will work, but
  1229. say, binding dates may not with some drivers.
  1230. Please comment soon...
  1231. =head2 Changes in DBD::ODBC 0.33_1 February 4, 2002
  1232. *** WARNING: ***
  1233. Changes to the binding code to allow the use of SQLDescribeParam to
  1234. determine if the type of column being bound. This is experimental and
  1235. activated by setting
  1236. $dbh->{odbc_default_bind_type} = 0; # before creating the query...
  1237. Currently the default value of odbc_default_bind_type = SQL_VARCHAR
  1238. which mimicks the current behavior. If you set odbc_default_bind_type
  1239. to 0, then SQLDescribeParam will be called to determine the columen
  1240. type. Not ALL databases handle this correctly. For example, Oracle
  1241. returns SQL_VARCHAR for all types and attempts to convert to the correct
  1242. type for us. However, if you use the ODBC escaped date/time format such
  1243. as: {ts '1998-05-13 00:01:00'} then Oracle complains. If you bind this
  1244. with a SQL_TIMESTAMP type, however, Oracle's ODBC driver will parse the
  1245. time/date correctly. Use at your own risk!
  1246. Fix to dbdimp.c to allow quoted identifiers to begin/end with either "
  1247. or '. The following will not be treated as if they have a bind
  1248. placeholder:
  1249. "isEstimated?"
  1250. '01-JAN-1987 00:00:00'
  1251. 'Does anyone insert a ?'
  1252. =head2 Changes in DBD::ODBC 0.32 January 22, 2002
  1253. More SAP patches to Makfile.PL to eliminate the call to Data Sources
  1254. A patch to the test (for SAP and potentially others), to allow fallback
  1255. to SQL_TYPE_DATE in the tests
  1256. =head2 Changes in DBD::ODBC 0.31 January 18, 2002
  1257. Added SAP patches to build directly against SAP driver instead of driver
  1258. manager thanks to Flemming Frandsen (thanks!)
  1259. Added support to fix ping for Oracle8. May break other databases, so
  1260. please report this as soon as possible. The downside is that we need to
  1261. actually execute the dummy query.
  1262. =head2 Changes in DBD::ODBC 0.30 January 8, 2002
  1263. Added ping patch for Solid courtesy of Marko Asplund
  1264. Updated disconnect to rollback if autocommit is not on. This should
  1265. silence some errors when disconnecting.
  1266. Updated SQL_ROWSET_SIZE attribute. Needed to force it to
  1267. odbc_SQL_ROWSET_SIZE to obey the DBI rules.
  1268. Added odbc_SQL_DRIVER_ODBC_VER, which obtains the version of the Driver
  1269. upon connect. This internal capture of the version is a read-only
  1270. attribute and is used during array binding of parameters.
  1271. Added odbc_ignore_named_placeholders attribute to facilicate creating
  1272. triggers within SAPDB and Oracle, to name two. The syntax in these DBs
  1273. is to allow use of :old and :new to access column values before and
  1274. after updates. Example:
  1275. $dbh->{odbc_ignore_named_placeholders} = 1;
  1276. # set it for all future statements
  1277. # ignores :foo, :new, etc, but not :1 or ?
  1278. $dbh->do("create or replace etc :new.D = sysdate etc");
  1279. =head2 Changes in DBD::ODBC 0.29 August 22, 2001
  1280. Cygwin patches from Neil Lunn (untested by me). Thanks Neil!
  1281. SQL_ROWSET_SIZE attribute patch from Andrew Brown
  1282. There are only 2 additional lines allowing for the setting of
  1283. SQL_ROWSET_SIZE as db handle option.
  1284. The purpose to my madness is simple. SqlServer (7 anyway) by default
  1285. supports only one select statement at once (using std ODBC cursors).
  1286. According to the SqlServer documentation you can alter the default
  1287. setting of three values to force the use of server cursors - in which
  1288. case multiple selects are possible.
  1289. The code change allows for:
  1290. $dbh->{SQL_ROWSET_SIZE} = 2; # Any value > 1
  1291. For this very purpose.
  1292. The setting of SQL_ROWSET_SIZE only affects the extended fetch command
  1293. as far as I can work out and thus setting this option shouldn't affect
  1294. DBD::ODBC operations directly in any way.
  1295. Andrew
  1296. VMS and other patches from Martin Evans (thanks!)
  1297. [1] a fix for Makefile.PL to build DBD::ODBC on OpenVMS.
  1298. [2] fix trace message coredumping after SQLDriverConnect
  1299. [3] fix call to SQLCancel which fails to pass the statement handle
  1300. properly.
  1301. [4] consume diagnostics after SQLDriverConnect/SQLConnect call or they
  1302. remain until the next error occurs and it then looks confusing (this
  1303. is due to ODBC spec for SQLError). e.g. test 02simple returns a data
  1304. truncated error only now instead of all the informational diags that
  1305. are left from the connect call, like the "database changed", "language
  1306. changed" messages you get from MS SQL Server.
  1307. Replaced C++ style comments with C style to support more platforms more
  1308. easily.
  1309. Fixed bug which use the single quote (') instead of a double quote (")
  1310. for "literal" column names. This helped when having a colon (:) in the
  1311. column name.
  1312. Fixed bug which would cause DBD::ODBC to core-dump (crash) if DBI
  1313. tracing level was greater than 3.
  1314. Fixed problem where ODBC.pm would have "use of uninitialized variable"
  1315. if calling DBI's type_info.
  1316. Fixed problem where ODBC.xs *may* have an overrun when calling
  1317. SQLDataSources.
  1318. Fixed problem with DBI 1.14, where fprintf was being called instead of
  1319. PerlIO_printf for debug information
  1320. Fixed problem building with unixODBC per patch from Nick Gorham
  1321. Added ability to bind_param_inout() via patches from Jeremy Cooper.
  1322. Haven't figured out a good, non-db specific way to test. My current
  1323. test platform attempts to determine the connected database type via ugly
  1324. hacks and will test, if it thinks it can. Feel free to patch and send
  1325. me something...Also, my current Oracle ODBC driver fails miserably and
  1326. dies.
  1327. Updated t/02simple.t to not print an error, when there is not one.
  1328. =head2 Changes in DBD::ODBC 0.28 March 23, 2000
  1329. Added support for SQLSpecialColumns thanks to patch provided by Martin
  1330. J. Evans
  1331. Fixed bug introduced in 0.26 which was introduced of SQLMoreResults was
  1332. not supported by the driver.
  1333. =head2 Changes in DBD::ODBC 0.27 March 8, 2000
  1334. Examined patch for ping method to repair problem reported by Chris
  1335. Bezil. Thanks Chris!
  1336. Added simple test for ping method working which should identify this in
  1337. the future.
  1338. =head2 Changes in DBD::ODBC 0.26 March 5, 2000
  1339. Put in patch for returning only positive rowcounts from dbd_st_execute.
  1340. The original patch was submitted by Jon Smirl and put back in by David
  1341. Good. Reasoning seems sound, so I put it back in. However, any
  1342. databases that return negative rowcounts for specific reasons, will no
  1343. longer do so.
  1344. Put in David Good's patch for multiple result sets. Thanks David! See
  1345. mytest\moreresults.pl for an example of usage.
  1346. Added readme.txt in iodbcsrc explaining an issue there with iODBC 2.50.3
  1347. and C<data_sources>.
  1348. Put in rudimentary cancel support via SQLCancel. Call $sth->cencel to
  1349. utilize. However, it is largely untested by me, as I do not have a good
  1350. sample for this yet. It may come in handy with threaded perl, someday
  1351. or it may work in a signal handler.
  1352. =head2 Changes in DBD::ODBC 0.25 March 4, 2000
  1353. Added conditional compilation for SQL_WVARCHAR and SQL_WLONGVARCHAR. If
  1354. they are not defined by your driver manager, they will not be compiled
  1355. in to the code. If you would like to support these types on some
  1356. platforms, you may be able to #define SQL_WVARCHAR (-9) #define
  1357. SQL_WLONGVARCHAR (-10)
  1358. Added more long tests with binding in t\09bind.t. Note use of
  1359. bind_param!
  1360. =head2 Changes in DBD::ODBC 0.24 February 24, 2000
  1361. Fixed Test #13 in 02simple.t. Would fail, improperly, if there was only
  1362. one data source defined.
  1363. Fixed (hopefully) SQL Server 7 and ntext type "Out of Memory!" errors
  1364. via patch from Thomas Lowery. Thanks Thomas!
  1365. Added more support for Solid to handle the fact that it does not support
  1366. data_sources nor SQLDriverConnect. Patch supplied by Samuli Karkkainen
  1367. [skarkkai@woods.iki.fi]. Thanks! It's untested by me, however.
  1368. Added some information from Adam Curtin about a bug in iodbc 2.50.3's
  1369. data_sources. See iodbcsrc\readme.txt.
  1370. Added information in this pod from Stephen Arehart regarding DSNLess
  1371. connections.
  1372. Added fix for sp_prepare/sp_execute bug reported by Paul G. Weiss.
  1373. Added some code for handling a hint on disconnect where the user gets an
  1374. error for not committing.
  1375. =head2 Changes in DBD::ODBC 0.22 September 8, 1999
  1376. Fixed for threaded perl builds. Note that this was tested only on
  1377. Win32, with no threads in use and using DBI 1.13. Note, for
  1378. ActiveState/PERL_OBJECT builds, DBI 1.13_01 is required as of 9/8/99.
  1379. If you are using ActiveState's perl, this can be installed by using PPM.
  1380. =head2 Changes in DBD::ODBC 0.21
  1381. Thanks to all who provided patches!
  1382. Added ability to connect to an ODBC source without prior creation of
  1383. DSN. See mytest/contest.pl for example with MS Access. (Also note that
  1384. you will need documentation for your ODBC driver -- which, sadly, can be
  1385. difficult to find).
  1386. Fixed case sensitivity in tests.
  1387. Hopefully fixed test #4 in t/09bind.t. Updated it to insert the date
  1388. column and updated it to find the right type of the column. However, it
  1389. doesn't seem to work on my Linux test machine, using the OpenLink
  1390. drivers with MS-SQL Server (6.5). It complains about binding the date
  1391. time. The same test works under Win32 with SQL Server 6.5, Oracle 8.0.3
  1392. and MS Access 97 ODBC drivers. Hmmph.
  1393. Fixed some binary type issues (patches from Jon Smirl)
  1394. Added SQLStatistics, SQLForeignKeys, SQLPrimaryKeys (patches from Jon
  1395. Smirl) Thanks (again), Jon, for providing the build_results function to
  1396. help reduce duplicate code!
  1397. Worked on LongTruncOk for Openlink drivers.
  1398. Note: those trying to bind variables need to remember that you should
  1399. use the following syntax:
  1400. use DBI;
  1401. ...
  1402. $sth->bind_param(1, $str, DBI::SQL_LONGVARCHAR);
  1403. Added support for unixodbc (per Nick Gorham)
  1404. Added support for OpenLinks udbc (per Patrick van Kleef)
  1405. Added Support for esodbc (per Martin Evans)
  1406. Added Support for Easysoft (per Bob Kline)
  1407. Changed table_info to produce a list of views, too.
  1408. Fixed bug in SQLColumns call.
  1409. Fixed blob handling via patches from Jochen Wiedmann.
  1410. Added data_sources capability via snarfing code from DBD::Adabas (Jochen
  1411. Wiedmann)
  1412. =head2 Changes in DBD::ODBC 0.20 August 14, 1998
  1413. SQLColAttributes fixes for SQL Server and MySQL. Fixed tables method by
  1414. renaming to new table_info method. Added new tyoe_info_all method.
  1415. Improved Makefile.PL support for Adabase.
  1416. =head2 Changes in DBD::ODBC 0.19
  1417. Added iODBC source code to distribution.Fall-back to using iODBC header
  1418. files in some cases.
  1419. =head2 Changes in DBD::ODBC 0.18
  1420. Enhancements to build process. Better handling of errors in error
  1421. handling code.
  1422. =head2 Changes in DBD::ODBC 0.17
  1423. This release is mostly due to the good work of Jeff Urlwin. My eternal
  1424. thanks to you Jeff.
  1425. Fixed "SQLNumResultCols err" on joins and 'order by' with some drivers
  1426. (see Microsoft Knowledge Base article #Q124899). Thanks to Paul
  1427. O'Fallon for that one.
  1428. Added more (probably incomplete) support for unix ODBC in Makefile.PL
  1429. Increased default SQL_COLUMN_DISPLAY_SIZE and SQL_COLUMN_LENGTH to 2000
  1430. for drivers that don't provide a way to query them dynamically. Was 100!
  1431. When fetch reaches the end-of-data it automatically frees the internal
  1432. ODBC statement handle and marks the DBI statement handle as inactive
  1433. (thus an explicit 'finish' is *not* required).
  1434. Also:
  1435. LongTruncOk for Oracle ODBC (where fbh->datalen < 0)
  1436. Added tracing into SQLBindParameter (help diagnose oracle odbc bug)
  1437. Fixed/worked around bug/result from Latest Oracle ODBC driver where in
  1438. SQLColAttribute cbInfoValue was changed to 0 to indicate fDesc had a value
  1439. Added work around for compiling w/ActiveState PRK (PERL_OBJECT)
  1440. Updated tests to include date insert and type
  1441. Added more "backup" SQL_xxx types for tests
  1442. Updated bind test to test binding select
  1443. NOTE: bind insert fails on Paradox driver (don't know why)
  1444. Added support for: (see notes below)
  1445. SQLGetInfo via $dbh->func(xxx, GetInfo)
  1446. SQLGetTypeInfo via $dbh->func(xxx, GetTypeInfo)
  1447. SQLDescribeCol via $sth->func(colno, DescribeCol)
  1448. SQLColAttributes via $sth->func(xxx, colno, ColAttributes)
  1449. SQLGetFunctions via $dbh->func(xxx, GetFunctions)
  1450. SQLColumns via $dbh->func(catalog, schema, table, column, 'columns')
  1451. Fixed $DBI::err to reflect the real ODBC error code which is a 5 char
  1452. code, not necessarily numeric.
  1453. Fixed fetches when LongTruncOk == 1.
  1454. Updated tests to pass more often (hopefully 100% <G>)
  1455. Updated tests to test long reading, inserting and the LongTruncOk attribute.
  1456. Updated tests to be less driver specific.
  1457. They now rely upon SQLGetTypeInfo I<heavily> in order to create the
  1458. tables. The test use this function to "ask" the driver for the name of
  1459. the SQL type to correctly create long, varchar, etc types. For example,
  1460. in Oracle the SQL_VARCHAR type is VARCHAR2, while MS Access uses TEXT
  1461. for the SQL Name. Again, in Oracle the SQL_LONGVARCHAR is LONG, while
  1462. in Access it's MEMO. The tests currently handle this correctly (at
  1463. least with Access and Oracle, MS SQL server will be tested also).
  1464. =cut