📄 otl3_whatn.htm
字号:
<!DOCTYPE html PUBLIC "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
<meta content="text/html; charset=iso-8859-1"
http-equiv="Content-Type">
<meta content="Sergei Kuchin" name="Author">
<meta content="Mozilla/4.78 [en] (Windows NT 5.0; U) [Netscape]"
name="GENERATOR">
<meta
content="OTL, Oracle, ODBC, DB2, CLI, database API, C++, Template Library"
name="KeyWords">
<title>Oracle, Odbc and DB2-CLITemplate Library, Version 4.0, What's
New</title>
</head>
<body>
<ul>
<center>
<h1>Oracle, Odbc and DB2-CLI Template Library, Version 4.0</h1>
</center>
<center>
<h1>What's New</h1>
</center>
<h1>Current release number of the OTL header file</h1>
Current release number of the OTL header file is <font size="+2">4.0.180.
<script language="JavaScript"><!-- hide from old browsers
var modDate = new Date(document.lastModified)
document.write("<i> (Updated: " + (modDate.getMonth()+1) + "/" +
modDate.getDate() + "/" + "0"+(modDate.getYear())%100+"</i>).");
//-->
</script></font>If
you need the up-to-date version of the OTL header file, see the <a
href="otl3_down.htm">download
instructions</a>.
<h1>OTL 4.0.180 is now released.<br>
</h1>
<h1>For more detail, see the <a href="#summary">summary </a>of new
features. <i>The <a href="otl4_htm.zip">archived version</a> of
the OTL Web
pages </i>is available.</h1>
<b></b>
<h1><a name="summary"></a><i>From OTL 3.0.0 to OTL 4.0.180: summary
of
new features
and bug fixes</i></h1>
<table border="1">
<caption> </caption> <tbody>
<tr>
<td><b><font size="+1">Feature</font></b></td>
<td style="vertical-align: top;"><br>
</td>
<td><b><font size="+1">Comment</font></b></td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.180):<br>
<br>
<ul>
<li>This release introduces the following new function:
otl_stream::<a href="otl3_stream_class.htm#get_dirty_buf_len">get_dirty_buf_len</a>().
The feature was requested by a couple developers. <br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.179):<br>
<br>
<ul>
<li>A documentation bug was reported that :v<<a
href="otl3_bind_variables.htm#long">long</a>> (bind variable) is
not always a signed 32-bit integer on 64-bit platforms. The
documentation has been corrected in this release to provide a more
detailed explanation on the topic.<br>
<br>
</li>
<li>OTL 4.0.176 was refactored to make
undocumented class public data members in OTL private or protected. A
compilation problem was reported around the area of those previously
public data members. The following method has been added to the
otl_stream class (for all flavors of OTL) in order to
address the compilation issue:<br>
<pre wrap=""> int get_connected() const {return connected;}<br></pre>
</li>
<li>Several projects asked for the following code to be
included into the OTL header file:<br>
<br>
<span style="font-family: monospace;">#if
defined(OTL_INCLUDE_0)</span><br style="font-family: monospace;">
<span style="font-family: monospace;">#include
"otl_include_0.h"</span><br style="font-family: monospace;">
<span style="font-family: monospace;">#endif</span><br
style="font-family: monospace;">
<br>
The rationale for it is that these projects need to include their own
credentials to the OTL header file, so that, when the correctponding
binary file gets generated, the credentials will be present in the
binary as a string. Therefore, the exact version/build # of the binary
can be easily identified.<br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.178):<br>
<br>
<ul>
<li>The folowing deficiency was reported in the OTL tracing:<br>
<pre>...<br>(0) MY OTL TRACE ==> otl_stream(this=0012FEFC)::open<br>(buffer_size=5, sqlstm=select * from test_tab where f1>=:f<int> <br>and f1<=:ff<int>*2, connect=004332CC); <br><br>(1) MY OTL TRACE ==> otl_stream(this=0012FEFC)::operator <<<br>(char*: ftype=1, placeholder=:f2, value="Name10"); <br><br>(2) MY OTL TRACE ==> otl_stream, executing SQL Stm=insert into <br>test_tab values(:f1 ,:f2 ), current batch size=10, row offset=0<br>...<br>(3) MY OTL TRACE ==> otl_stream, executing SQL Stm=<br>select * from test_tab where f1>=:f and f1<=:ff *2, buffer size=5<br><br>(4) MY OTL TRACE ==> otl_stream, fetched the first batch <br>of rows, SQL Stm=select * from test_tab where f1>=:f and f1<=:ff *2, RPC=5<br>...<br><br></pre>
(2), (3), and (4) don't have the stream address, which makes it
difficult to keep track of different instances of OTL streams that have
the same SQL
statement, and especially when the streams are used in different
threads. The deficiency is fixed in this release. The OTL trace for the
example above is going to look like this:<br>
<pre>...<br>(0) MY OTL TRACE ==> otl_stream(this=0012FEFC)::open<br>(buffer_size=5, sqlstm=select * from test_tab <br>where f1>=:f<int> and f1<=:ff<int>*2, connect=004332CC); <br><br>(1) MY OTL TRACE ==> otl_stream(this=0012FEFC)::operator <<<br>(char*: ftype=1, placeholder=:f2, value="Name10"); <br><br>(2) MY OTL TRACE ==> otl_stream(this=0012FEFC), executing SQL Stm=<br>insert into test_tab values(:f1 ,:f2 ), <br>current batch size=10, row offset=0<br>...<br>(3) MY OTL TRACE ==> otl_stream(this=0012FECC), executing SQL Stm=<br>select * from test_tab where f1>=:f and f1<=:ff *2, buffer size=5<br><br>(4) MY OTL TRACE ==> otl_stream(this=0012FECC), fetched the first batch of rows, <br>SQL Stm=select * from test_tab where f1>=:f and f1<=:ff *2, RPC=5<br>...<br></pre>
</li>
<li>A bug was reported that some OTL trace statements are
missing for #define OTL_ORAXXX when reference cursors are used. The bug
is fixed in this release<br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.177):<br>
<br>
<ul>
<li>In order to address an issue, the following new <a
href="otl3_faq.htm#Large_Nvarchar_MSSQL">question & answer</a> has
been added to the OTL F.A.Q.: <i><font size="+1">How to
insert or update MS SQL NVARCHAR</font></i><span
style="font-style: italic;"> / NCHAR
values larger than 2000 (UTF-16) characters?<br>
<br>
</span></li>
<li>The previous release (OTL 4.0.176) was refactored to make
undocumented class public data members in OTL private or protected. A
compilation problem was reported around the area of those previously
public data members. The following two methods have been added to
class otl_conn (under #define OTL_ORAXX, where XX>=8) in order to
address the compilation issue:<br>
<pre wrap="">OCIServer* get_srvhp(){return srvhp;}<br>OCISession* get_authp(){return authp;}</pre>
</li>
<li>A problem was reported that when #define OTL_ORA10G is
used, an otl_stream stream has :v<refcur,...>, and the stream's
buffer size is > 1, the program crashes somewhere deep in the OCI
layer. The stream's buffer size should be set to 1 when the stream has
:v<refcur>. OTL is supposed to throw the otl_exception with error
code of <a href="otl3_exc_list.htm#32034">32034</a>, but it
doesn't The problem is fixed in this release.<br>
<span style="font-style: italic;"><br>
</span></li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.176):<br>
<br>
<ul>
<li>OTL code has been refactored: public data
members that weren't part of the documented public interfaces have been
made private, or protected. This may break some OTL based code, if the
code uses undocumented public data members in the OTL classes, that
have been made private/protected in this release of OTL. Let me know
right away if this happens, and I'll add appropriate accessor functions
to the corresponding OTL classes. The reason for the refactoring of the
OTL header file is that developers in many projects (I've heard from
many enough) are adopting stricter standards for third-party libraries
as well as their own code.<br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.175):<br>
<br>
<ul>
<li>A bug was reported that otl_stream::<a
href="otl3_stream_class.htm#create_stored_proc_call">create_stored_proc_call</a>()
couldn't find a procedure / function name if the procedure / function
is available via Oracle synonym mechanism. The bug is fixed in
this release: otl_stream::<a
href="otl3_stream_class.htm#create_stored_proc_call">create_stored_proc_call()</a>
searches Oracle's data dictionary's user_synonyms and all_synonyms
views in case if the procedure / function name is not found anywhere
else. <br>
<br>
</li>
<li>A bug was reported that the otl_connect object can't
fully recover from a database failure when OTL/ODBC is used with the
Oracle ODBC driver for Oracle. OTL/ODBC doesn't deallocate the connect
related underlying ODBC handles on otl_connect::<a
href="otl3_connect_class.htm#logoff">logoff</a>(). The assumption was
that the ODBC driver's connection handles can be reused on the next
otl_connect::<a href="otl3_connect_class.htm#rlogon">rlogon</a>().
Obviously, there
are situations when the assumption is not true. The following new
#define forces the otl_connect::logoff() to free ODBC connection
related handles: <a
href="otl3_compile.htm#OTL_ODBC_LOGOFF_FREES_HANDLES">OTL_ODBC_LOGOFF_FREES_HANDLES</a>.<br>
<br>
</li>
<li>A bug was reported that <a href="otl4_refcur_stream.htm">otl_refcur_stream</a>
doesn't support the RAW type. The bug is fixed in this release.<br>
<br>
</li>
<li>A bug was reported that sometimes <a
href="otl4_subscriber.htm">otl_subscriber</a> class doesn't report
table-wide events because the corresponding event bitmask contains the
event bit + OCI_OPCODE_ALLROWS. The bug has been fixed in this release,
and otl_subscriber's OnTableAlter(), OnTableDrop(), OnTableChange()'s
signatures have been changed.<br>
<br>
</li>
<li>A problem was reported that Oracle CLOB-to-XMLType and
XMLType-to_CLOB conversion didn't work for XMLType values larger than
4000 bytes. Example <a href="otl4_ex678.htm">678</a> has been added to
show how to work around the problem.<br>
<br>
</li>
<li>MS SQL 2005 introduced Multiple Active Result Sets
(MARS), which is not
enabled by default. More and more applications require this feature to
be enabled. This release of OTL introduces the following #define to
enable the feature: <a href="otl3_compile.htm#OTL_ENABLE_MSSQL_MARS">OTL_ENABLE_MSSQL_MARS</a>.<br>
<br>
</li>
<li>This release introduces support for MS SQL 2008 (new
#define <a href="otl3_compile.htm#OTL_ODBC_MSSQL_2008">OTL_ODBC_MSSQL_2008</a>,
new <a href="otl3_connect_class.htm#OTL_MSSQL_2008_ODBC_CONNECT">OTL_MSSQL_2008_ODBC_CONNECT</a>
mode under #define <a href="otl3_compile.htm#OTL_ODBC_MULTI_MODE">OTL_ODBC_MULTI_MODE</a>).
For more detail, see also examples <a href="otl4_ex679.htm">679</a>, <a
href="otl4_ex680.htm">680</a>, <a href="otl4_ex681.htm">681</a>, <a
href="otl4_ex682.htm">682</a>, <a href="otl4_ex683.htm">683</a>, <a
href="otl4_ex684.htm">684</a>.<br>
<br>
</li>
<li>This release of OTL compiles clean with the latest g++:
4.3.2 (which has been released recently).<br>
<br>
</li>
</ul>
</td>
</tr>
<tr>
<td style="vertical-align: top;">New (in OTL 4.0.174):<br>
<br>
<ul>
<li>OTL 4.0.173 fixed the LOB-stream-mode-NULL <a
href="#LOB_NULL_BUG">bug</a> for OTL/DB2-CLI, but it introduced the
same bug in OTL/OCI. The bug is fixed in this release.<br>
<br>
</li>
<li>ODBC doesn't support timestamps with time zone components
yet. However, there is a need to work with "TIMESTAMP WITH TIME ZONE"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -