Application development changes

version 11.1 includes changed functionality that might affect your existing applications and how you develop new applications.

The following table displays a list of changed capabilities in 11.1:
Table 1. Application development changes in 11.1
Change Details Resolution
User-defined objects called LOCALTIMESTAMP In 11.1, the LOCALTIMESTAMP special register synonym is added to increase portability across IBM database products. If a user-defined object such as a column, a user-defined variable, or a user-defined function has the name LOCALTIMESTAMP, an unqualified reference to this object resolves to the special register instead of the user-defined object. You must fully qualify all references to these objects or rename them. You can also use a delimited identifier for columns. For more information, see CURRENT TIMESTAMP special register.
HEXTORAW function Starting with 11.1, the return data type of the HEXTORAW function is the VARBINARY data type. Also, HEXTORAW is no longer a synonym for VARCHAR_BIT_FORMAT. In previous releases, the HEXTORAW function was a synonym for the VARCHAR_BIT_FORMAT scalar function and the return data type was VARCHAR FOR BIT DATA. If you require that HEXTORAW returns VARCHAR FOR BIT DATA, you can explicitly cast the result.

Also, consider existing materialized query tables (MQTs) that call HEXTORAW in the select list of the fullselect that defines the MQT. If you get error SQLCODE -344 (SQL0344N) when you access the MQT, drop and re-create the affected MQT.

For more information, see HEXTORAW scalar function.
Reduce cost of failback When affinityFailbackInterval is set, the current server first disconnects, then tries to connect to the primary server. But if the primary server is down, the connection is re-established to the current server once again. With the new changes, current server first pings the primary server and only if the primary server is up, then the current server is disconnected and the connection is established to the primary server.
Attribute to efficiently set global variables Currently, users can set global variables in two ways: by mentioning global variable names and its corresponding values inside sessionglobalvariables section of db2dsdriver.cfg, or use SQLExecDirect API by invoking SET sql. While using sessionglobalvariables through db2dsdriver.cfg, session global variables would be flown to server along with the first SQL statement that is used after the connection is established. The only way to set global variables post-connection is through the SQLExecDirect API, by invoking SET sql. However, invoking SET sql using SQLExecDirect() API will flow these variables immediately to the database server. Now a new mechanism is provided to chain global variables along with the next SQL statement and flow to the server instead of flowing immediately thereby reducing the network trips.
Support for CHAR(255) The CHAR data type now supports a new maximum length of 255 bytes (previously 254 bytes). The new maximum length can be used wherever CHAR types are specified, including tables, views, host variables, and also user-defined types and functions. This change is affecting the return type of scalar function CONCAT when the combined length is 255 bytes. This change also affects the result length of scalar function CHAR without an explicit length parameter. Consider existing materialized query tables (MQTs) that call CONCAT or CHAR in the select list of the fullselect that defines the MQT. If you get error SQLCODE -344 (SQL0344N) when you access the MQT, drop and re-create the affected MQT. Likewise, host variables that carry the result of a call to the CHAR function without explicit length might have to be increased in length to avoid a buffer overflow. For more information, see: Character strings

In addition to the application development changes, review Changes to system catalog views, built-in functions and global variables, built-in administrative routines and views, Deprecated functionality in version 11.1, and Discontinued functionality in version 11.1 to determine whether these changes affect your existing applications.