Modified:
trunk/
trunk/CHANGES
trunk/build.xml
trunk/src/com/mysql/jdbc/ConnectionImpl.java
trunk/src/com/mysql/jdbc/DatabaseMetaData.java
trunk/src/testsuite/regression/CallableStatementRegressionTest.java
Log:
Merged revisions
6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6617,6619-6620,6623-6627,6632,6636-6638,6641,6649,6658-6659,6663,6665-6673,6676-6678,6680-6681
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
...............
r6677 | mmatthews | 2007-11-18 18:56:52 -0600 (Sun, 18 Nov 2007) | 1717 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6601,6603-6604,6606-6607,6610-6611,6613-6614,6617-6625,6628-6631,6633-6658,6660-6672,6674-6676
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6636 | mmatthews | 2007-10-11 15:52:01 -0500 (Thu, 11 Oct 2007) | 1459 lines
Merged revisions
6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6617,6619-6620,6623-6627,6632-6635
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6633 | mmatthews | 2007-10-11 15:24:17 -0500 (Thu, 11 Oct 2007) | 1444 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6601,6603-6604,6606-6607,6610-6611,6613-6614,6617-6625,6628-6632
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6632 | mmatthews | 2007-10-11 15:10:26 -0500 (Thu, 11 Oct 2007) | 1437 lines
Merged revisions 6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6631 via
svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6618 | mmatthews | 2007-10-04 15:44:57 -0500 (Thu, 04 Oct 2007) | 1 line
Updated release date.
................
r6621 | mmatthews | 2007-10-05 13:53:09 -0500 (Fri, 05 Oct 2007) | 1380 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6601,6603-6604,6606-6607,6610-6616
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6612 | mmatthews | 2007-10-03 13:58:43 -0500 (Wed, 03 Oct 2007) | 1333 lines
Merged revisions 6585-6586,6593-6597,6599-6602,6605,6607-6611 via svnmerge
from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6610 | mmatthews | 2007-10-03 11:46:01 -0500 (Wed, 03 Oct 2007) | 1318
lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6601,6603-6609
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6605 | mmatthews | 2007-10-03 10:13:16 -0500 (Wed, 03 Oct 2007) | 1 line
Post merge fixup, putting back removed properties.
................
r6608 | mmatthews | 2007-10-03 11:33:16 -0500 (Wed, 03 Oct 2007) | 9 lines
Merged revisions 6602-6607 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6607 | mmatthews | 2007-10-03 11:21:54 -0500 (Wed, 03 Oct 2007) | 1
line
Type name for "integer" changed to "int" with fix for bug 27916,
adjusting tests accordingly.
........
................
r6609 | mmatthews | 2007-10-03 11:41:22 -0500 (Wed, 03 Oct 2007) | 1296
lines
Merged revisions 6567-6575,6578-6582,6585-6608 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6574 | mmatthews | 2007-09-07 09:03:45 -0500 (Fri, 07 Sep 2007) | 1066
lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566-6571
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6567 | mmatthews | 2007-09-06 10:12:14 -0500 (Thu, 06 Sep 2007) |
1032 lines
Merged revisions 6518-6543,6545-6566 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6518 | mmatthews | 2007-08-29 11:21:16 -0500 (Wed, 29 Aug 2007) | 1
line
Updated changelogs for bug 30550.
................
r6524 | mmatthews | 2007-08-29 12:01:19 -0500 (Wed, 29 Aug 2007) | 1
line
Updated/added copyright headers.
................
r6526 | mmatthews | 2007-08-29 12:49:17 -0500 (Wed, 29 Aug 2007) |
45 lines
Merged revisions 6523-6525 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6523 | mmatthews | 2007-08-29 12:00:31 -0500 (Wed, 29 Aug 2007) |
27 lines
Merged revisions 6512-6521 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6521 | mmatthews | 2007-08-29 11:36:56 -0500 (Wed, 29 Aug 2007)
| 10 lines
- Added two configuration parameters (both default to "false")
* blobsAreStrings - Should the driver always treat
BLOBs as Strings
specifically to work around
dubious metadata returned
by the server for GROUP BY
clauses?
* functionsNeverReturnBlobs - Should the driver
always treat data from
functions returning
BLOBs as Strings -
specifically to work
around dubious metadata
returned by the server
for GROUP BY clauses?
........
................
r6525 | mmatthews | 2007-08-29 12:08:25 -0500 (Wed, 29 Aug 2007) |
9 lines
Merged revisions 6522-6524 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6522 | mmatthews | 2007-08-29 11:59:18 -0500 (Wed, 29 Aug 2007)
| 1 line
Make functionsNeverReturnBlobs accessors public.
........
................
................
r6527 | mmatthews | 2007-08-29 12:54:37 -0500 (Wed, 29 Aug 2007) |
683 lines
Blocked revisions
6397,6403-6404,6408-6413,6474,6476,6478-6479,6481-6482,6487-6488,6493-6495,6501-6508,6512,6514-6516,6519-6520
via svnmerge
................
r6397 | mmatthews | 2007-04-11 00:11:41 -0500 (Wed, 11 Apr 2007) |
1 line
Bumped version #.
................
r6403 | mmatthews | 2007-04-20 16:02:26 -0500 (Fri, 20 Apr 2007) |
1 line
Share project 'jdbc-4-0-examples' into
'svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j'
................
r6404 | mmatthews | 2007-04-20 16:03:18 -0500 (Fri, 20 Apr 2007) |
1 line
Imported into SVN.
................
r6408 | mmatthews | 2007-04-23 16:54:31 -0500 (Mon, 23 Apr 2007) |
1 line
Added copyright notices, more comments.
................
r6409 | mmatthews | 2007-04-23 18:38:32 -0500 (Mon, 23 Apr 2007) |
1 line
Write out the "planet" as an HTML page, added
BareBonesBrowserLaunch to automatically launch the resultant page in a browser.
................
r6410 | mmatthews | 2007-04-23 18:41:29 -0500 (Mon, 23 Apr 2007) |
1 line
Changed formatting for display on projection screens.
................
r6411 | mmatthews | 2007-04-24 13:32:36 -0500 (Tue, 24 Apr 2007) |
1 line
Removed tests (not examples) that didn't belong in this project.
................
r6412 | mmatthews | 2007-04-24 13:35:02 -0500 (Tue, 24 Apr 2007) |
1 line
Removed empty directory.
................
r6413 | mmatthews | 2007-04-24 16:03:27 -0500 (Tue, 24 Apr 2007) |
1 line
(should've switched to resource view in Eclipse to delete the
parent directory)
................
r6474 | mmatthews | 2007-07-03 20:18:25 -0500 (Tue, 03 Jul 2007) |
1 line
Merged 5.1 back into trunk, new development for 6.0 starts here.
................
r6476 | mmatthews | 2007-07-03 20:28:06 -0500 (Tue, 03 Jul 2007) |
1 line
Setup svnmerge properties
................
r6478 | mmatthews | 2007-07-03 20:58:07 -0500 (Tue, 03 Jul 2007) |
1 line
svnmerge init for merge-back from 5.1 branch
................
r6479 | mmatthews | 2007-07-03 20:59:06 -0500 (Tue, 03 Jul 2007) |
1 line
svnmerge init for merge-back from 5.0 branch
................
r6481 | mmatthews | 2007-07-04 01:05:29 -0500 (Wed, 04 Jul 2007) |
1 line
Syncing pre-merge data
................
r6482 | mmatthews | 2007-07-05 14:01:07 -0500 (Thu, 05 Jul 2007) |
1 line
Merged from 5.1.
................
r6487 | mmatthews | 2007-07-17 22:34:57 -0500 (Tue, 17 Jul 2007) |
1 line
Merges from 5.0.
................
r6488 | mmatthews | 2007-07-17 22:40:05 -0500 (Tue, 17 Jul 2007) |
1 line
Fixed typo in bug#.
................
r6493 | mmatthews | 2007-07-18 16:17:46 -0500 (Wed, 18 Jul 2007) |
1 line
Don't create Maven bundles for commercial builds. They're not
needed.
................
r6494 | mmatthews | 2007-08-08 20:59:55 -0500 (Wed, 08 Aug 2007) |
23 lines
New methods on com.mysql.jdbc.Statement:
setLocalInfileInputStream()
and getLocalInfileInputStream().
setLocalInfileInputStream() sets an InputStream instance that
will be used to send data
to the MySQL server for a "LOAD DATA LOCAL INFILE" statement
rather than a FileInputStream or URLInputStream that
represents
the path given as an argument to the statement.
This stream will be read to completion upon execution of a
"LOAD DATA LOCAL INFILE" statement, and will automatically
be closed by the driver, so it needs to be reset
before each call to execute*() that would cause the MySQL
server to request data to fulfill the request for
"LOAD DATA LOCAL INFILE".
If this value is set to NULL, the driver will revert to
using
a FileInputStream or URLInputStream as required.
getLocalInfileInputStream() returns the InputStream instance
that will be used to send
data in response to a "LOAD DATA LOCAL INFILE" statement.
This method returns NULL if no such stream has been set
via setLocalInfileInputStream().
................
r6495 | mmatthews | 2007-08-13 15:22:27 -0500 (Mon, 13 Aug 2007) |
4 lines
- The driver now connects with an initial character set
of "utf-8" solely for the purposes of authentication to
allow usernames and database names in any character set to
be used in the JDBC URL.
................
r6501 | mmatthews | 2007-08-29 09:51:56 -0500 (Wed, 29 Aug 2007) |
3 lines
Initialized merge tracking via "svnmerge" with revisions "1-6500"
from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1/connector-j
................
r6502 | mmatthews | 2007-08-29 09:52:40 -0500 (Wed, 29 Aug 2007) |
1 line
Shouldn't check-in svnmerge-commit-message.txt.
................
r6503 | mmatthews | 2007-08-29 09:56:14 -0500 (Wed, 29 Aug 2007) |
3 lines
Initialized merge tracking via "svnmerge" with revisions "1-6392"
from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6504 | mmatthews | 2007-08-29 09:56:48 -0500 (Wed, 29 Aug 2007) |
3 lines
Initialized merge tracking via "svnmerge" with revisions "1-6503"
from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
................
r6505 | mmatthews | 2007-08-29 10:02:40 -0500 (Wed, 29 Aug 2007) |
3 lines
Removed merge tracking for "svnmerge" for
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
................
r6506 | mmatthews | 2007-08-29 10:03:00 -0500 (Wed, 29 Aug 2007) |
3 lines
Removed merge tracking for "svnmerge" for
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6507 | mmatthews | 2007-08-29 10:03:25 -0500 (Wed, 29 Aug 2007) |
3 lines
Removed merge tracking for "svnmerge" for
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1/connector-j
................
r6508 | mmatthews | 2007-08-29 10:03:56 -0500 (Wed, 29 Aug 2007) |
3 lines
Removed merge tracking for "svnmerge" for
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0/connector-j
................
r6512 | mmatthews | 2007-08-29 10:15:22 -0500 (Wed, 29 Aug 2007) |
3 lines
Initialized merge tracking via "svnmerge" with revisions "1-6511"
from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
................
r6514 | mmatthews | 2007-08-29 10:25:22 -0500 (Wed, 29 Aug 2007) |
3 lines
Initialized merge tracking via "svnmerge" with revisions "1-6393"
from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6515 | mmatthews | 2007-08-29 10:55:57 -0500 (Wed, 29 Aug 2007) |
501 lines
Merged revisions 6394-6514 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6394 | mmatthews | 2007-04-10 15:45:03 -0500 (Tue, 10 Apr 2007)
| 3 lines
- Fixed issue where calling getGeneratedKeys() on a prepared
statement after
calling execute() didn't always return the generated keys
(executeUpdate()
worked fine however).
........
r6396 | mmatthews | 2007-04-11 00:10:44 -0500 (Wed, 11 Apr 2007)
| 1 line
Bumped version #.
........
r6398 | mmatthews | 2007-04-17 14:28:20 -0500 (Tue, 17 Apr 2007)
| 16 lines
Pulled vendor-extension methods of Connection implementation out
into an interface to support java.sql.Wrapper
functionality from
ConnectionPoolDataSource. The vendor extensions are
javadoc'd in
the com.mysql.jdbc.Connection interface.
For those looking further into the driver implementation,
it is not
an API that is used for plugability of implementations
inside our driver
(which is why there are still references to ConnectionImpl
throughout the
code).
Incompatible change: Connection.serverPrepare(String) has
been re-named
to Connection.serverPrepareStatement() for consistency
with
Connection.clientPrepareStatement().
We've also added server and client prepareStatement()
methods that cover
all of the variants in the JDBC API.
........
r6399 | mmatthews | 2007-04-17 14:31:27 -0500 (Tue, 17 Apr 2007)
| 1 line
Sync'd up with repository.
........
r6400 | mmatthews | 2007-04-17 15:40:31 -0500 (Tue, 17 Apr 2007)
| 1 line
Switch to ConnectionImpl in a couple of places. Character sets
for some DBMD is busted in 5.0 too, so put the check for server > 5.2.
........
r6401 | mmatthews | 2007-04-18 14:23:16 -0500 (Wed, 18 Apr 2007)
| 4 lines
- Fixed issue where a failed-over connection would let an
application call
setReadOnly(false), when that call should be ignored until
the connection
is reconnected to a writable master unless "failoverReadOnly"
had been set
to "false".
........
r6402 | mmatthews | 2007-04-18 14:38:48 -0500 (Wed, 18 Apr 2007)
| 7 lines
Similar to Connection, we pulled out vendor extensions to
Statement
into an interface named "com.mysql.Statement", and moved
the Statement
class into com.mysql.StatementImpl. The two methods
(javadoc'd in
"com.mysql.Statement" are enableStreamingResults(), which
already existed,
and disableStreamingResults() which sets the statement
instance back to
the fetch size and result set type it had before
enableStreamingResults()
was called.
........
r6406 | mmatthews | 2007-04-21 21:14:34 -0500 (Sat, 21 Apr 2007)
| 1 line
Support for unwrapping on statements, prepared statements.
........
r6407 | mmatthews | 2007-04-23 16:40:24 -0500 (Mon, 23 Apr 2007)
| 1 line
Refactored wrapper.unwrap() and some various isWrapperFor()
classes for clarity.
........
r6414 | mmatthews | 2007-05-02 13:55:06 -0500 (Wed, 02 May 2007)
| 16 lines
- Fixed BUG#28085 - Generate more useful error messages for
diagnostics
when the driver thinks a result set isn't updatable. (Thanks
to Ashley Martens
for the patch -- contributed under CLA#43).
- Driver will now use INSERT INTO ... VALUES (DEFAULT) form of
statement
for updatable result sets for ResultSet.insertRow(), rather
than
pre-populating the insert row with values from
DatabaseMetaData.getColumns()
(which results in a "SHOW FULL COLUMNS" on the server for
every result
set). If an application requires access to the default values
before
insertRow() has been called, the JDBC URL should be
configured with
"populateInsertRowWithDefaultValues" set to "true".
This fix specifically targets performance issues with
ColdFusion and the
fact that it seems to ask for updatable result sets no matter
what the
application does with them.
........
r6415 | mmatthews | 2007-05-03 21:18:33 -0500 (Thu, 03 May 2007)
| 37 lines
- com.mysql.jdbc.[NonRegistering]Driver now understands URLs of
the format
"jdbc:mysql:replication://" and "jdbc:mysql:loadbalance://"
which will
create a ReplicationConnection (exactly like when
using [NonRegistering]ReplicationDriver) and an experimenal
load-balanced
connection designed for use with SQL nodes in a MySQL
Cluster/NDB environment,
respectively.
- Added an experimental load-balanced connection designed for
use with SQL nodes
in a MySQL Cluster/NDB environment (This is not for
master-slave replication.
For that, we suggest you look at ReplicationConnection or
"lbpool").
If the JDBC URL starts with
"jdbc:mysql:loadbalance://host-1,host-2,...host-n",
the driver will create an implementation of
java.sql.Connection that load
balances requests across a series of MySQL JDBC connections
to the given hosts,
where the balancing takes place after transaction commit.
Therefore, for this to work (at all), you must use
transactions, even if only
reading data.
Physical connections to the given hosts will not be
created until needed.
The driver will invalidate connections that it detects
have had
communication errors when processing a request. A new
connection to the
problematic host will be attempted the next time it is
selected by the load
balancing algorithm.
There are two choices for load balancing algorithms, which
may be specified
by the "loadBalanceStrategy" JDBC URL configuration
property:
* "random" - the driver will pick a random host for each
request. This tends
to work better than round-robin, as the randomness will
somewhat account for
spreading loads where requests vary in response time,
while round-robin
can sometimes lead to overloaded nodes if there are
variations in response times
across the workload.
* "bestResponseTime" - the driver will route the request
to the host that had
the best response time for the previous transaction.
........
r6416 | mmatthews | 2007-05-04 12:38:32 -0500 (Fri, 04 May 2007)
| 1 line
"beginningOfSlashes" used to mean "end", now it really means
"beginning", so we have to adjust where we look for the hostname.
........
r6417 | mmatthews | 2007-05-04 13:41:42 -0500 (Fri, 04 May 2007)
| 8 lines
- When "useLocalSessionState" is set to "true" and connected to
a MySQL-5.0 or
later server, the JDBC driver will now determine whether
an actual "commit" or
"rollback" statement needs to be sent to the database when
Connection.commit()
or Connection.rollback() is called.
This is especially helpful for high-load situations with
connection pools that
always call Connection.rollback() on connection
check-in/check-out because it
avoids a round-trip to the server.
........
r6418 | mmatthews | 2007-05-09 18:12:08 -0500 (Wed, 09 May 2007)
| 1 line
Remove JDK-1.5+-only constructs.
........
r6420 | mmatthews | 2007-05-09 19:53:29 -0500 (Wed, 09 May 2007)
| 1 line
Remove auto-added import (by Eclipse), removed JDK-1.5+-only
constructs.
........
r6422 | mmatthews | 2007-05-10 15:32:52 -0500 (Thu, 10 May 2007)
| 1 line
Updated release date for 5.0.6.
........
r6424 | mmatthews | 2007-05-11 16:20:14 -0500 (Fri, 11 May 2007)
| 1 line
Implement some missing JDBC-4.0 functionality, push
non-Java-6-specific code back into DatabaseMetadata.
........
r6425 | mmatthews | 2007-05-11 18:23:05 -0500 (Fri, 11 May 2007)
| 1 line
Fleshed out serializeAsCharacterStream() and serializeAsString()
methods to support all result implementations (SAX, StAX, DOM and Stream)
........
r6426 | mmatthews | 2007-05-14 14:08:11 -0500 (Mon, 14 May 2007)
| 1 line
Use testsuite statement instance for "KILL"s, makes
testFailoverReadonly more robust, less influence by timing factors.
........
r6427 | mmatthews | 2007-05-14 14:33:48 -0500 (Mon, 14 May 2007)
| 1 line
JDK-1.3.1 doesn't have DST patches, so don't try testBug3620()
in that environment.
........
r6429 | mmatthews | 2007-05-15 22:31:15 -0500 (Tue, 15 May 2007)
| 9 lines
nn-nn-07 - Version 5.0.7
- The configuration "useCursorFetch" (for MySQL-5.0+, which
enables
the use of cursors that allow Connector/J to save memory
by fetching
result set rows in chunks, set by Statement.setFetchSize()
by using
fully-materialized cursors on the server) will now
automatically
set "useServerPrepStmts" to "true" when it has been set to
"true",
since it requires server-side prepared statements in order
to
function correctly.
........
r6430 | mmatthews | 2007-05-16 16:33:00 -0500 (Wed, 16 May 2007)
| 4 lines
Fixed BUG#28469 - PreparedStatement.getMetaData() for statements
containing leading one-line comments is not returned correctly.
As part of this fix, we also overhauled detection of DML for
executeQuery() and SELECTs for executeUpdate() in plain and prepared statements to be
aware of the same types of comments.
........
r6431 | mmatthews | 2007-05-16 16:40:02 -0500 (Wed, 16 May 2007)
| 1 line
Implemented free().
........
r6433 | mmatthews | 2007-05-18 13:38:56 -0500 (Fri, 18 May 2007)
| 17 lines
- Added configuration property "useNanosForElapsedTime" - for
profiling/debugging functionality that measures elapsed
time,
should the driver try to use nanoseconds resolution if
available
(requires JDK >= 1.5)?
- Added configuration property "slowQueryThresholdNanos" -
if
"useNanosForElapsedTime" is set to "true", and this
property
is set to a non-zero value the driver will use this
threshold
(in nanosecond units) to determine if a query was slow,
instead
of using millisecond units.
Note, that if "useNanosForElapsedTime" is set to "true",
and this
property is set to "0" (or left default), then elapsed
times will
still be measured in nanoseconds (if possible), but the
slow query
threshold will be converted from milliseconds to
nanoseconds, and thus
have an upper bound of approximately 2000 millesconds (as
that threshold
is represented as an integer, not a long).
........
r6434 | mmatthews | 2007-05-18 13:48:07 -0500 (Fri, 18 May 2007)
| 19 lines
- Added configuration properties to allow tuning of TCP/IP
socket parameters:
"tcpNoDelay" - Should the driver set SO_TCP_NODELAY
(disabling the
Nagle Algorithm, default "true")?
"tcpKeepAlive" - Should the driver set SO_KEEPALIVE (default
"true")?
"tcpRcvBuf" - Should the driver set SO_RCV_BUF to the given
value?
The default value of '0', means use the platform
default
value for this property.
"tcpSndBuf" - Should the driver set SO_SND_BUF to the given
value?
The default value of '0', means use the platform
default
value for this property.
"tcpTrafficClass" - Should the driver set traffic class or
type-of-service fields? See the
documentation
for java.net.Socket.setTrafficClass() for
more
information.
........
r6435 | mmatthews | 2007-05-18 13:56:46 -0500 (Fri, 18 May 2007)
| 1 line
First cut at statement interceptors, need to make them
pluggable, and provide something other than a "null" example (caching, "SHOW profile" or
"SHOW STATUS" diffs perhaps?)
........
r6436 | mmatthews | 2007-05-23 17:43:02 -0500 (Wed, 23 May 2007)
| 1 line
Append space after table name if whereClause is specified or
non-null in getSingleValue().
........
r6437 | mmatthews | 2007-05-24 15:17:01 -0500 (Thu, 24 May 2007)
| 7 lines
Added experimental support for statement "interceptors" via the
com.mysql.jdbc.StatementInterceptor interface, examples are in
com/mysql/jdbc/interceptors.
Implement this interface to be placed "in between" query
execution, so that you can influence it. (currently experimental, the API is still open
to being modified).
StatementInterceptors are "chainable" when configured by the
user, the results returned by the "current" interceptor will be passed on to the next on
in the chain, from left-to-right order, as specified by the user in the JDBC
configuration property "statementInterceptors".
See the sources (fully javadoc'd) for
com.mysql.jdbc.StatementInterceptor for more details until we iron out the API and get it
documented in the manual.
........
r6438 | mmatthews | 2007-05-25 15:16:06 -0500 (Fri, 25 May 2007)
| 1 line
Fix issue with parsing /* ... */ comments that occur at
end-of-line.
........
r6439 | mmatthews | 2007-05-25 15:39:18 -0500 (Fri, 25 May 2007)
| 4 lines
Give more information in EOFExceptions thrown out of MysqlIO
(how many bytes the driver expected to read, how many it actually read, say that
communications with the server were unexpectedly lost).
Removed a couple of extra byte[] allocations when reading the
packet header for split packets (we can reuse the existing buffer for these).
........
r6440 | mmatthews | 2007-05-30 12:27:36 -0500 (Wed, 30 May 2007)
| 1 line
Pickup the thread ID immediately after successful handshake,
rather than waiting for initialization of server variables (to make debugging/tracing
more correct).
........
r6441 | mmatthews | 2007-06-04 14:18:23 -0500 (Mon, 04 Jun 2007)
| 5 lines
- Setting "useDynamicCharsetInfo" to "false" now causes driver
to use
static lookups for collations as well (makes
ResultSetMetadata.isCaseSensitive() much more efficient,
which leads
to performance increase for ColdFusion, which calls this
method for
every column on every table it sees, it appears).
........
r6442 | mmatthews | 2007-06-05 12:56:41 -0500 (Tue, 05 Jun 2007)
| 1 line
Externalized the descriptions of connection properties.
........
r6443 | mmatthews | 2007-06-06 11:23:46 -0500 (Wed, 06 Jun 2007)
| 1 line
Added target to generate error mapping and connection properties
docs in one go.
........
r6444 | mmatthews | 2007-06-06 14:16:30 -0500 (Wed, 06 Jun 2007)
| 4 lines
C3P0 >= version 0.9.1 passes non-proxied connections to
MysqlConnectionTester, thus it began throwing
ClassCastExceptions.
MysqlConnectionTester now checks if it has a plain Connection
and uses
that if possible. Thanks to Brian Skrab for the fix.
........
r6445 | mmatthews | 2007-06-07 10:25:59 -0500 (Thu, 07 Jun 2007)
| 5 lines
The data (and how it's stored) for ResultSet rows are now behind
an
interface which allows us (in some cases) to allocate less
memory
per row, in that for "streaming" result sets, we re-use
the packet
used to read rows, since only one row at a time is ever
active.
(tbd: deal with dates/times efficiently, timestamps
already covered).
........
r6446 | mmatthews | 2007-06-07 10:30:07 -0500 (Thu, 07 Jun 2007)
| 1 line
Made it possible to retrieve prepared statement parameter
bindings (to be used in StatementInterceptors, primarily).
........
r6447 | mmatthews | 2007-06-07 10:37:52 -0500 (Thu, 07 Jun 2007)
| 1 line
Tests for PreparedStatementBindings
........
r6448 | mmatthews | 2007-06-07 10:40:36 -0500 (Thu, 07 Jun 2007)
| 1 line
Updated changelog to reflect RowHolder refactoring, and
PreparedStatementBindings implementation.
........
r6449 | mmatthews | 2007-06-14 11:11:19 -0500 (Thu, 14 Jun 2007)
| 3 lines
Implementations of all "complex" types for result sets now
represented in RowHolders.
Added "direct" row unpack (bypassing packet code) in
MysqlIO.nextRow(), 2x speedup for this method (doesn't equate to 2x speedup in the
driver, but there is a performance increase of around 5-10% for most use cases).
........
r6450 | mmatthews | 2007-06-14 20:10:23 -0500 (Thu, 14 Jun 2007)
| 3 lines
Setting "rewriteBatchedStatements" to "true" now causes
CallableStatements
with batched arguments to be re-written in the form "CALL
(...); CALL (...); ..."
to send the batch in as few client-server round trips as
possible.
........
r6451 | mmatthews | 2007-06-14 20:24:27 -0500 (Thu, 14 Jun 2007)
| 5 lines
Some renames around the Row(Holder) classes.
Row navigation now causes any streams/readers open on the result
set
to be closed, as in some cases we're reading directly from
a shared network
packet and it will be overwritten by the "next" row.
........
r6452 | mmatthews | 2007-06-14 20:25:41 -0500 (Thu, 14 Jun 2007)
| 1 line
Updated to reflect streams and row navigation, and notice of
rewriteBatch for CallableStatement.
........
r6453 | mmatthews | 2007-06-21 11:56:08 -0500 (Thu, 21 Jun 2007)
| 4 lines
Driver detects when it is running in a ColdFusion MX server
(tested
with version 7), and uses the configuration bundle
"coldFusion",
which sets useDynamicCharsetInfo to "false" (see previous
entry), and
sets useLocalSessionState and autoReconnect to "true".
........
r6454 | mmatthews | 2007-06-21 12:03:53 -0500 (Thu, 21 Jun 2007)
| 7 lines
Driver now picks appropriate internal row representation (whole
row in one
buffer, or individual byte[]s for each column value)
depending on heuristics,
including whether or not the row has BLOB or TEXT types
and the overall
row-size. The threshold for row size that will cause the
driver to
use a buffer rather than individual byte[]s is configured
by the
configuration property "largeRowSizeThreshold", which has
a default
value of 2KB.
........
r6455 | mmatthews | 2007-06-21 12:06:17 -0500 (Thu, 21 Jun 2007)
| 1 line
Removed spurious printStackTrace().
........
r6456 | mmatthews | 2007-06-21 12:07:10 -0500 (Thu, 21 Jun 2007)
| 1 line
Added "alpha" flag to version.
........
r6457 | mmatthews | 2007-06-21 13:47:21 -0500 (Thu, 21 Jun 2007)
| 1 line
5.0 server required for this test.
........
r6458 | mmatthews | 2007-06-21 14:09:42 -0500 (Thu, 21 Jun 2007)
| 1 line
Removed non-bug test.
........
r6459 | mmatthews | 2007-06-22 08:53:18 -0500 (Fri, 22 Jun 2007)
| 1 line
Added 5.1.1 release date. Updated changelog notes.
........
r6464 | mmatthews | 2007-06-22 09:41:18 -0500 (Fri, 22 Jun 2007)
| 1 line
Fixed up substitutions in connection properties messages.
........
r6466 | mmatthews | 2007-06-22 10:53:55 -0500 (Fri, 22 Jun 2007)
| 1 line
Fixed alpha specifier.
........
r6469 | mmatthews | 2007-06-24 20:39:41 -0500 (Sun, 24 Jun 2007)
| 1 line
bumped version # and release status.
........
r6471 | mmatthews | 2007-06-28 11:18:10 -0500 (Thu, 28 Jun 2007)
| 7 lines
- Fixed BUG#28851 - parser in client-side prepared statements
eats character following '/' if it's not a multi-line
comment.
- Fixed BUG#28596 - parser in client-side prepared statements
runs to end of statement, rather than end-of-line for '#'
comments.
Also added support for '--' single-line comments.
........
r6472 | mmatthews | 2007-06-28 15:01:19 -0500 (Thu, 28 Jun 2007)
| 6 lines
Setting the configuration property "rewriteBatchedStatements"
to "true" will now cause the driver to rewrite batched
prepared
statements with more than 3 parameter sets in a batch into
multi-statements (separated by ";") if they are not plain
(i.e. without SELECT or ON DUPLICATE KEY UPDATE clauses)
INSERT
or REPLACE statements.
........
r6475 | mmatthews | 2007-07-03 20:21:38 -0500 (Tue, 03 Jul 2007)
| 1 line
Bumped version # for next release.
........
r6477 | mmatthews | 2007-07-03 20:37:38 -0500 (Tue, 03 Jul 2007)
| 1 line
Set properties for svnmerge
........
r6480 | mmatthews | 2007-07-04 00:47:23 -0500 (Wed, 04 Jul 2007)
| 15 lines
- Setting "useBlobToStoreUTF8OutsideBMP" to "true" tells the
driver to treat [MEDIUM/LONG]BLOB columns as [LONG]VARCHAR
columns holding text encoded in UTF-8 that has characters
outside the BMP (4-byte encodings), which MySQL server
can't handle natively.
Set "utf8OutsideBmpExcludedColumnNamePattern" to a regex so
that
column names matching the given regex will still be treated
as BLOBs The regex must follow the patterns used for the
java.util.regex package. The default is to exclude no
columns,
and include all columns.
Set "utf8OutsideBmpIncludedColumnNamePattern" to specify
exclusion
rules to "utf8OutsideBmpExcludedColumnNamePattern". The regex
must
follow the patterns used for the java.util.regex package.
........
r6487 | mmatthews | 2007-07-17 22:34:57 -0500 (Tue, 17 Jul 2007)
| 1 line
Merges from 5.0.
........
r6488 | mmatthews | 2007-07-17 22:40:05 -0500 (Tue, 17 Jul 2007)
| 1 line
Fixed typo in bug#.
........
r6492 | mmatthews | 2007-07-18 15:51:25 -0500 (Wed, 18 Jul 2007)
| 1 line
Fix broken import...Eclipse didn't complain about compiling it
or running tests earlier!?
........
r6493 | mmatthews | 2007-07-18 16:17:46 -0500 (Wed, 18 Jul 2007)
| 1 line
Don't create Maven bundles for commercial builds. They're not
needed.
........
r6494 | mmatthews | 2007-08-08 20:59:55 -0500 (Wed, 08 Aug 2007)
| 23 lines
New methods on com.mysql.jdbc.Statement:
setLocalInfileInputStream()
and getLocalInfileInputStream().
setLocalInfileInputStream() sets an InputStream instance that
will be used to send data
to the MySQL server for a "LOAD DATA LOCAL INFILE"
statement
rather than a FileInputStream or URLInputStream that
represents
the path given as an argument to the statement.
This stream will be read to completion upon execution of a
"LOAD DATA LOCAL INFILE" statement, and will automatically
be closed by the driver, so it needs to be reset
before each call to execute*() that would cause the MySQL
server to request data to fulfill the request for
"LOAD DATA LOCAL INFILE".
If this value is set to NULL, the driver will revert to
using
a FileInputStream or URLInputStream as required.
getLocalInfileInputStream() returns the InputStream
instance that will be used to send
data in response to a "LOAD DATA LOCAL INFILE" statement.
This method returns NULL if no such stream has been set
via setLocalInfileInputStream().
........
r6496 | mmatthews | 2007-08-13 15:22:33 -0500 (Mon, 13 Aug 2007)
| 4 lines
- The driver now connects with an initial character set
of "utf-8" solely for the purposes of authentication to
allow usernames and database names in any character set to
be used in the JDBC URL.
........
r6497 | mmatthews | 2007-08-20 16:27:49 -0500 (Mon, 20 Aug 2007)
| 1 line
Some work to support multiple table updatable result sets. None
of this is exposed to the enduser (yet), just the scaffolding to hold it up.
........
r6499 | mcbrown | 2007-08-29 09:11:48 -0500 (Wed, 29 Aug 2007) |
3 lines
Correcting some typos in descriptions
........
r6509 | mmatthews | 2007-08-29 10:04:49 -0500 (Wed, 29 Aug 2007)
| 3 lines
Removed merge tracking for "svnmerge" for
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk/connector-j
........
r6510 | mmatthews | 2007-08-29 10:05:32 -0500 (Wed, 29 Aug 2007)
| 3 lines
Initialized merge tracking via "svnmerge" with revisions
"1-6392" from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
........
r6513 | mmatthews | 2007-08-29 10:23:58 -0500 (Wed, 29 Aug 2007)
| 1 line
Merges from 5.0.
........
................
r6516 | mmatthews | 2007-08-29 11:05:32 -0500 (Wed, 29 Aug 2007) |
1 line
Post-merge fixups.
................
r6519 | mmatthews | 2007-08-29 11:21:21 -0500 (Wed, 29 Aug 2007) |
1 line
Updated changelogs for bug 30550.
................
r6520 | mmatthews | 2007-08-29 11:27:40 -0500 (Wed, 29 Aug 2007) |
9 lines
Merged revisions 6515-6517 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6517 | mmatthews | 2007-08-29 11:14:04 -0500 (Wed, 29 Aug 2007)
| 1 line
Merge of fix for Bug 30550.
........
................
................
r6530 | mmatthews | 2007-08-29 14:42:13 -0500 (Wed, 29 Aug 2007) |
18 lines
Merged revisions
6393-6396,6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6529
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6529 | mmatthews | 2007-08-29 14:31:44 -0500 (Wed, 29 Aug 2007) |
11 lines
Merged revisions 6525-6528 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6528 | mmatthews | 2007-08-29 14:27:12 -0500 (Wed, 29 Aug 2007)
| 2 lines
Fixed BUG#29106 - Connection checker for JBoss didn't use same
method parameters
via reflection, causing connections to always seem "bad".
........
................
................
r6533 | mmatthews | 2007-08-30 10:52:01 -0500 (Thu, 30 Aug 2007) |
24 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6532
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6532 | mmatthews | 2007-08-30 10:32:10 -0500 (Thu, 30 Aug 2007) |
17 lines
Merged revisions 6531 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6531 | mmatthews | 2007-08-30 10:21:06 -0500 (Thu, 30 Aug 2007)
| 5 lines
Fixed BUG#30664. Note that this fix only works for MySQL server
versions 5.0.25 and newer, since earlier versions didn't
consistently
return correct metadata for functions, and thus results
from
subqueries and functions were indistinguishable from each
other,
leading to type-related bugs.
........
................
................
r6536 | mmatthews | 2007-08-30 15:56:36 -0500 (Thu, 30 Aug 2007) |
20 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6535
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6535 | mmatthews | 2007-08-30 15:52:15 -0500 (Thu, 30 Aug 2007) |
13 lines
Merged revisions 6529-6530,6532-6534 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6534 | mmatthews | 2007-08-30 15:46:47 -0500 (Thu, 30 Aug 2007)
| 3 lines
Fixed BUG#28972, DatabaseMetaData.getTypeInfo() for the types
DECIMAL
and NUMERIC will return a precision of 254 for server
versions older than
5.0.3, 64 for versions 5.0.3-5.0.5 and 65 for versions
newer than 5.0.5.
........
................
................
r6539 | mmatthews | 2007-08-30 16:49:56 -0500 (Thu, 30 Aug 2007) |
20 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6538
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6538 | mmatthews | 2007-08-30 16:39:03 -0500 (Thu, 30 Aug 2007) |
13 lines
Merged revisions 6535-6537 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6537 | mmatthews | 2007-08-30 16:26:34 -0500 (Thu, 30 Aug 2007)
| 3 lines
Fixed BUG#29852 - Closing a load-balanced connection would cause
a
ClassCastException.
........
................
................
r6543 | mmatthews | 2007-08-30 20:22:50 -0500 (Thu, 30 Aug 2007) |
24 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6542
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6541 | mmatthews | 2007-08-30 20:15:59 -0500 (Thu, 30 Aug 2007) |
13 lines
Merged revisions 6538-6540 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6540 | mmatthews | 2007-08-30 19:50:39 -0500 (Thu, 30 Aug 2007)
| 3 lines
Fixed BUG#27867 - Schema objects with identifiers other than
the connection character aren't retrieved correctly in
ResultSetMetadata.
........
................
r6542 | mmatthews | 2007-08-30 20:17:04 -0500 (Thu, 30 Aug 2007) |
1 line
Post-merge fixups.
................
................
r6547 | mmatthews | 2007-09-04 12:34:45 -0500 (Tue, 04 Sep 2007) |
28 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6546
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6546 | mmatthews | 2007-09-04 12:31:26 -0500 (Tue, 04 Sep 2007) |
21 lines
Merged revisions 6545 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6545 | mmatthews | 2007-09-04 11:54:36 -0500 (Tue, 04 Sep 2007)
| 7 lines
Fixed BUG#28689 - CallableStatement.executeBatch() doesn't work
when
connection property "noAccessToProcedureBodies" has been
set to "true".
The fix involves changing the behavior of
"noAccessToProcedureBodies",in
that the driver will now report all paramters as "IN"
paramters
but allow callers to call registerOutParameter() on them
without throwing
an exception.
........
................
................
r6552 | mmatthews | 2007-09-04 13:40:35 -0500 (Tue, 04 Sep 2007) |
35 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547-6551
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6548 | mmatthews | 2007-09-04 12:41:10 -0500 (Tue, 04 Sep 2007) |
9 lines
Merged revisions 6544 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6544 | mcbrown | 2007-08-31 01:14:57 -0500 (Fri, 31 Aug 2007) |
3 lines
Updating the XSL transform for the errors table
........
................
r6551 | mmatthews | 2007-09-04 13:36:20 -0500 (Tue, 04 Sep 2007) |
17 lines
Merged revisions 6541-6544,6546-6550 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6549 | mmatthews | 2007-09-04 12:48:14 -0500 (Tue, 04 Sep 2007)
| 2 lines
Fixed BUG#27182 - Connection.getServerCharacterEncoding()
doesn't work
for servers with version >= 4.1.
........
r6550 | mmatthews | 2007-09-04 13:28:45 -0500 (Tue, 04 Sep 2007)
| 2 lines
Fixed BUG#27915 - DatabaseMetaData.getColumns() doesn't
contain SCOPE_* or IS_AUTOINCREMENT columns.
........
................
................
r6553 | mmatthews | 2007-09-04 13:48:51 -0500 (Tue, 04 Sep 2007) | 1
line
Preparing for release of 5.1.3 RC.
................
r6557 | mmatthews | 2007-09-04 16:50:39 -0500 (Tue, 04 Sep 2007) |
20 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6556
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6556 | mmatthews | 2007-09-04 16:39:47 -0500 (Tue, 04 Sep 2007) |
13 lines
Merged revisions 6551-6555 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6554 | mmatthews | 2007-09-04 16:17:57 -0500 (Tue, 04 Sep 2007)
| 1 line
Fixed BUG#21116, revision not updated in DBMD.getDriverVersion()
when released (we now stuff in the svn revision of the directory).
........
r6555 | mmatthews | 2007-09-04 16:19:51 -0500 (Tue, 04 Sep 2007)
| 1 line
Allow source builds to work, even if not checked out from SVN.
........
................
................
r6558 | mmatthews | 2007-09-04 18:27:09 -0500 (Tue, 04 Sep 2007) | 1
line
Post-merge fixups.
................
r6559 | mmatthews | 2007-09-04 18:27:34 -0500 (Tue, 04 Sep 2007) | 1
line
Fixups for 5.1.
................
r6560 | mmatthews | 2007-09-04 18:31:01 -0500 (Tue, 04 Sep 2007) | 1
line
A nicer toString().
................
r6561 | mmatthews | 2007-09-05 10:59:46 -0500 (Wed, 05 Sep 2007) |
19 lines
Errors encountered during
Statement/PreparedStatement/CallableStatement.executeBatch()
when "rewriteBatchStatements" has been set to "true" now
return
BatchUpdateExceptions according to the setting of
"continueBatchOnError".
If "continueBatchOnError" is set to "true", the update counts
for the
"chunk" that were sent as one unit will all be set to
EXECUTE_FAILED, but
the driver will attempt to process the remainder of the batch.
You can determine which
"chunk" failed by looking at the update counts returned in the
BatchUpdateException.
If "continueBatchOnError" is set to "false", the update counts
returned
will contain the failed "chunk", and stop with the failed
chunk, with all
counts for the failed "chunk" set to EXECUTE_FAILED.
Since MySQL doesn't return multiple error codes for
multiple-statements, or
for multi-value INSERT/REPLACE, it is the application's
responsibility to handle
determining which item(s) in the "chunk" actually failed.
- Statement.setQueryTimeout()s now affect the entire batch for
batched
statements, rather than the individual statements that make up
the batch.
................
r6562 | mmatthews | 2007-09-05 11:02:17 -0500 (Wed, 05 Sep 2007) | 1
line
After some refactorings of the character set handling code,
changeUser() wasn't resetting the character set after the server cleared it.
................
r6566 | mmatthews | 2007-09-06 09:14:17 -0500 (Thu, 06 Sep 2007) |
20 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6565
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6565 | mmatthews | 2007-09-06 09:07:15 -0500 (Thu, 06 Sep 2007) |
13 lines
Merged revisions 6556-6564 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6563 | mmatthews | 2007-09-06 09:02:01 -0500 (Thu, 06 Sep 2007)
| 1 line
Fixed BUG#30851, NPE with null column values when
"padCharsWithSpace" is set to "true".
........
r6564 | mmatthews | 2007-09-06 09:03:59 -0500 (Thu, 06 Sep 2007)
| 1 line
Tags for inserting revision created.
........
................
................
................
r6568 | mmatthews | 2007-09-06 10:42:38 -0500 (Thu, 06 Sep 2007) | 1
line
Post-merge fixups (don't trust tortoise merge again!)
................
r6570 | mmatthews | 2007-09-06 14:01:57 -0500 (Thu, 06 Sep 2007) | 17
lines
Merged revisions 6565-6569 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6569 | mmatthews | 2007-09-06 13:42:19 -0500 (Thu, 06 Sep 2007) | 5
lines
Specifying a "validation query" in your connection pool
that starts with "/* ping */" _exactly_ will cause the driver
to
instead send a ping to the server and return a fake result set
(much
lighter weight), and when using a ReplicationConnection or a
LoadBalancedConnection,
will send the ping across all active connections.
........
................
r6571 | mmatthews | 2007-09-06 14:28:31 -0500 (Thu, 06 Sep 2007) | 1
line
Post-merge fixups. Too bad svnmerge requires pristine trees, doesn't
play well with an Eclipse workspace :(
................
................
r6575 | mmatthews | 2007-09-07 09:12:54 -0500 (Fri, 07 Sep 2007) | 18
lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572-6574
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6573 | mmatthews | 2007-09-07 09:01:45 -0500 (Fri, 07 Sep 2007) | 11
lines
Merged revisions 6570-6572 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6572 | mmatthews | 2007-09-07 08:48:19 -0500 (Fri, 07 Sep 2007) | 2
lines
- Fixed Bug#30892 setObject(int, Object, int, int) delegate in
PreparedStatmentWrapper delegates to wrong method.
........
................
................
r6587 | mmatthews | 2007-09-15 15:58:27 -0500 (Sat, 15 Sep 2007) | 6
lines
Added "autoSlowLog" configuration property, overrides
"slowQueryThreshold*" properties, driver determines slow
queries by those that are slower than 5 * stddev of the mean
query time (outside the 96% percentile).
Externalized some utf-8 related connection property descriptions.
................
r6588 | mmatthews | 2007-09-15 16:01:29 -0500 (Sat, 15 Sep 2007) | 3
lines
Only update row "validity" on navigation, reduces time spent in value
retrieval when seeing if we're on a valid row or not.
Moved a hot method call (to get a configuration that stays the same for
the lifetime of a connection) to a field that is set during instantiation.
................
r6589 | mmatthews | 2007-09-15 21:05:52 -0500 (Sat, 15 Sep 2007) | 1
line
Added mapings for new 4-byte utf8, utf16 and utf32 collations/charsets
for 5.2/6.0 server.
................
r6590 | mmatthews | 2007-09-26 05:28:04 -0500 (Wed, 26 Sep 2007) | 1
line
Added ability to hook into connection lifecycle events via an extension
interface.
................
r6591 | mmatthews | 2007-09-26 05:30:30 -0500 (Wed, 26 Sep 2007) | 1
line
Added actual interface you need to _implement_ for
StatementInterceptors.
................
r6592 | mmatthews | 2007-09-26 06:44:41 -0500 (Wed, 26 Sep 2007) | 1
line
Clarification of utf-8 blob mappings for the TINYBLOB type.
................
r6598 | mmatthews | 2007-10-02 14:55:49 -0500 (Tue, 02 Oct 2007) | 115
lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6597
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6578 | mmatthews | 2007-09-07 11:36:32 -0500 (Fri, 07 Sep 2007) | 13
lines
Merged revisions 6576-6577 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6576 | mmatthews | 2007-09-07 11:11:05 -0500 (Fri, 07 Sep 2007) | 1
line
Deal with stored procedures using user variables, and thus calling
byteArrayToBoolean() when we're really dealing with an ASCII string but can't tell (so
look for '1' and '0' first).
........
r6577 | mmatthews | 2007-09-07 11:12:04 -0500 (Fri, 07 Sep 2007) | 1
line
Added charset information to .toString() output.
........
................
r6585 | mmatthews | 2007-09-11 23:02:40 -0500 (Tue, 11 Sep 2007) | 9
lines
Merged revisions 6584 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6584 | mcbrown | 2007-09-11 09:28:15 -0500 (Tue, 11 Sep 2007) | 3
lines
Fixing the description of jdbcCompliantTruncation
........
................
r6586 | mmatthews | 2007-09-11 23:03:37 -0500 (Tue, 11 Sep 2007) | 8
lines
Blocked revisions 6583 via svnmerge
........
r6583 | mmatthews | 2007-09-10 12:47:08 -0500 (Mon, 10 Sep 2007) | 1
line
Bumped version #.
........
................
r6593 | mmatthews | 2007-09-26 07:02:47 -0500 (Wed, 26 Sep 2007) | 43
lines
Merged revisions 6587-6592 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6587 | mmatthews | 2007-09-15 15:58:27 -0500 (Sat, 15 Sep 2007) | 6
lines
Added "autoSlowLog" configuration property, overrides
"slowQueryThreshold*" properties, driver determines slow
queries by those that are slower than 5 * stddev of the mean
query time (outside the 96% percentile).
Externalized some utf-8 related connection property descriptions.
........
r6588 | mmatthews | 2007-09-15 16:01:29 -0500 (Sat, 15 Sep 2007) | 3
lines
Only update row "validity" on navigation, reduces time spent in
value retrieval when seeing if we're on a valid row or not.
Moved a hot method call (to get a configuration that stays the same
for the lifetime of a connection) to a field that is set during instantiation.
........
r6589 | mmatthews | 2007-09-15 21:05:52 -0500 (Sat, 15 Sep 2007) | 1
line
Added mapings for new 4-byte utf8, utf16 and utf32
collations/charsets for 5.2/6.0 server.
........
r6590 | mmatthews | 2007-09-26 05:28:04 -0500 (Wed, 26 Sep 2007) | 1
line
Added ability to hook into connection lifecycle events via an
extension interface.
........
r6591 | mmatthews | 2007-09-26 05:30:30 -0500 (Wed, 26 Sep 2007) | 1
line
Added actual interface you need to _implement_ for
StatementInterceptors.
........
r6592 | mmatthews | 2007-09-26 06:44:41 -0500 (Wed, 26 Sep 2007) | 1
line
Clarification of utf-8 blob mappings for the TINYBLOB type.
........
................
r6596 | mmatthews | 2007-10-02 14:46:56 -0500 (Tue, 02 Oct 2007) | 9
lines
Merged revisions 6594 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6594 | mmatthews | 2007-10-01 10:14:53 -0500 (Mon, 01 Oct 2007) | 1
line
XAConnections now start in auto-commit mode (as per JDBC-4.0
specification clarification).
........
................
r6597 | mmatthews | 2007-10-02 14:49:47 -0500 (Tue, 02 Oct 2007) | 16
lines
Merged revisions 6573-6593,6595-6596 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6579 | mmatthews | 2007-09-07 12:31:06 -0500 (Fri, 07 Sep 2007) | 2
lines
Blocked revisions
3986-3990,4009-4020,4024,4046,4050,4053-4058,4067,4095,4097-4098,4122-4130,4135,4159-4160,4162,4164-4165,4178,4209,4243-4245,4256-4258,4265,4287,4291,4296-4297,4307-4308,4336,4354-4358,4374,4378,4388-4389,4420,4471,4500,4503,4505,4523,4533,4553,4558-4559,4564-4565,4567,4580,4586-4587,4590,4592-4593,4595-4596,4601,4618-4619,4621,4623,4626-4627,4637,4662-4663,4680,4705,4707,4709,4715,4717-4718,4720,4722-4723,4773,4815,4819-4822,4873,4887,4906,4945,4971,4983-4984,5024,5034-5037,5040,5044,5052,5120-5125,5127-5129,5184-5185,5187-5188,5207,5247,5312-5323,5327,5332,5335,5389,5391-5393,5400-5401,5403,5446,5511,5524,5526,5530-5531,5554-5555,5639,5682,5833,5850,5852-5853,5866,5888-5892,5898-5900,5907,5917,5935,6035,6083,6095-6096,6132,6307,6348,6371,6427,6436,6444,6493
via svnmerge
[removed log messages to not trip up the bugs system]
........
r6595 | mmatthews | 2007-10-02 14:36:55 -0500 (Tue, 02 Oct 2007) | 2
lines
Fixed Bug#27412 - cached metadata with PreparedStatement.execute()
throws NullPointerException.
........
................
................
r6603 | mmatthews | 2007-10-03 09:58:39 -0500 (Wed, 03 Oct 2007) | 38
lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6602
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6602 | mmatthews | 2007-10-03 09:51:58 -0500 (Wed, 03 Oct 2007) | 31
lines
Merged revisions 6597-6601 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6599 | mmatthews | 2007-10-02 17:34:20 -0500 (Tue, 02 Oct 2007) | 3
lines
Driver will now fall back to sane defaults for max_allowed_packet
and
net_buffer_length if the server reports them incorrectly (and
will log
this situation at WARN level, since it's actually an error
condition).
........
r6600 | mmatthews | 2007-10-02 17:35:59 -0500 (Tue, 02 Oct 2007) | 1
line
Off by one error in error message indexing.
........
r6601 | mmatthews | 2007-10-03 09:24:12 -0500 (Wed, 03 Oct 2007) | 6
lines
Fixed BUG#27916 - UNSIGNED types not reported via
DBMD.getTypeInfo(), and
capitalization of type names is not consistent between
DBMD.getColumns(),
RSMD.getColumnTypeName() and DBMD.getTypeInfo().
This fix also ensures that the precision of UNSIGNED MEDIUMINT
and UNSIGNED BIGINT is reported correctly via
DBMD.getColumns().
........
................
................
r6604 | mmatthews | 2007-10-03 10:13:11 -0500 (Wed, 03 Oct 2007) | 1
line
Post merge fixup, putting back removed properties.
................
r6606 | mmatthews | 2007-10-03 11:10:51 -0500 (Wed, 03 Oct 2007) | 1
line
Convert to using RowHolders for getTypeInfo() - missed in merge.
................
................
................
r6611 | mmatthews | 2007-10-03 13:53:55 -0500 (Wed, 03 Oct 2007) | 3 lines
Fixed BUG#28256 - When connection is in read-only mode,
queries that are wrapped in parentheses incorrectly identified
as DML.
................
................
r6615 | mmatthews | 2007-10-04 14:50:37 -0500 (Thu, 04 Oct 2007) | 25 lines
Merged revisions 6608-6614 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6614 | mmatthews | 2007-10-04 14:31:52 -0500 (Thu, 04 Oct 2007) | 9 lines
Fixed BUG#31053 - Connections established using URLs of the form
"jdbc:mysql:loadbalance://" weren't doing failover if they tried to
connect to a MySQL server that was down. The driver now attempts
connections to the next "best" (depending on the load balance strategy
in use) server, and continues to attempt connecting to the next "best"
server every 250 milliseconds until one is found that is up and
running
or 5 minutes has passed.
If the driver gives up, it will throw the last-received SQLException.
........
................
r6616 | mmatthews | 2007-10-04 14:57:22 -0500 (Thu, 04 Oct 2007) | 11 lines
Merged revisions 6585-6586,6593-6597,6599-6602,6605,6607-6609,6612-6615 via
svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6613 | mmatthews | 2007-10-04 11:56:05 -0500 (Thu, 04 Oct 2007) | 2 lines
JDBC-4.0-ize the wrappers for ConnectionPoolDataSource, and add a interface
implementation test...Oddly enough the Java compiler doesn't re-check already compiled
classes to make sure they implement all methods in an interface. Our JDBC-4.0
implementations extend
classes that were compiled with a compiler that only knows JDBC-3.0, and
thus any missing methods show up at runtime, not compile time.
........
................
................
r6622 | mmatthews | 2007-10-05 14:05:36 -0500 (Fri, 05 Oct 2007) | 1 line
Bumped version #.
................
r6628 | mmatthews | 2007-10-05 19:39:17 -0500 (Fri, 05 Oct 2007) | 28 lines
Merged revisions
6398-6402,6405-6407,6414-6473,6475,6477,6480,6483-6486,6489-6492,6496-6500,6509-6511,6513,6517-6518,6521-6522,6524,6526-6528,6530-6531,6533-6534,6536-6537,6539-6540,6543-6545,6547,6549-6550,6552-6555,6557-6564,6566,6569,6572,6574-6577,6579-6584,6587-6592,6594-6595,6598-6601,6603-6604,6606-6607,6610-6611,6613-6614,6617-6627
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/trunk
................
r6626 | mmatthews | 2007-10-05 19:06:45 -0500 (Fri, 05 Oct 2007) | 17 lines
Merged revisions 6615-6625 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6617 | mmatthews | 2007-10-04 15:43:49 -0500 (Thu, 04 Oct 2007) | 1 line
Updated release date.
........
r6624 | mmatthews | 2007-10-05 18:44:33 -0500 (Fri, 05 Oct 2007) | 1 line
Bumped version number.
........
r6625 | mmatthews | 2007-10-05 18:44:58 -0500 (Fri, 05 Oct 2007) | 1 line
Driver now calls SocketFactory.afterHandshake() at appropriate time.
........
................
r6627 | mmatthews | 2007-10-05 19:10:50 -0500 (Fri, 05 Oct 2007) | 1 line
JDBC-4.0-ize our CommunicationsException when calling
SocketFactory.afterHandshake().
................
................
r6629 | mmatthews | 2007-10-08 09:56:30 -0500 (Mon, 08 Oct 2007) | 1 line
We shouldn't use a registering driver here, it will foul up further connections
to the replication URL.
................
r6630 | mmatthews | 2007-10-09 11:46:46 -0500 (Tue, 09 Oct 2007) | 1 line
Bumped version number.
................
r6631 | mmatthews | 2007-10-11 15:01:16 -0500 (Thu, 11 Oct 2007) | 1 line
JDBC-4.0-ized XAConnections and datasources.
................
................
................
r6634 | mmatthews | 2007-10-11 15:40:27 -0500 (Thu, 11 Oct 2007) | 1 line
Changed layout
................
r6635 | mmatthews | 2007-10-11 15:41:33 -0500 (Thu, 11 Oct 2007) | 1 line
removed empty directory
................
................
r6638 | mmatthews | 2007-10-11 16:09:45 -0500 (Thu, 11 Oct 2007) | 8 lines
Blocked revisions 6637 via svnmerge
........
r6637 | mmatthews | 2007-10-11 16:04:05 -0500 (Thu, 11 Oct 2007) | 1 line
Changed layout
........
................
r6641 | mmatthews | 2007-10-17 19:01:46 -0500 (Wed, 17 Oct 2007) | 13 lines
Merged revisions
6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6617,6619-6620,6623-6627,6632,6636-6640
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6639 | mmatthews | 2007-10-17 18:19:57 -0500 (Wed, 17 Oct 2007) | 1 line
Renamed project (trunk -> 5.1), renamed ant builder and specfied a 1.5
_environment_ instead of a specific VM.
........
r6640 | mmatthews | 2007-10-17 18:20:16 -0500 (Wed, 17 Oct 2007) | 1 line
Renamed project (trunk -> 5.1), renamed ant builder and specfied a 1.5
_environment_ instead of a specific VM.
........
................
r6649 | mmatthews | 2007-10-23 13:01:29 -0500 (Tue, 23 Oct 2007) | 49 lines
Merged revisions
6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6617,6619-6620,6623-6627,6632,6636-6638,6641-6648
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6642 | mmatthews | 2007-10-23 11:17:14 -0500 (Tue, 23 Oct 2007) | 1 line
Fixed BUG#31790 MysqlValidConnectionChecker doesn't properly handle
ReplicationConnection.
........
r6643 | mmatthews | 2007-10-23 12:47:15 -0500 (Tue, 23 Oct 2007) | 7 lines
Fixed Bug#20491 - DatabaseMetadata.getColumns() doesn't
return correct column names if connection character set
isn't UTF-8. (There was a server-side component of this that
was fixed late in the 5.0 development cycle, it seems, this
is the last piece that fixes some loose ends in the JDBC
driver). This fix touches *all* metadata information coming
from the MySQL server itself.
........
r6644 | mmatthews | 2007-10-23 12:49:01 -0500 (Tue, 23 Oct 2007) | 3 lines
Fixed MysqlIO.nextRowFast() to only attempt to read server
warning counts and status if talking to a 4.1 or newer server
(fixes a hang when reading data from 4.0 servers).
........
r6645 | mmatthews | 2007-10-23 12:51:10 -0500 (Tue, 23 Oct 2007) | 1 line
Testcase for bug 20491.
........
r6646 | mmatthews | 2007-10-23 12:52:09 -0500 (Tue, 23 Oct 2007) | 1 line
Make a default constructor so others can extend this class.
........
r6647 | mmatthews | 2007-10-23 12:52:39 -0500 (Tue, 23 Oct 2007) | 1 line
Changed some visibility to make things usable from StatementInterceptor
implementations.
........
r6648 | mmatthews | 2007-10-23 12:55:22 -0500 (Tue, 23 Oct 2007) | 1 line
Don't run these tests on MySQL-4.0.x
........
................
r6658 | mmatthews | 2007-11-06 13:00:06 -0600 (Tue, 06 Nov 2007) | 48 lines
Merged revisions
6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6617,6619-6620,6623-6627,6632,6636-6638,6641,6649-6657
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6650 | mmatthews | 2007-10-23 14:35:33 -0500 (Tue, 23 Oct 2007) | 1 line
Add some .svn-ignores.
........
r6651 | mmatthews | 2007-10-23 18:55:58 -0500 (Tue, 23 Oct 2007) | 1 line
Made profiler event handling extensible via the "profilerEventHandler" connection
property.
........
r6652 | mmatthews | 2007-10-24 16:13:43 -0500 (Wed, 24 Oct 2007) | 2 lines
Fixed Bug#31823 - CallableStatement.setNull() on a stored function would
throw an ArrayIndexOutOfBounds when setting the last parameter to null when
calling setNull().
........
r6653 | mmatthews | 2007-10-29 13:08:17 -0500 (Mon, 29 Oct 2007) | 6 lines
Added SSL-related configuration property "verifyServerCertificate". If set to
"false", the driver won't verify
the server's certificate when "useSSL" is set to "true".
When using this feature, the keystore parameters should be specified by the
"clientCertificateKeyStore*" properties, rather than system properties, as the
JSSE doesn't
make it straightforward to have a non-verifying trust store and the "default"
key store.
........
r6654 | mmatthews | 2007-10-29 13:15:35 -0500 (Mon, 29 Oct 2007) | 1 line
Use iterated catalog, not the user-specified one.
........
r6655 | mmatthews | 2007-10-31 22:34:31 -0500 (Wed, 31 Oct 2007) | 1 line
Pulled up batch rewriting from 5.0.
........
r6656 | mmatthews | 2007-11-01 17:01:56 -0500 (Thu, 01 Nov 2007) | 1 line
Use a locally-scoped connection reference after checking for it being closed.
........
r6657 | mmatthews | 2007-11-01 17:54:39 -0500 (Thu, 01 Nov 2007) | 3 lines
- Fixed ResultSetMetadata.getColumnName() for result sets returned from
Statement.getGeneratedKeys() - it was returning null instead of
"GENERATED_KEY" as in 5.0.x.
........
................
r6663 | mmatthews | 2007-11-09 15:53:31 -0600 (Fri, 09 Nov 2007) | 35 lines
Merged revisions
6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6617,6619-6620,6623-6627,6632,6636-6638,6641,6649,6658-6662
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6660 | mmatthews | 2007-11-08 08:46:54 -0600 (Thu, 08 Nov 2007) | 2 lines
Simplified the JBoss connection validator by piggy-backing on the
special "ping" syntax rather than trying to do a bunch of reflection.
........
r6661 | mmatthews | 2007-11-08 08:51:52 -0600 (Thu, 08 Nov 2007) | 4 lines
Driver now displays the version in a comment when issuing
"SHOW VARIABLES" when connecting (for debugging purposes, it shows
up in the query log on the server). This information is not shown
if the connection property "paranoid" has been set to "true".
........
r6662 | mmatthews | 2007-11-09 15:48:42 -0600 (Fri, 09 Nov 2007) | 6 lines
Fixed BUG#32246 - When unpacking rows directly, we don't hand off error
message packets to the internal method which decodes them correctly, so
no exception is raised, and the driver than hangs trying to read rows
that aren't there. This tends to happen when calling stored procedures, as
normal SELECTs won't have an error in this spot in the protocol unless an
I/O error occurs.
........
................
r6665 | mmatthews | 2007-11-16 09:33:46 -0600 (Fri, 16 Nov 2007) | 13 lines
Merged revisions
6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6617,6619-6620,6623-6627,6632,6636-6638,6641,6649,6658-6659,6663-6664
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
........
r6664 | mmatthews | 2007-11-16 09:24:21 -0600 (Fri, 16 Nov 2007) | 3 lines
Fixed Bug#32101 - When using a connection from our ConnectionPoolDataSource,
some Connection.prepareStatement() methods would return null instead of
a prepared statement.
........
................
r6667 | mmatthews | 2007-11-16 10:50:29 -0600 (Fri, 16 Nov 2007) | 13 lines
Merged revisions 6626-6636,6638-6666 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6666 | mmatthews | 2007-11-16 10:31:48 -0600 (Fri, 16 Nov 2007) | 3 lines
Fixed an issue where PreparedStatement.setObject(int, Object, int)
didn't handle String values of "1" or "0" for the target SQL type
of BIT properly.
........
................
r6669 | mmatthews | 2007-11-16 19:34:43 -0600 (Fri, 16 Nov 2007) | 1 line
Post-merge fixups.
................
r6671 | mmatthews | 2007-11-17 16:59:04 -0600 (Sat, 17 Nov 2007) | 13 lines
Merged revisions 6638-6665,6667-6670 via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_0
........
r6668 | mmatthews | 2007-11-16 10:53:29 -0600 (Fri, 16 Nov 2007) | 1 line
Update changelog for 5.0.9 release.
........
r6670 | mmatthews | 2007-11-17 16:50:33 -0600 (Sat, 17 Nov 2007) | 1 line
Check for required compiler when building.
........
................
r6672 | mmatthews | 2007-11-18 15:21:54 -0600 (Sun, 18 Nov 2007) | 1 line
Check for JDK-1.4.2 or JDK5 in JAVA_HOME, and that the paths for Java6 (for JDBC-4.0
implementation) are present before attempting to compile.
................
r6676 | mmatthews | 2007-11-18 18:40:57 -0600 (Sun, 18 Nov 2007) | 33 lines
Merged revisions
6585-6586,6593-6597,6599-6602,6605,6607-6609,6612,6614-6617,6619-6620,6623-6627,6632,6636-6638,6641,6649,6658-6659,6663,6665-6675
via svnmerge from
svn+ssh://mmatthews@stripped/connectors-svnroot/connector-j/branches/branch_5_1
................
r6674 | mmatthews | 2007-11-18 15:25:04 -0600 (Sun, 18 Nov 2007) | 8 lines
Blocked revisions 6673 via svnmerge
........
r6673 | mmatthews | 2007-11-18 15:22:08 -0600 (Sun, 18 Nov 2007) | 1 line
Set path for build file.
........
................
r6675 | mmatthews | 2007-11-18 15:28:48 -0600 (Sun, 18 Nov 2007) | 16 lines
Blocked revisions 6659 via svnmerge
........
r6659 | mmatthews | 2007-11-07 12:01:56 -0600 (Wed, 07 Nov 2007) | 9 lines
Availability of INFORMATION_SCHEMA.parameters is now detected
(MySQL servers >= 6.0.4), and is used for
DatabaseMetadata.getProcedureColumns(),
DatabaseMetadata.getFunctionColumns() (JDBC-4.0) and metadata needed
to use CallableStatements.
If INFORMATION_SCHEMA.parameters is available, the driver no longer
needs permissions for "SHOW CREATE PROCEDURE" granted to retrieve
parameter metadata for CallableStatements.
........
................
................
...............
r6678 | mmatthews | 2007-11-18 20:13:12 -0600 (Sun, 18 Nov 2007) | 1 line
More checks for various "flavors" of running Ant from Eclipse.
...............
r6680 | mmatthews | 2007-11-18 20:16:08 -0600 (Sun, 18 Nov 2007) | 1 line
Don't try and create info-schema based DBMD instances for internal use.
...............
Property changes on: trunk
___________________________________________________________________
Name: svnmerge-integrated
- /branches/branch_5_0:1-6636,6638-6670 /branches/branch_5_1:1-6582,6584-6675
+ /branches/branch_5_0:1-6636,6638-6670 /branches/branch_5_1:1-6582,6584-6678,6680-6681
Modified: trunk/CHANGES
===================================================================
--- trunk/CHANGES 2007-11-19 02:42:21 UTC (rev 6681)
+++ trunk/CHANGES 2007-11-19 02:51:18 UTC (rev 6682)
@@ -48,25 +48,6 @@
Statement.getGeneratedKeys() - it was returning null instead of
"GENERATED_KEY" as in 5.0.x.
- - Simplified the JBoss connection validator by piggy-backing on the
- special "ping" syntax rather than trying to do a bunch of reflection.
-
- - Driver now displays the version in a comment when issuing
- "SHOW VARIABLES" when connecting (for debugging purposes, it shows
- up in the query log on the server). This information is not shown
- if the connection property "paranoid" has been set to "true".
-
- - Fixed BUG#32246 - When unpacking rows directly, we don't hand off error
- message packets to the internal method which decodes them correctly, so
- no exception is raised, and the driver than hangs trying to read rows
- that aren't there. This tends to happen when calling stored procedures, as
- normal SELECTs won't have an error in this spot in the protocol unless an
- I/O error occurs.
-
- - Fixed Bug#32101 - When using a connection from our ConnectionPoolDataSource,
- some Connection.prepareStatement() methods would return null instead of
- a prepared statement.
-
10-09-07 - Version 5.1.5
- Released instead of 5.1.4 to pickup patch for BUG#31053
Modified: trunk/build.xml
===================================================================
--- trunk/build.xml 2007-11-19 02:42:21 UTC (rev 6681)
+++ trunk/build.xml 2007-11-19 02:51:18 UTC (rev 6682)
@@ -42,10 +42,16 @@
<!-- Send class files to correct location if running in eclipse -->
- <condition property="compiler.output" value="bin"
else="${buildDir}/${fullProdName}">
- <isset property="eclipse.pdebuild.home" />
- </condition>
-
+ <condition property="compiler.output" value="bin"
else="${buildDir}/${fullProdName}">
+ <or>
+ <isset property="eclipse.running" />
+ <isset property="eclipse.pdebuild.home" />
+ <contains string="${ant.home}" substring="plugins" />
+ </or>
+ </condition>
+
+ <echo>Compiling class files to ${compiler.output}...</echo>
+
<!--
The following properties are needed for finding JDK6, set to the defaults
for my development environment, but can be passed on the command line
Modified: trunk/src/com/mysql/jdbc/ConnectionImpl.java
===================================================================
--- trunk/src/com/mysql/jdbc/ConnectionImpl.java 2007-11-19 02:42:21 UTC (rev 6681)
+++ trunk/src/com/mysql/jdbc/ConnectionImpl.java 2007-11-19 02:51:18 UTC (rev 6682)
@@ -727,7 +727,7 @@
initializeDriverProperties(info);
try {
- this.dbmd = getMetaData(false);
+ this.dbmd = getMetaData(false, false);
createNewIO(false);
} catch (SQLException ex) {
cleanup(ex);
@@ -2988,15 +2988,15 @@
* if a database access error occurs
*/
public java.sql.DatabaseMetaData getMetaData() throws SQLException {
- return getMetaData(true);
+ return getMetaData(true, true);
}
- private java.sql.DatabaseMetaData getMetaData(boolean checkClosed) throws SQLException {
+ private java.sql.DatabaseMetaData getMetaData(boolean checkClosed, boolean
checkForInfoSchema) throws SQLException {
if (checkClosed) {
checkClosed();
}
- return com.mysql.jdbc.DatabaseMetaData.getInstance(this, this.database);
+ return com.mysql.jdbc.DatabaseMetaData.getInstance(this, this.database,
checkForInfoSchema);
}
protected java.sql.Statement getMetadataSafeStatement() throws SQLException {
@@ -5473,4 +5473,4 @@
public void initializeExtension(Extension ex) throws SQLException {
ex.init(this, this.props);
}
-}
+}
\ No newline at end of file
Modified: trunk/src/com/mysql/jdbc/DatabaseMetaData.java
===================================================================
--- trunk/src/com/mysql/jdbc/DatabaseMetaData.java 2007-11-19 02:42:21 UTC (rev 6681)
+++ trunk/src/com/mysql/jdbc/DatabaseMetaData.java 2007-11-19 02:51:18 UTC (rev 6682)
@@ -620,10 +620,11 @@
// and JDBC4 runtimes, otherwise the class verifier complains...
protected static DatabaseMetaData getInstance(
- ConnectionImpl connToSet, String databaseToSet)
+ ConnectionImpl connToSet, String databaseToSet, boolean checkForInfoSchema)
throws SQLException {
if (!Util.isJdbc4()) {
- if (connToSet != null && connToSet.getUseInformationSchema()
+ if (checkForInfoSchema && connToSet != null
+ && connToSet.getUseInformationSchema()
&& connToSet.versionMeetsMinimum(5, 0, 7)) {
return new DatabaseMetaDataUsingInfoSchema(connToSet,
databaseToSet);
Modified: trunk/src/testsuite/regression/CallableStatementRegressionTest.java
===================================================================
--- trunk/src/testsuite/regression/CallableStatementRegressionTest.java 2007-11-19
02:42:21 UTC (rev 6681)
+++ trunk/src/testsuite/regression/CallableStatementRegressionTest.java 2007-11-19
02:51:18 UTC (rev 6682)
@@ -1,3 +1,4 @@
+<<<<<<< .working
/*
Copyright (C) 2002-2007 MySQL AB
@@ -1473,4 +1474,1407 @@
}
}
}
-}
\ No newline at end of file
+}=======
+/*
+ Copyright (C) 2002-2007 MySQL AB
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of version 2 of the GNU General Public License as
+ published by the Free Software Foundation.
+
+ There are special exceptions to the terms and conditions of the GPL
+ as it is applied to this software. View the full text of the
+ exception in file EXCEPTIONS-CONNECTOR-J in the directory of this
+ software distribution.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+
+ */
+package testsuite.regression;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.sql.CallableStatement;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.util.List;
+import java.util.Properties;
+
+import com.mysql.jdbc.DatabaseMetaData;
+import com.mysql.jdbc.NonRegisteringDriver;
+import com.mysql.jdbc.SQLError;
+import com.mysql.jdbc.StringUtils;
+
+import testsuite.BaseTestCase;
+
+/**
+ * Tests fixes for bugs in CallableStatement code.
+ *
+ * @version $Id: CallableStatementRegressionTest.java,v 1.1.2.6 2004/12/09
+ * 15:57:26 mmatthew Exp $
+ */
+public class CallableStatementRegressionTest extends BaseTestCase {
+ /**
+ * DOCUMENT ME!
+ *
+ * @param name
+ */
+ public CallableStatementRegressionTest(String name) {
+ super(name);
+
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * Runs all test cases in this test suite
+ *
+ * @param args
+ * ignored
+ */
+ public static void main(String[] args) {
+ junit.textui.TestRunner.run(CallableStatementRegressionTest.class);
+ }
+
+ /**
+ * Tests fix for BUG#3539 getProcedures() does not return any procedures in
+ * result set
+ *
+ * @throws Exception
+ * if an error occurs.
+ */
+ public void testBug3539() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ try {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug3539");
+ this.stmt.executeUpdate("CREATE PROCEDURE testBug3539()\n"
+ + "BEGIN\n" + "SELECT 1;" + "end\n");
+
+ this.rs = this.conn.getMetaData().getProcedures(null, null,
+ "testBug3539");
+
+ assertTrue(this.rs.next());
+ assertTrue("testBug3539".equals(this.rs.getString(3)));
+ } finally {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug3539");
+ }
+ }
+
+ /**
+ * Tests fix for BUG#3540 getProcedureColumns doesn't work with wildcards
+ * for procedure name
+ *
+ * @throws Exception
+ * if an error occurs.
+ */
+ public void testBug3540() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+ try {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug3540");
+ this.stmt
+ .executeUpdate("CREATE PROCEDURE testBug3540(x int, out y int)\n"
+ + "BEGIN\n" + "SELECT 1;" + "end\n");
+
+ this.rs = this.conn.getMetaData().getProcedureColumns(null,
+ null, "testBug3540%", "%");
+
+ assertTrue(this.rs.next());
+ assertTrue("testBug3540".equals(this.rs.getString(3)));
+ assertTrue("x".equals(this.rs.getString(4)));
+
+ assertTrue(this.rs.next());
+ assertTrue("testBug3540".equals(this.rs.getString(3)));
+ assertTrue("y".equals(this.rs.getString(4)));
+
+ assertTrue(!this.rs.next());
+ } finally {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug3540");
+ }
+ }
+
+ /**
+ * Tests fix for BUG#7026 - DBMD.getProcedures() doesn't respect catalog
+ * parameter
+ *
+ * @throws Exception
+ * if the test fails.
+ */
+ public void testBug7026() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ try {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug7026");
+ this.stmt
+ .executeUpdate("CREATE PROCEDURE testBug7026(x int, out y int)\n"
+ + "BEGIN\n" + "SELECT 1;" + "end\n");
+
+ //
+ // Should be found this time.
+ //
+ this.rs = this.conn.getMetaData().getProcedures(
+ this.conn.getCatalog(), null, "testBug7026");
+
+ assertTrue(this.rs.next());
+ assertTrue("testBug7026".equals(this.rs.getString(3)));
+
+ assertTrue(!this.rs.next());
+
+ //
+ // This time, shouldn't be found, because not associated with
+ // this (bogus) catalog
+ //
+ this.rs = this.conn.getMetaData().getProcedures("abfgerfg",
+ null, "testBug7026");
+ assertTrue(!this.rs.next());
+
+ //
+ // Should be found this time as well, as we haven't
+ // specified a catalog.
+ //
+ this.rs = this.conn.getMetaData().getProcedures(null, null,
+ "testBug7026");
+
+ assertTrue(this.rs.next());
+ assertTrue("testBug7026".equals(this.rs.getString(3)));
+
+ assertTrue(!this.rs.next());
+ } finally {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug7026");
+ }
+ }
+
+ /**
+ * Tests fix for BUG#9319 -- Stored procedures with same name in different
+ * databases confuse the driver when it tries to determine parameter
+ * counts/types.
+ *
+ * @throws Exception
+ * if the test fails
+ */
+ public void testBug9319() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ boolean doASelect = true; // SELECT currently causes the server to
+ // hang on the
+ // last execution of this testcase, filed as BUG#9405
+
+
+ if (isAdminConnectionConfigured()) {
+ Connection db2Connection = null;
+ Connection db1Connection = null;
+
+ try {
+ db2Connection = getAdminConnection();
+ db1Connection = getAdminConnection();
+
+ db2Connection.createStatement().executeUpdate(
+ "CREATE DATABASE IF NOT EXISTS db_9319_2");
+ db2Connection.setCatalog("db_9319_2");
+
+ db2Connection.createStatement().executeUpdate(
+ "DROP PROCEDURE IF EXISTS COMPROVAR_USUARI");
+
+ db2Connection
+ .createStatement()
+ .executeUpdate(
+ "CREATE PROCEDURE COMPROVAR_USUARI(IN p_CodiUsuari VARCHAR(10),"
+ + "\nIN p_contrasenya VARCHAR(10),"
+ + "\nOUT p_userId INTEGER,"
+ + "\nOUT p_userName VARCHAR(30),"
+ + "\nOUT p_administrador VARCHAR(1),"
+ + "\nOUT p_idioma VARCHAR(2))"
+ + "\nBEGIN"
+
+ + (doASelect ? "\nselect 2;"
+ : "\nSELECT 2 INTO p_administrador;")
+ + "\nEND");
+
+ db1Connection.createStatement().executeUpdate(
+ "CREATE DATABASE IF NOT EXISTS db_9319_1");
+ db1Connection.setCatalog("db_9319_1");
+
+ db1Connection.createStatement().executeUpdate(
+ "DROP PROCEDURE IF EXISTS COMPROVAR_USUARI");
+ db1Connection
+ .createStatement()
+ .executeUpdate(
+ "CREATE PROCEDURE COMPROVAR_USUARI(IN p_CodiUsuari VARCHAR(10),"
+ + "\nIN p_contrasenya VARCHAR(10),"
+ + "\nOUT p_userId INTEGER,"
+ + "\nOUT p_userName VARCHAR(30),"
+ + "\nOUT p_administrador VARCHAR(1))"
+ + "\nBEGIN"
+ + (doASelect ? "\nselect 1;"
+ : "\nSELECT 1 INTO p_administrador;")
+ + "\nEND");
+
+ CallableStatement cstmt = db2Connection
+ .prepareCall("{ call COMPROVAR_USUARI(?, ?, ?, ?, ?, ?) }");
+ cstmt.setString(1, "abc");
+ cstmt.setString(2, "def");
+ cstmt.registerOutParameter(3, java.sql.Types.INTEGER);
+ cstmt.registerOutParameter(4, java.sql.Types.VARCHAR);
+ cstmt.registerOutParameter(5, java.sql.Types.VARCHAR);
+
+ cstmt.registerOutParameter(6, java.sql.Types.VARCHAR);
+
+ cstmt.execute();
+
+ if (doASelect) {
+ this.rs = cstmt.getResultSet();
+ assertTrue(this.rs.next());
+ assertEquals(2, this.rs.getInt(1));
+ } else {
+ assertEquals(2, cstmt.getInt(5));
+ }
+
+ cstmt = db1Connection
+ .prepareCall("{ call COMPROVAR_USUARI(?, ?, ?, ?, ?, ?) }");
+ cstmt.setString(1, "abc");
+ cstmt.setString(2, "def");
+ cstmt.registerOutParameter(3, java.sql.Types.INTEGER);
+ cstmt.registerOutParameter(4, java.sql.Types.VARCHAR);
+ cstmt.registerOutParameter(5, java.sql.Types.VARCHAR);
+
+ try {
+ cstmt.registerOutParameter(6, java.sql.Types.VARCHAR);
+ fail("Should've thrown an exception");
+ } catch (SQLException sqlEx) {
+ assertEquals(SQLError.SQL_STATE_ILLEGAL_ARGUMENT, sqlEx
+ .getSQLState());
+ }
+
+ cstmt = db1Connection
+ .prepareCall("{ call COMPROVAR_USUARI(?, ?, ?, ?, ?) }");
+ cstmt.setString(1, "abc");
+ cstmt.setString(2, "def");
+ cstmt.registerOutParameter(3, java.sql.Types.INTEGER);
+ cstmt.registerOutParameter(4, java.sql.Types.VARCHAR);
+ cstmt.registerOutParameter(5, java.sql.Types.VARCHAR);
+
+ cstmt.execute();
+
+ if (doASelect) {
+ this.rs = cstmt.getResultSet();
+ assertTrue(this.rs.next());
+ assertEquals(1, this.rs.getInt(1));
+ } else {
+ assertEquals(1, cstmt.getInt(5));
+ }
+
+ String quoteChar = db2Connection.getMetaData()
+ .getIdentifierQuoteString();
+
+ cstmt = db2Connection.prepareCall("{ call " + quoteChar
+ + db1Connection.getCatalog() + quoteChar + "."
+ + quoteChar + "COMPROVAR_USUARI" + quoteChar
+ + "(?, ?, ?, ?, ?) }");
+ cstmt.setString(1, "abc");
+ cstmt.setString(2, "def");
+ cstmt.registerOutParameter(3, java.sql.Types.INTEGER);
+ cstmt.registerOutParameter(4, java.sql.Types.VARCHAR);
+ cstmt.registerOutParameter(5, java.sql.Types.VARCHAR);
+
+ cstmt.execute();
+
+ if (doASelect) {
+ this.rs = cstmt.getResultSet();
+ assertTrue(this.rs.next());
+ assertEquals(1, this.rs.getInt(1));
+ } else {
+ assertEquals(1, cstmt.getInt(5));
+ }
+ } finally {
+ if (db2Connection != null) {
+ db2Connection.createStatement().executeUpdate(
+ "DROP PROCEDURE IF EXISTS COMPROVAR_USUARI");
+ db2Connection.createStatement().executeUpdate(
+ "DROP DATABASE IF EXISTS db_9319_2");
+ }
+
+ if (db1Connection != null) {
+ db1Connection.createStatement().executeUpdate(
+ "DROP PROCEDURE IF EXISTS COMPROVAR_USUARI");
+ db1Connection.createStatement().executeUpdate(
+ "DROP DATABASE IF EXISTS db_9319_1");
+ }
+ }
+ }
+ }
+
+ /*
+ * public void testBug9319() throws Exception { boolean doASelect = false; //
+ * SELECT currently causes the server to hang on the // last execution of
+ * this testcase, filed as BUG#9405
+ *
+ * if (versionMeetsMinimum(5, 0, 2)) { if (isAdminConnectionConfigured()) {
+ * Connection db2Connection = null; Connection db1Connection = null;
+ *
+ * try { db2Connection = getAdminConnection();
+ *
+ * db2Connection.createStatement().executeUpdate( "CREATE DATABASE IF NOT
+ * EXISTS db_9319"); db2Connection.setCatalog("db_9319");
+ *
+ * db2Connection.createStatement().executeUpdate( "DROP PROCEDURE IF EXISTS
+ * COMPROVAR_USUARI");
+ *
+ * db2Connection.createStatement().executeUpdate( "CREATE PROCEDURE
+ * COMPROVAR_USUARI(IN p_CodiUsuari VARCHAR(10)," + "\nIN p_contrasenya
+ * VARCHAR(10)," + "\nOUT p_userId INTEGER," + "\nOUT p_userName
+ * VARCHAR(30)," + "\nOUT p_administrador VARCHAR(1)," + "\nOUT p_idioma
+ * VARCHAR(2))" + "\nBEGIN" + (doASelect ? "\nselect 2;" : "\nSELECT 2 INTO
+ * p_administrador;" ) + "\nEND");
+ *
+ * this.stmt .executeUpdate("DROP PROCEDURE IF EXISTS COMPROVAR_USUARI");
+ * this.stmt .executeUpdate("CREATE PROCEDURE COMPROVAR_USUARI(IN
+ * p_CodiUsuari VARCHAR(10)," + "\nIN p_contrasenya VARCHAR(10)," + "\nOUT
+ * p_userId INTEGER," + "\nOUT p_userName VARCHAR(30)," + "\nOUT
+ * p_administrador VARCHAR(1))" + "\nBEGIN" + (doASelect ? "\nselect 1;" :
+ * "\nSELECT 1 INTO p_administrador;" ) + "\nEND");
+ *
+ * CallableStatement cstmt = db2Connection .prepareCall("{ call
+ * COMPROVAR_USUARI(?, ?, ?, ?, ?, ?) }"); cstmt.setString(1, "abc");
+ * cstmt.setString(2, "def"); cstmt.registerOutParameter(3,
+ * java.sql.Types.INTEGER); cstmt.registerOutParameter(4,
+ * java.sql.Types.VARCHAR); cstmt.registerOutParameter(5,
+ * java.sql.Types.VARCHAR);
+ *
+ * cstmt.registerOutParameter(6, java.sql.Types.VARCHAR);
+ *
+ * cstmt.execute();
+ *
+ * if (doASelect) { this.rs = cstmt.getResultSet();
+ * assertTrue(this.rs.next()); assertEquals(2, this.rs.getInt(1)); } else {
+ * assertEquals(2, cstmt.getInt(5)); }
+ *
+ * cstmt = this.conn .prepareCall("{ call COMPROVAR_USUARI(?, ?, ?, ?, ?, ?)
+ * }"); cstmt.setString(1, "abc"); cstmt.setString(2, "def");
+ * cstmt.registerOutParameter(3, java.sql.Types.INTEGER);
+ * cstmt.registerOutParameter(4, java.sql.Types.VARCHAR);
+ * cstmt.registerOutParameter(5, java.sql.Types.VARCHAR);
+ *
+ * try { cstmt.registerOutParameter(6, java.sql.Types.VARCHAR);
+ * fail("Should've thrown an exception"); } catch (SQLException sqlEx) {
+ * assertEquals(SQLError.SQL_STATE_ILLEGAL_ARGUMENT, sqlEx .getSQLState()); }
+ *
+ * cstmt = this.conn .prepareCall("{ call COMPROVAR_USUARI(?, ?, ?, ?, ?)
+ * }"); cstmt.setString(1, "abc"); cstmt.setString(2, "def");
+ * cstmt.registerOutParameter(3, java.sql.Types.INTEGER);
+ * cstmt.registerOutParameter(4, java.sql.Types.VARCHAR);
+ * cstmt.registerOutParameter(5, java.sql.Types.VARCHAR);
+ *
+ * cstmt.execute();
+ *
+ * if (doASelect) { this.rs = cstmt.getResultSet();
+ * assertTrue(this.rs.next()); assertEquals(1, this.rs.getInt(1)); } else {
+ * assertEquals(1, cstmt.getInt(5)); }
+ *
+ * String quoteChar =
+ * db2Connection.getMetaData().getIdentifierQuoteString();
+ *
+ * cstmt = db2Connection .prepareCall("{ call " + quoteChar +
+ * this.conn.getCatalog() + quoteChar + "." + quoteChar + "COMPROVAR_USUARI" +
+ * quoteChar + "(?, ?, ?, ?, ?) }"); cstmt.setString(1, "abc");
+ * cstmt.setString(2, "def"); cstmt.registerOutParameter(3,
+ * java.sql.Types.INTEGER); cstmt.registerOutParameter(4,
+ * java.sql.Types.VARCHAR); cstmt.registerOutParameter(5,
+ * java.sql.Types.VARCHAR);
+ *
+ * cstmt.execute();
+ *
+ * if (doASelect) { this.rs = cstmt.getResultSet();
+ * assertTrue(this.rs.next()); assertEquals(1, this.rs.getInt(1)); } else {
+ * assertEquals(1, cstmt.getInt(5)); } } finally { if (db2Connection !=
+ * null) { db2Connection.createStatement().executeUpdate( "DROP PROCEDURE IF
+ * EXISTS COMPROVAR_USUARI"); //
+ * db2Connection.createStatement().executeUpdate( // "DROP DATABASE IF
+ * EXISTS db_9319"); }
+ *
+ * this.stmt .executeUpdate("DROP PROCEDURE IF EXISTS COMPROVAR_USUARI"); } } } }
+ */
+
+ /**
+ * Tests fix for BUG#9682 - Stored procedures with DECIMAL parameters with
+ * storage specifications that contained "," in them would fail.
+ *
+ * @throws Exception
+ * if the test fails.
+ */
+ public void testBug9682() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ CallableStatement cStmt = null;
+
+ try {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug9682");
+ this.stmt
+ .executeUpdate("CREATE PROCEDURE testBug9682(decimalParam DECIMAL(18,0))"
+ + "\nBEGIN" + "\n SELECT 1;" + "\nEND");
+ cStmt = this.conn.prepareCall("Call testBug9682(?)");
+ cStmt.setDouble(1, 18.0);
+ cStmt.execute();
+ } finally {
+ if (cStmt != null) {
+ cStmt.close();
+ }
+
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug9682");
+ }
+ }
+
+ /**
+ * Tests fix forBUG#10310 - Driver doesn't support {?=CALL(...)} for calling
+ * stored functions. This involved adding support for function retrieval to
+ * DatabaseMetaData.getProcedures() and getProcedureColumns() as well.
+ *
+ * @throws Exception
+ * if the test fails.
+ */
+ public void testBug10310() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ CallableStatement cStmt = null;
+
+ try {
+ this.stmt.executeUpdate("DROP FUNCTION IF EXISTS testBug10310");
+ this.stmt
+ .executeUpdate("CREATE FUNCTION testBug10310(a float, b bigint, c int) RETURNS INT"
+ + "\nBEGIN" + "\nRETURN a;" + "\nEND");
+ cStmt = this.conn.prepareCall("{? = CALL testBug10310(?,?,?)}");
+ cStmt.registerOutParameter(1, Types.INTEGER);
+ cStmt.setFloat(2, 2);
+ cStmt.setInt(3, 1);
+ cStmt.setInt(4, 1);
+
+ if (!isRunningOnJdk131()) {
+ assertEquals(4, cStmt.getParameterMetaData().getParameterCount());
+ assertEquals(Types.INTEGER, cStmt.getParameterMetaData().getParameterType(1));
+ }
+
+ assertFalse(cStmt.execute());
+ assertEquals(2f, cStmt.getInt(1), .001);
+ assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
+ .getName());
+
+ assertEquals(-1, cStmt.executeUpdate());
+ assertEquals(2f, cStmt.getInt(1), .001);
+ assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
+ .getName());
+
+ if (!isRunningOnJdk131()) {
+ cStmt.setFloat("a", 4);
+ cStmt.setInt("b", 1);
+ cStmt.setInt("c", 1);
+
+ assertFalse(cStmt.execute());
+ assertEquals(4f, cStmt.getInt(1), .001);
+ assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
+ .getName());
+
+ assertEquals(-1, cStmt.executeUpdate());
+ assertEquals(4f, cStmt.getInt(1), .001);
+ assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
+ .getName());
+ }
+
+ // Check metadata while we're at it
+
+ java.sql.DatabaseMetaData dbmd = this.conn.getMetaData();
+
+ this.rs = dbmd.getProcedures(this.conn.getCatalog(), null,
+ "testBug10310");
+ this.rs.next();
+ assertEquals("testBug10310", this.rs
+ .getString("PROCEDURE_NAME"));
+ assertEquals(DatabaseMetaData.procedureReturnsResult, this.rs
+ .getShort("PROCEDURE_TYPE"));
+ cStmt.setNull(2, Types.FLOAT);
+ cStmt.setInt(3, 1);
+ cStmt.setInt(4, 1);
+
+ assertFalse(cStmt.execute());
+ assertEquals(0f, cStmt.getInt(1), .001);
+ assertEquals(true, cStmt.wasNull());
+ assertEquals(null, cStmt.getObject(1));
+ assertEquals(true, cStmt.wasNull());
+
+ assertEquals(-1, cStmt.executeUpdate());
+ assertEquals(0f, cStmt.getInt(1), .001);
+ assertEquals(true, cStmt.wasNull());
+ assertEquals(null, cStmt.getObject(1));
+ assertEquals(true, cStmt.wasNull());
+
+
+ // Check with literals, not all parameters filled!
+ cStmt = this.conn.prepareCall("{? = CALL testBug10310(4,5,?)}");
+ cStmt.registerOutParameter(1, Types.INTEGER);
+ cStmt.setInt(2, 1);
+
+ assertFalse(cStmt.execute());
+ assertEquals(4f, cStmt.getInt(1), .001);
+ assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
+ .getName());
+
+ assertEquals(-1, cStmt.executeUpdate());
+ assertEquals(4f, cStmt.getInt(1), .001);
+ assertEquals("java.lang.Integer", cStmt.getObject(1).getClass()
+ .getName());
+
+ if (!isRunningOnJdk131()) {
+ assertEquals(2, cStmt.getParameterMetaData().getParameterCount());
+ assertEquals(Types.INTEGER, cStmt.getParameterMetaData().getParameterType(1));
+ assertEquals(Types.INTEGER, cStmt.getParameterMetaData().getParameterType(2));
+ }
+ } finally {
+ if (this.rs != null) {
+ this.rs.close();
+ this.rs = null;
+ }
+
+ if (cStmt != null) {
+ cStmt.close();
+ }
+
+ this.stmt.executeUpdate("DROP FUNCTION IF EXISTS testBug10310");
+ }
+ }
+
+ /**
+ * Tests fix for Bug#12417 - stored procedure catalog name is case-sensitive
+ * on Windows (this is actually a server bug, but we have a workaround in
+ * place for it now).
+ *
+ * @throws Exception
+ * if the test fails.
+ */
+ public void testBug12417() throws Exception {
+ if (serverSupportsStoredProcedures() && isServerRunningOnWindows()) {
+ Connection ucCatalogConn = null;
+
+ try {
+ this.stmt
+ .executeUpdate("DROP PROCEDURE IF EXISTS testBug12417");
+ this.stmt.executeUpdate("CREATE PROCEDURE testBug12417()\n"
+ + "BEGIN\n" + "SELECT 1;" + "end\n");
+ ucCatalogConn = getConnectionWithProps((Properties)null);
+ ucCatalogConn.setCatalog(this.conn.getCatalog().toUpperCase());
+ ucCatalogConn.prepareCall("{call testBug12417()}");
+ } finally {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug3539");
+
+ if (ucCatalogConn != null) {
+ ucCatalogConn.close();
+ }
+ }
+ }
+ }
+
+ public void testBug15121() throws Exception {
+ if (false /* needs to be fixed on server */) {
+ if (versionMeetsMinimum(5, 0)) {
+ this.stmt
+ .executeUpdate("DROP PROCEDURE IF EXISTS p_testBug15121");
+
+ this.stmt.executeUpdate("CREATE PROCEDURE p_testBug15121()\n"
+ + "BEGIN\n" + "SELECT * from idonotexist;\n" + "END");
+
+ Properties props = new Properties();
+ props.setProperty(NonRegisteringDriver.DBNAME_PROPERTY_KEY, "");
+
+ Connection noDbConn = null;
+
+ try {
+ noDbConn = getConnectionWithProps(props);
+
+ StringBuffer queryBuf = new StringBuffer("{call ");
+ String quotedId = this.conn.getMetaData()
+ .getIdentifierQuoteString();
+ queryBuf.append(quotedId);
+ queryBuf.append(this.conn.getCatalog());
+ queryBuf.append(quotedId);
+ queryBuf.append(".p_testBug15121()}");
+
+ noDbConn.prepareCall(queryBuf.toString()).execute();
+ } finally {
+ if (noDbConn != null) {
+ noDbConn.close();
+ }
+ }
+ }
+ }
+ }
+
+ /**
+ * Tests fix for BUG#15464 - INOUT parameter does not store IN value.
+ *
+ * @throws Exception
+ * if the test fails
+ */
+
+ public void testBug15464() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+ CallableStatement storedProc = null;
+
+ try {
+ this.stmt
+ .executeUpdate("DROP PROCEDURE IF EXISTS testInOutParam");
+ this.stmt
+ .executeUpdate("create procedure testInOutParam(IN p1 VARCHAR(255), INOUT p2 INT)\n"
+ + "begin\n"
+ + " DECLARE z INT;\n"
+ + "SET z = p2 + 1;\n"
+ + "SET p2 = z;\n"
+ + "SELECT p1;\n"
+ + "SELECT CONCAT('zyxw', p1);\n" + "end\n");
+
+ storedProc = this.conn
+ .prepareCall("{call testInOutParam(?, ?)}");
+
+ storedProc.setString(1, "abcd");
+ storedProc.setInt(2, 4);
+ storedProc.registerOutParameter(2, Types.INTEGER);
+
+ storedProc.execute();
+
+ assertEquals(5, storedProc.getInt(2));
+ } finally {
+ this.stmt
+ .executeUpdate("DROP PROCEDURE IF EXISTS testInOutParam");
+ }
+ }
+
+ /**
+ * Tests fix for BUG#17898 - registerOutParameter not working when some
+ * parameters pre-populated. Still waiting for feedback from JDBC experts
+ * group to determine what correct parameter count from getMetaData() should
+ * be, however.
+ *
+ * @throws Exception
+ * if the test fails
+ */
+ public void testBug17898() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug17898");
+ this.stmt
+ .executeUpdate("CREATE PROCEDURE testBug17898(param1 VARCHAR(50), OUT param2
INT)\nBEGIN\nDECLARE rtn INT;\nSELECT 1 INTO rtn;\nSET param2=rtn;\nEND");
+
+ CallableStatement cstmt = this.conn
+ .prepareCall("{CALL testBug17898('foo', ?)}");
+ cstmt.registerOutParameter(1, Types.INTEGER);
+ cstmt.execute();
+ assertEquals(1, cstmt.getInt(1));
+
+ if (!isRunningOnJdk131()) {
+ cstmt.clearParameters();
+ cstmt.registerOutParameter("param2", Types.INTEGER);
+ cstmt.execute();
+ assertEquals(1, cstmt.getInt(1));
+ }
+
+ }
+
+ /**
+ * Tests fix for BUG#21462 - JDBC (and ODBC) specifications allow no-parenthesis
+ * CALL statements for procedures with no arguments, MySQL server does not.
+ *
+ * @throws Exception if the test fails.
+ */
+ public void testBug21462() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ CallableStatement cstmt = null;
+
+ try {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug21462");
+ this.stmt.executeUpdate("CREATE PROCEDURE testBug21462() BEGIN SELECT 1; END");
+ cstmt = this.conn.prepareCall("{CALL testBug21462}");
+ cstmt.execute();
+ } finally {
+ if (cstmt != null) {
+ cstmt.close();
+ }
+
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug21462");
+ }
+
+ }
+
+ /**
+ * Tests fix for BUG#22024 - Newlines causing whitespace to span confuse
+ * procedure parser when getting parameter metadata for stored procedures.
+ *
+ * @throws Exception if the test fails
+ */
+ public void testBug22024() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ CallableStatement cstmt = null;
+
+ try {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug22024");
+ this.stmt.executeUpdate("CREATE PROCEDURE testBug22024(\r\n)\r\n BEGIN SELECT 1;
END");
+ cstmt = this.conn.prepareCall("{CALL testBug22024()}");
+ cstmt.execute();
+
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug22024");
+ this.stmt.executeUpdate("CREATE PROCEDURE testBug22024(\r\na INT)\r\n BEGIN SELECT 1;
END");
+ cstmt = this.conn.prepareCall("{CALL testBug22024(?)}");
+ cstmt.setInt(1, 1);
+ cstmt.execute();
+ } finally {
+ if (cstmt != null) {
+ cstmt.close();
+ }
+
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug22024");
+ }
+
+ }
+
+ /**
+ * Tests workaround for server crash when calling stored procedures
+ * via a server-side prepared statement (driver now detects
+ * prepare(stored procedure) and substitutes client-side prepared statement).
+ *
+ * @throws Exception if the test fails
+ */
+ public void testBug22297() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug22297");
+
+ createTable("tblTestBug2297_1", "("
+ + "id varchar(20) NOT NULL default '',"
+ + "Income double(19,2) default NULL)");
+
+ createTable("tblTestBug2297_2", "("
+ + "id varchar(20) NOT NULL default '',"
+ + "CreatedOn datetime default NULL)");
+
+ this.stmt.executeUpdate("CREATE PROCEDURE testBug22297(pcaseid INT)"
+ + "BEGIN"
+ + "\nSET @sql = \"DROP TEMPORARY TABLE IF EXISTS tmpOrders\";"
+ + " PREPARE stmt FROM @sql;"
+ + " EXECUTE stmt;"
+ + " DEALLOCATE PREPARE stmt;"
+ + "\nSET @sql = \"CREATE TEMPORARY TABLE tmpOrders SELECT id, 100 AS Income FROM
tblTestBug2297_1 GROUP BY id\";"
+ + " PREPARE stmt FROM @sql;"
+ + " EXECUTE stmt;"
+ + " DEALLOCATE PREPARE stmt;"
+ + "\n SELECT id, Income FROM (SELECT e.id AS id ,COALESCE(prof.Income,0) AS Income"
+ + "\n FROM tblTestBug2297_2 e LEFT JOIN tmpOrders prof ON e.id = prof.id"
+ + "\n WHERE e.CreatedOn > '2006-08-01') AS Final ORDER BY id;"
+ + "\nEND");
+
+ this.stmt.executeUpdate("INSERT INTO tblTestBug2297_1 (`id`,`Income`) VALUES "
+ + "('a',4094.00),"
+ + "('b',500.00),"
+ + "('c',3462.17),"
+ + " ('d',500.00),"
+ + " ('e',600.00)");
+
+ this.stmt.executeUpdate("INSERT INTO tblTestBug2297_2 (`id`,`CreatedOn`) VALUES "
+ + "('d','2006-08-31 00:00:00'),"
+ + "('e','2006-08-31 00:00:00'),"
+ + "('b','2006-08-31 00:00:00'),"
+ + "('c','2006-08-31 00:00:00'),"
+ + "('a','2006-08-31 00:00:00')");
+
+ try {
+ this.pstmt = this.conn.prepareStatement("{CALL testBug22297(?)}");
+ this.pstmt.setInt(1, 1);
+ this.rs =this.pstmt.executeQuery();
+
+ String[] ids = new String[] { "a", "b", "c", "d", "e"};
+ int pos = 0;
+
+ while (this.rs.next()) {
+ assertEquals(ids[pos++], rs.getString(1));
+ assertEquals(100, rs.getInt(2));
+ }
+
+ assertTrue(this.pstmt.getClass().getName().indexOf("Server") == -1);
+ } finally {
+ closeMemberJDBCResources();
+ }
+
+ }
+
+ public void testHugeNumberOfParameters() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ this.stmt
+ .executeUpdate("DROP PROCEDURE IF EXISTS testHugeNumberOfParameters");
+
+ StringBuffer procDef = new StringBuffer(
+ "CREATE PROCEDURE testHugeNumberOfParameters(");
+
+ for (int i = 0; i < 274; i++) {
+ if (i != 0) {
+ procDef.append(",");
+ }
+
+ procDef.append(" OUT param_" + i + " VARCHAR(32)");
+ }
+
+ procDef.append(")\nBEGIN\nSELECT 1;\nEND");
+ this.stmt.executeUpdate(procDef.toString());
+
+ CallableStatement cStmt = null;
+
+ try {
+ cStmt = this.conn
+ .prepareCall("{call
testHugeNumberOfParameters(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+ +
+
+ "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+ + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+ + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+ + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+ + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,"
+ + "?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}");
+ cStmt.registerOutParameter(274, Types.VARCHAR);
+
+ cStmt.execute();
+ } finally {
+ if (cStmt != null) {
+ cStmt.close();
+ }
+ }
+ }
+
+ public void testPrepareOfMultiRs() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+
+ this.stmt.executeUpdate("Drop procedure if exists p");
+ this.stmt
+ .executeUpdate("create procedure p () begin select 1; select 2; end;");
+ PreparedStatement ps = null;
+
+ try {
+ ps = this.conn.prepareStatement("call p()");
+
+ ps.execute();
+ this.rs = ps.getResultSet();
+ assertTrue(this.rs.next());
+ assertEquals(1, this.rs.getInt(1));
+ assertTrue(ps.getMoreResults());
+ this.rs = ps.getResultSet();
+ assertTrue(this.rs.next());
+ assertEquals(2, this.rs.getInt(1));
+ assertTrue(!ps.getMoreResults());
+ } finally {
+ if (this.rs != null) {
+ this.rs.close();
+ this.rs = null;
+ }
+
+ if (ps != null) {
+ ps.close();
+ }
+ }
+
+ }
+
+ /**
+ * Tests fix for BUG#25379 - INOUT parameters in CallableStatements get doubly-escaped.
+ *
+ * @throws Exception if the test fails.
+ */
+ public void testBug25379() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ createTable("testBug25379", "(col char(40))");
+
+ try {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS sp_testBug25379");
+ this.stmt.executeUpdate("CREATE PROCEDURE sp_testBug25379 (INOUT invalue char(255))"
+ + "\nBEGIN"
+ + "\ninsert into testBug25379(col) values(invalue);"
+ + "\nEND");
+
+
+ CallableStatement cstmt = this.conn.prepareCall("{call sp_testBug25379(?)}");
+ cstmt.setString(1,"'john'");
+ cstmt.executeUpdate();
+ assertEquals("'john'", cstmt.getString(1));
+ assertEquals("'john'", getSingleValue("testBug25379", "col", "").toString());
+ } finally {
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS sp_testBug25379");
+ }
+ }
+
+ /**
+ * Tests fix for BUG#25715 - CallableStatements with OUT/INOUT parameters that
+ * are "binary" have extra 7 bytes (which happens to be the _binary introducer!)
+ *
+ * @throws Exception if the test fails.
+ */
+ public void testBug25715() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return; // no stored procs
+ }
+
+ if (isRunningOnJdk131()) {
+ return; // no such method to test
+ }
+
+ createProcedure("spbug25715", "(INOUT mblob MEDIUMBLOB)" + "BEGIN"
+ + " SELECT 1 FROM DUAL WHERE 1=0;" + "\nEND");
+ CallableStatement cstmt = null;
+
+ try {
+ cstmt = this.conn.prepareCall("{call spbug25715(?)}");
+
+ byte[] buf = new byte[65];
+ for (int i = 0; i < 65; i++)
+ buf[i] = 1;
+ int il = buf.length;
+
+ int[] typesToTest = new int[] { Types.BIT, Types.BINARY, Types.BLOB,
Types.JAVA_OBJECT,
+ Types.LONGVARBINARY, Types.VARBINARY };
+
+ for (int i = 0; i < typesToTest.length; i++) {
+
+ cstmt.setBinaryStream("mblob", new ByteArrayInputStream(buf),
+ buf.length);
+ cstmt.registerOutParameter("mblob", typesToTest[i]);
+
+ cstmt.executeUpdate();
+
+ InputStream is = cstmt.getBlob("mblob").getBinaryStream();
+ ByteArrayOutputStream bOut = new ByteArrayOutputStream();
+
+ int bytesRead = 0;
+ byte[] readBuf = new byte[256];
+
+ while ((bytesRead = is.read(readBuf)) != -1) {
+ bOut.write(readBuf, 0, bytesRead);
+ }
+
+ byte[] fromSelectBuf = bOut.toByteArray();
+
+ int ol = fromSelectBuf.length;
+
+ assertEquals(il, ol);
+ }
+
+ cstmt.close();
+ } finally {
+ closeMemberJDBCResources();
+
+ if (cstmt != null) {
+ cstmt.close();
+ }
+ }
+
+ }
+
+ protected boolean serverSupportsStoredProcedures() throws SQLException {
+ return versionMeetsMinimum(5, 0);
+ }
+
+ public void testBug26143() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return; // no stored procedure support
+ }
+
+ this.stmt.executeUpdate("DROP PROCEDURE IF EXISTS testBug26143");
+
+ this.stmt.executeUpdate("CREATE DEFINER=CURRENT_USER PROCEDURE testBug26143(I INT)
COMMENT 'abcdefg'"
+ + "\nBEGIN\n"
+ + "SELECT I * 10;"
+ + "\nEND");
+
+ this.conn.prepareCall("{call testBug26143(?)").close();
+ }
+
+ /**
+ * Tests fix for BUG#26959 - comments confuse procedure parser.
+ *
+ * @throws Exception if the test fails
+ */
+ public void testBug26959() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return;
+ }
+
+ createProcedure(
+ "testBug26959",
+ "(_ACTION varchar(20),"
+ + "\n`/*dumb-identifier-1*/` int,"
+ + "\n`#dumb-identifier-2` int,"
+ + "\n`--dumb-identifier-3` int,"
+ + "\n_CLIENT_ID int, -- ABC"
+ + "\n_LOGIN_ID int, # DEF"
+ + "\n_WHERE varchar(2000),"
+ + "\n_SORT varchar(2000),"
+ + "\n out _SQL varchar(/* inline right here - oh my gosh! */ 8000),"
+ + "\n _SONG_ID int,"
+ + "\n _NOTES varchar(2000),"
+ + "\n out _RESULT varchar(10)"
+ + "\n /*"
+ + "\n , -- Generic result parameter"
+ + "\n out _PERIOD_ID int, -- Returns the period_id. Useful when using
@PREDEFLINK to return which is the last period"
+ + "\n _SONGS_LIST varchar(8000),"
+ + "\n _COMPOSERID int,"
+ + "\n _PUBLISHERID int,"
+ + "\n _PREDEFLINK int -- If the user is accessing through a predefined link:
0=none 1=last period"
+ + "\n */) BEGIN SELECT 1; END");
+
+ createProcedure(
+ "testBug26959_1",
+ "(`/*id*/` /* before type 1 */ varchar(20),"
+ + "/* after type 1 */ OUT result2 DECIMAL(/*size1*/10,/*size2*/2) /* p2 */)"
+ + "BEGIN SELECT action, result; END");
+
+ try {
+ this.conn.prepareCall(
+ "{call testBug26959(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}")
+ .close();
+ this.rs = this.conn.getMetaData().getProcedureColumns(
+ this.conn.getCatalog(), null, "testBug26959", "%");
+
+ String[] parameterNames = new String[] { "_ACTION",
+ "/*dumb-identifier-1*/", "#dumb-identifier-2",
+ "--dumb-identifier-3", "_CLIENT_ID", "_LOGIN_ID", "_WHERE",
+ "_SORT", "_SQL", "_SONG_ID", "_NOTES", "_RESULT" };
+
+ int[] parameterTypes = new int[] { Types.VARCHAR, Types.INTEGER,
+ Types.INTEGER, Types.INTEGER, Types.INTEGER, Types.INTEGER,
+ Types.VARCHAR, Types.VARCHAR, Types.VARCHAR, Types.INTEGER,
+ Types.VARCHAR, Types.VARCHAR };
+
+ int[] direction = new int[] { DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnOut,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnOut };
+
+ int[] precision = new int[] { 20, 10, 10, 10, 10, 10, 2000, 2000,
+ 8000, 10, 2000, 10 };
+
+ int index = 0;
+
+ while (this.rs.next()) {
+ assertEquals(parameterNames[index], this.rs
+ .getString("COLUMN_NAME"));
+ assertEquals(parameterTypes[index], this.rs.getInt("DATA_TYPE"));
+ assertEquals(precision[index], this.rs.getInt("PRECISION"));
+ assertEquals(direction[index], this.rs.getInt("COLUMN_TYPE"));
+ index++;
+ }
+
+ this.rs.close();
+
+ index = 0;
+ parameterNames = new String[] { "/*id*/", "result2" };
+ parameterTypes = new int[] { Types.VARCHAR, Types.DECIMAL };
+ precision = new int[] { 20, 10 };
+ direction = new int[] { DatabaseMetaData.procedureColumnIn,
+ DatabaseMetaData.procedureColumnOut };
+ int[] scale = new int[] { 0, 2 };
+
+ this.conn.prepareCall("{call testBug26959_1(?, ?)}").close();
+
+ this.rs = this.conn.getMetaData().getProcedureColumns(
+ this.conn.getCatalog(), null, "testBug26959_1", "%");
+
+ while (this.rs.next()) {
+ assertEquals(parameterNames[index], this.rs
+ .getString("COLUMN_NAME"));
+ assertEquals(parameterTypes[index], this.rs.getInt("DATA_TYPE"));
+ assertEquals(precision[index], this.rs.getInt("PRECISION"));
+ assertEquals(scale[index], this.rs.getInt("SCALE"));
+ assertEquals(direction[index], this.rs.getInt("COLUMN_TYPE"));
+
+ index++;
+ }
+ } finally {
+ closeMemberJDBCResources();
+ }
+ }
+
+ /**
+ * Tests fix for BUG#27400 - CALL [comment] some_proc() doesn't work
+ */
+ public void testBug27400() throws Exception {
+ if (!serverSupportsStoredProcedures()) {
+ return; // SPs not supported
+ }
+
+ createProcedure("testBug27400", "(a INT, b VARCHAR(32)) BEGIN SELECT 1; END");
+
+ CallableStatement cStmt = null;
+
+ try {
+ cStmt = this.conn.prepareCall("{CALL /* SOME COMMENT */ testBug27400( /* does this
work too? */ ?, ?)} # and a commented ? here too");
+ assertTrue(cStmt.toString().indexOf("/*") != -1); // we don't want to strip the
comments
+ cStmt.setInt(1, 1);
+ cStmt.setString(2, "bleh");
+ cStmt.execute();
+ } finally {
+ if (cStmt != null) {
+ cStmt.close();
+ }
+ }
+ }
+
+ /**
+ * Tests fix for BUG#28689 - CallableStatement.executeBatch()
+ * doesn't work when connection property "noAccessToProcedureBodies"
+ * has been set to "true".
+ *
+ * The fix involves changing the behavior of "noAccessToProcedureBodies",
+ * in that the driver will now report all paramters as "IN" paramters
+ * but allow callers to call registerOutParameter() on them.
+ *
+ * @throws Exception
+ */
+ public void testBug28689() throws Exception {
+ if (!versionMeetsMinimum(5, 0)) {
+ return; // no stored procedures
+ }
+
+ createTable("testBug28689", "(" +
+
+ "`id` int(11) NOT NULL auto_increment,"
+ + "`usuario` varchar(255) default NULL,"
+ + "PRIMARY KEY (`id`)"
+ + ")");
+
+ this.stmt.executeUpdate("INSERT INTO testBug28689 (usuario) VALUES ('AAAAAA')");
+
+ createProcedure("sp_testBug28689", "(tid INT)"
+ + "\nBEGIN"
+ + "\nUPDATE testBug28689 SET usuario = 'BBBBBB' WHERE id = tid;"
+ + "\nEND");
+
+ Connection noProcedureBodiesConn =
getConnectionWithProps("noAccessToProcedureBodies=true");
+ CallableStatement cStmt = null;
+
+ try {
+ cStmt = noProcedureBodiesConn.prepareCall("{CALL sp_testBug28689(?)}");
+ cStmt.setInt(1, 1);
+ cStmt.addBatch();
+ cStmt.executeBatch();
+
+ assertEquals("BBBBBB", getSingleIndexedValueWithQuery(noProcedureBodiesConn, 1,
"SELECT `usuario` FROM testBug28689 WHERE id=1"));
+ } finally {
+ if (cStmt != null) {
+ cStmt.close();
+ }
+
+ if (noProcedureBodiesConn != null) {
+ noProcedureBodiesConn.close();
+ }
+ }
+ }
+
+ /**
+ * Tests fix for Bug#31823 - CallableStatement.setNull() on a stored
+ * function would throw an ArrayIndexOutOfBounds when setting the
+ * last parameter to null when calling setNull().
+ *
+ * @throws Exception
+ */
+ public void testBug31823() throws Exception {
+ if (!versionMeetsMinimum(5, 0)) {
+ return; // no stored functions
+ }
+
+ createTable("testBug31823",
+ "(value_1 BIGINT PRIMARY KEY,value_2 VARCHAR(20))");
+
+ createFunction(
+ "f_testBug31823",
+ "(value_1_v BIGINT,value_2_v VARCHAR(20)) RETURNS BIGINT "
+ + "DETERMINISTIC MODIFIES SQL DATA BEGIN INSERT INTO testBug31823 VALUES
(value_1_v,value_2_v); "
+ + "RETURN value_1_v; END;");
+
+ // Prepare the function call
+ CallableStatement callable = null;
+
+ try {
+ callable = this.conn.prepareCall("{? = call f_testBug31823(?,?)}");
+
+ callable.registerOutParameter(1, Types.BIGINT);
+
+ // Add row with non-null value
+ callable.setLong(2, 1);
+ callable.setString(3, "Non-null value");
+ callable.executeUpdate();
+ assertEquals(1, callable.getLong(1));
+
+ // Add row with null value
+ callable.setLong(2, 2);
+ callable.setNull(3, Types.VARCHAR);
+ callable.executeUpdate();
+ assertEquals(2, callable.getLong(1));
+
+ Method[] setters = CallableStatement.class.getMethods();
+
+ for (int i = 0; i < setters.length; i++) {
+ if (setters[i].getName().startsWith("set")) {
+ Class[] args = setters[i].getParameterTypes();
+
+ if (args.length == 2 && args[0].equals(Integer.TYPE)) {
+ if (!args[1].isPrimitive()) {
+ try {
+ setters[i].invoke(callable, new Object[] {
+ new Integer(2), null });
+ } catch (InvocationTargetException ive) {
+ if (!(ive.getCause() instanceof com.mysql.jdbc.NotImplemented)) {
+ throw ive;
+ }
+ }
+ } else {
+ if (args[1].getName().equals("boolean")) {
+ try {
+ setters[i].invoke(callable, new Object[] {
+ new Integer(2), Boolean.FALSE });
+ } catch (InvocationTargetException ive) {
+ if (!(ive.getCause() instanceof com.mysql.jdbc.NotImplemented)) {
+ throw ive;
+ }
+ }
+ }
+
+ if (args[1].getName().equals("byte")) {
+
+ try {
+ setters[i].invoke(callable,
+ new Object[] { new Integer(2),
+ new Byte((byte) 0) });
+ } catch (InvocationTargetException ive) {
+ if (!(ive.getCause() instanceof com.mysql.jdbc.NotImplemented)) {
+ throw ive;
+ }
+ }
+
+ }
+
+ if (args[1].getName().equals("double")) {
+
+ try {
+ setters[i].invoke(callable, new Object[] {
+ new Integer(2), new Double(0) });
+ } catch (InvocationTargetException ive) {
+ if (!(ive.getCause() instanceof com.mysql.jdbc.NotImplemented)) {
+ throw ive;
+ }
+ }
+
+ }
+
+ if (args[1].getName().equals("float")) {
+
+ try {
+ setters[i].invoke(callable, new Object[] {
+ new Integer(2), new Float(0) });
+ } catch (InvocationTargetException ive) {
+ if (!(ive.getCause() instanceof com.mysql.jdbc.NotImplemented)) {
+ throw ive;
+ }
+ }
+
+ }
+
+ if (args[1].getName().equals("int")) {
+
+ try {
+ setters[i].invoke(callable, new Object[] {
+ new Integer(2), new Integer(0) });
+ } catch (InvocationTargetException ive) {
+ if (!(ive.getCause() instanceof com.mysql.jdbc.NotImplemented)) {
+ throw ive;
+ }
+ }
+
+ }
+
+ if (args[1].getName().equals("long")) {
+ try {
+ setters[i].invoke(callable, new Object[] {
+ new Integer(2), new Long(0) });
+ } catch (InvocationTargetException ive) {
+ if (!(ive.getCause() instanceof com.mysql.jdbc.NotImplemented)) {
+ throw ive;
+ }
+ }
+ }
+
+ if (args[1].getName().equals("short")) {
+ try {
+ setters[i].invoke(callable, new Object[] {
+ new Integer(2),
+ new Short((short) 0) });
+ } catch (InvocationTargetException ive) {
+ if (!(ive.getCause() instanceof com.mysql.jdbc.NotImplemented)) {
+ throw ive;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ } finally {
+ if (callable != null) {
+ callable.close();
+ }
+ }
+ }
+}>>>>>>> .merge-right.r6658
| Thread |
|---|
| • Connector/J commit: r6682 - in trunk: . src/com/mysql/jdbc src/testsuite/regression | mmatthews | 19 Nov |