Connector/J (JDBC) Reference
2072
yearIsDateType
Should the JDBC driver treat the MySQL type
"YEAR" as a java.sql.Date, or as a SHORT?
true
3.1.9
zeroDateTimeBehavior
What should happen when the driver encounters
DATETIME values that are composed entirely
of zeros (used by MySQL to represent invalid
dates)? Valid values are "exception", "round" and
"convertToNull".
exception 3.1.4
Connector/J also supports access to MySQL using named pipes on Windows NT, Windows 2000,
or Windows XP using the
NamedPipeSocketFactory
as a plugin-socket factory using the
socketFactory
property. If you do not use a
namedPipePath
property, the default of
'\\.\pipe
\MySQL'
is used. If you use the
NamedPipeSocketFactory
, the host name and port number values
in the JDBC url are ignored. To enable this feature, use:
socketFactory=com.mysql.jdbc.NamedPipeSocketFactory
Named pipes only work when connecting to a MySQL server on the same physical machine where the
JDBC driver is running. In simple performance tests, named pipe access is between 30%-50% faster
than the standard TCP/IP access. However, this varies per system, and named pipes are slower than
TCP/IP in many Windows configurations.
To create your own socket factories, follow the example code in
com.mysql.jdbc.NamedPipeSocketFactory
, or
com.mysql.jdbc.StandardSocketFactory
.
20.3.5.1.1. Properties Files for the
useConfigs
Option
The
useConfigs
connection option is a convenient shorthand for specifying combinations of options
for particular scenarios. The argument values you can use with this option correspond to the names of
.properties
files within the Connector/J
mysql-connector-java-version-bin.jar
JAR file.
For example, the Connector/J 5.1.9 driver includes the following configuration properties files:
$ unzip mysql-connector-java-5.1.19-bin.jar '*/configs/*'
Archive: mysql-connector-java-5.1.19-bin.jar
creating: com/mysql/jdbc/configs/
inflating: com/mysql/jdbc/configs/3-0-Compat.properties
inflating: com/mysql/jdbc/configs/5-0-Compat.properties
inflating: com/mysql/jdbc/configs/clusterBase.properties
inflating: com/mysql/jdbc/configs/coldFusion.properties
inflating: com/mysql/jdbc/configs/fullDebug.properties
inflating: com/mysql/jdbc/configs/maxPerformance.properties
inflating: com/mysql/jdbc/configs/solarisMaxPerformance.properties
To specify one of these combinations of options, specify
useConfigs=3-0-Compat
,
useConfigs=maxPerformance
, and so on. The following sections show the options that are part
of each
useConfigs
setting. For the details of why each one is included, see the comments in the
.properties
files.
3-0-Compat
emptyStringsConvertToZero=true
jdbcCompliantTruncation=false
noDatetimeStringSync=true
nullCatalogMeansCurrent=true
nullNamePatternMatchesAll=true
transformedBitIsBoolean=false
dontTrackOpenResources=true
zeroDateTimeBehavior=convertToNull
useServerPrepStmts=false
autoClosePStmtStreams=true
processEscapeCodesForPrepStmts=false
useFastDateParsing=false
populateInsertRowWithDefaultValues=false
useDirectRowUnpack=false
Summary of Contents for 5.0
Page 1: ...MySQL 5 0 Reference Manual ...
Page 18: ...xviii ...
Page 60: ...40 ...
Page 396: ...376 ...
Page 578: ...558 ...
Page 636: ...616 ...
Page 844: ...824 ...
Page 1234: ...1214 ...
Page 1427: ...MySQL Proxy Scripting 1407 ...
Page 1734: ...1714 ...
Page 1752: ...1732 ...
Page 1783: ...Configuring Connector ODBC 1763 ...
Page 1793: ...Connector ODBC Examples 1773 ...
Page 1839: ...Connector Net Installation 1819 2 You must choose the type of installation to perform ...
Page 2850: ...2830 ...
Page 2854: ...2834 ...
Page 2928: ...2908 ...
Page 3000: ...2980 ...
Page 3122: ...3102 ...
Page 3126: ...3106 ...
Page 3174: ...3154 ...
Page 3232: ...3212 ...