Oracle 5.0 Reference Manual page 2071

Table of Contents

Advertisement

You can get the alias for a column in a result set by calling
ResultSetMetaData.getColumnLabel(). To use the old noncompliant behavior with
ResultSetMetaData.getColumnName(), use the
and set the value to true.
In Connector/J 5.0.x, the default value of
Connector/J 5.1 this was changed to a default value of false.
20.3.3.3.2. JDBC-Specific Issues When Upgrading to MySQL Server 4.1 or Newer
• Using the UTF-8 Character Encoding - Prior to MySQL server version 4.1, the UTF-8 character
encoding was not supported by the server, however the JDBC driver could use it, allowing storage of
multiple character sets in
Starting with MySQL-4.1, this functionality is deprecated. If you have applications that rely on this
functionality, and can not upgrade them to use the official Unicode character support in MySQL
server version 4.1 or newer, add the following property to your connection URL:
useOldUTF8Behavior=true
• Server-side Prepared Statements - Connector/J 3.1 will automatically detect and use server-side
prepared statements when they are available (MySQL server version 4.1.0 and newer). If your
application encounters issues with server-side prepared statements, you can revert to the older
client-side emulated prepared statement code that is still presently used for MySQL servers older
than 4.1.0 with the following connection property:
useServerPrepStmts=false
20.3.3.3.3. Upgrading from MySQL Connector/J 3.0 to 3.1
Connector/J 3.1 is designed to be backward-compatible with Connector/J 3.0 as much as possible.
Major changes are isolated to new functionality exposed in MySQL-4.1 and newer, which includes
Unicode character sets, server-side prepared statements,
messages by the server and various performance enhancements that can be enabled or disabled using
configuration properties.
• Unicode Character Sets: See the next section, as well as
information on this MySQL feature. If you have something misconfigured, it will usually show up as
an error with a message similar to
• Server-side Prepared Statements: Connector/J 3.1 will automatically detect and use server-side
prepared statements when they are available (MySQL server version 4.1.0 and newer).
Starting with version 3.1.7, the driver scans SQL you are preparing using all variants of
Connection.prepareStatement()
to prepare on the server side, and if it is not supported by the server, it instead prepares
it as a client-side emulated prepared statement. You can disable this feature by passing
emulateUnsupportedPstmts=false
If your application encounters issues with server-side prepared statements, you can revert to the
older client-side emulated prepared statement code that is still presently used for MySQL servers
older than 4.1.0 with the connection property useServerPrepStmts=false.
• Datetimes with all-zero components
reliably in Java. Connector/J 3.0.x always converted them to
ResultSet.
Connector/J 3.1 throws an exception by default when these values are encountered, as this is the
most correct behavior according to the JDBC and SQL standards. This behavior can be modified
using the
latin1
zeroDateTimeBehavior
Connector/J Installation
useOldAliasMetadataBehavior
useOldAliasMetadataBehavior
tables on the server.
Illegal mix of
to determine if it is a supported type of statement
in your JDBC URL.
(0000-00-00
...): These values cannot be represented
configuration property. The permissible values are:
2051
codes returned in error
SQLState
Section 10.1, "Character Set
collations.
when being read from a
NULL
option
was true, but in
Support", for

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents