1
MySQL Connector/J @MYSQL_CJ_VERSION@ (formerly MM.MySQL)
3
MySQL AB's JDBC Driver for MySQL
5
Copyright (c) 2003 MySQL AB
15
* Documentation Location
17
* Modifications for BLOB streaming
29
MySQL Connector/J is licensed under the GPL or a commercial license
35
If you have licensed this product under the GPL, please see the COPYING
37
file for more information.
41
There are special exceptions to the terms and conditions of the GPL
43
as it is applied to this software. View the full text of the
45
exception in file EXCEPTIONS-CONNECTOR-J in the directory of this
47
software distribution.
51
If you have licensed this product under a commercial license from
53
MySQL AB, please see the file "MySQLEULA.txt" that comes with this
55
distribution for the terms of the license.
59
If you need non-GPL licenses for commercial distribution please contact
61
me <mark@mysql.com> or <sales@mysql.com>.
67
DOCUMENTATION LOCATION
71
The documentation formerly contained in this file has moved into the
73
'doc' directory, where it is available in HTML, PDF and plaintext
79
You may also find the latest copy of the documentation on the MySQL
81
website at http://dev.mysql.com/doc/refman/5.0/en/connector-j.html
87
MODIFICATION FOR BLOB STREAMING
91
This version of MySQL Connector/J has been modified for BLOB streaming in combination with the BLOB streaming engine (MyBS) and the PBXT storage engine. The modifications have been release under the standard GPL license and are copyright PrimeBase Technologies GmbH.
95
The lastest versions of PBMS and PBXT can be downloaded from: http://www.blobstreaming.org/download.
99
Enable BLOB streaming by adding the following option to the JDBC URL: enableBlobStreaming=true.
103
When set to true the driver will upload values set with setBinaryStream(), setAsciiStream() and setBlob() to the MyBS BLOB repository and insert a URL reference into the table, but only if a valid length is specified. For example, a value inserted using setBinaryStream() with a length of -1 will be not be uploaded to the repository. Instead the value will by inserted directly into the table, as if enableBlobStreaming were set to false.
107
NOTE: When enableBlobStreaming=true you should only use setBinaryStream(), setAsciiStream() and setBlob() with a valid length on columns of type LONGBLOB. Streamable BLOBs are currently only recognised in LONGBLOB type columns.
111
Selected values of type LONGBLOB are checked for valid BLOB URLs. Valid URLs are used to automatically download the BLOB data from the BLOB repository. Using a getBinaryStream(), getAsciiStream() or getBlob() you have direct access to the BLOB data stream from the repository.
115
Valid BLOB URLs are issued by the BLOB streaming engine, and have the following format:
119
'~>' <db-name> '/' <type-char> <table-id> '-' <blob-id> '-' <access-code> '-' <server-id>
123
Examples: ~>test/^11-128-fbd590b-0, ~>test/:1-524-3dc45b09-0
127
The sequence '~>' is a prefix which helps to identify a value BLOB URL quickly. <type-char> is ':' or '^'. BLOB URLs with type-char '^' are BLOBs that do not have a corresponding table (also called an unreferenced BLOB). In this case, the <table-id> is a repository file ID, and <blob-id> is the repository file offset. BLOB URLs with type-char ':' are standard BLOB repository references with a corresponding table. On INSERT, an unreferenced BLOB URL is transformed into a standard BLOB repository reference.
131
LIMITATION: This implementation is based on JDK 1.5.x, which only allows for lengths in setBinaryStream(), setAsciiStream() and setBlob() of type 'int'. This means that the maximum BLOB size that can currently permitted is 2GB.
141
This distribution includes an already built JDBC driver. If you want to build the driver yourself, you will need the following:
145
* Apache Ant version 1.6 or newer (available from http://ant.apache.org/).
149
* JDK-1.4.2 or later.
153
Then enter the following command to compile and create the driver:
161
After this you can test the BLOB streaming using the 'runtest.sh' shell script:
173
This software is OSI Certified Open Source Software.
175
OSI Certified is a certification mark of the Open Source Initiative.