MySQL Connector/J 5.1.42 has been released

2017-04-27 Thread Gipson Pulla
Dear MySQL Users,

MySQL Connector/J 5.1.42, a maintenance release of the production 5.1
branch has been released. Connector/J is the Type-IV pure-Java JDBC
driver for MySQL.

MySQL Connector Java is available in source and binary form from the
Connector/J download pages at
http://dev.mysql.com/downloads/connector/j/5.1.html
and mirror sites as well as Maven-2 repositories.

MySQL Connector Java (Commercial) is already available for download on the
My Oracle Support (MOS) website. This release will be available on eDelivery
(OSDC) in next month's upload cycle.

As always, we recommend that you check the "CHANGES" file in the
download archive to be aware of changes in behavior that might affect
your application.

MySQL Connector/J 5.1.42 includes the following general bug fixes and
improvements, also available in more detail on
http://dev.mysql.com/doc/relnotes/connector-j/en/news-5-1-41.html

Changes in MySQL Connector/J 5.1.42 (2017-04-28)

   Version 5.1.42 is a maintenance release of the production 5.1
   branch. It is suitable for use with MySQL Server versions
   5.5, 5.6, and 5.7. It supports the Java Database Connectivity
   (JDBC) 4.2 API.

 * Functionality Added or Changed

 * Bugs Fixed

   Functionality Added or Changed

 * A null value can now be extracted from a result set to a
   class belonging to the java.time package. Before, such an
   extraction resulted in a NullPointerException being
   thrown. Thanks to Martin Desharnais for contributing the
   code. (Bug #25250938, Bug #84189)

 * Connector/J now checks that a MySQL server's SSL
   certificate and the Certificate Authority (CA) that
   issued it are not expired before establishing an SSL
   connection with the server, even if the connection
   property verifyServerCertificate is set to false. (Bug
   #20515688)

 * Name-value pairs contained in the connection property
   sessionVariables can now be separated by either commas or
   a semicolons. (Bug #17757070)

   Bugs Fixed

 * An invalid timezone identifier was used in
   StatementRegressionTest.java of the Connector/J
   testsuite. (Bug #25687718, Bug #85351)

 * A mysql client failed to establish an SSL connection to
   the server using the SSL certificates provided in the
   Connector/J source package. It was because the
   certificates have been generated with the same Common
   Name. This fix corrects the Common Names and regenerates
   the SSL certificates. (Bug #25636947)

 * The unit test testsuite.simple.ResultSetTest.testPadding
   failed with the error Unknown character set: 'gb18030'
   after the collation map updates in release 5.1.40. (Bug
   #25556597)

 * In a multi-host connection, query timeouts did not occur
   as configured. It was because the CancelTask thread, when
   trying to access the top level, virtual connection
   object, ran into a race condition with the connection
   monitor and then hung. With this fix, the CancelTask
   thread is passed a direct reference to the underlying
   physical connection, with which it can execute the
   cancellation. (Bug #25490163, Bug #84783)

 * CallableStatement.extractProcedureName() did not return
   the correct result when the procedure name contained a
   dash. This was due to an error in the stripComments()
   method of the StringUtils class, which has now been
   corrected. (Bug #25321524, Bug #84324)

 * The ConnectionImpl.isReadOnly() method returned a
   confusing error message when it could not retrieve the
   read-only status of the server. The message has now been
   changed to "Could not retrieve transaction read-only
   status from server." (Bug #25101890, Bug #83834)

 * A NullPointerException was thrown when a null boolean
   value was being read from the database. (Bug #25048406,
   Bug #83662)

 * After a BIT value had been retrieved from a result set,
   the wasNull() method of the result set returned value for
   the last wasNull() query instead of the value for the
   last retrieved column. (Bug #24841670, Bug #83368)

 * Using a partially-quoted identifier (with only the
   database or the procedure name quoted) or a non-existent
   parameter to register an output parameter in a
   CallableStatement caused a NullPointerException. With
   this fix, a partially-quoted identifier is accepted, and
   a non-existent parameter causes a SQLError to be thrown.
   (Bug #22333996, Bug #79561)

 * DatabaseMetaData.getProcedureColumns() and
   DatabaseMetaData.getFunctionColumns() did not return
   expected results. This was due to the errors with the
   matching algorithm for the column names, which have now
   been fixed. Notice that, however, the effects of the
   connection parameter getProceduresReturnsFunctions on the
   two methods 

Re: Can not add foreign key constraint

2017-04-27 Thread David Mehler
Hello,

 Here's the output of the command show create table virtual_users:

  create table virtual_users;
 
+---+-+
 | Table | Create Table






  |
 
+---+-+
 | virtual_users | CREATE TABLE `virtual_users` (
   `id` int(11) NOT NULL AUTO_INCREMENT,
   `domain_id` int(11) NOT NULL,
   `user` varchar(40) NOT NULL,
   `password` varchar(128) NOT NULL,
   `quota` bigint(20) NOT NULL DEFAULT '0',
   `quota_messages` int(11) NOT NULL DEFAULT '0',
   PRIMARY KEY (`id`),
   UNIQUE KEY `UNIQUE_EMAIL` (`domain_id`,`user`),
   CONSTRAINT `virtual_users_ibfk_1` FOREIGN KEY (`domain_id`)
 REFERENCES `virtual_domains` (`id`) ON DELETE CASCADE
 ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 |
 
+---+-+
 1 row in set (0.00 sec)

Thanks.
Dave.

>
>
> On 4/26/17, Johan De Meersman  wrote:
>>
>> I note that the innodb status says it couldn't find an index on the
>> referenced column. Did the create statements come from your create
>> scripts
>> or from a show create table statement? I'm suspicious about the index on
>> virtual_users(user).
>>
>>
>> - Original Message -
>>> From: "David Mehler" 
>>> To: "MySql" 
>>> Sent: Tuesday, 25 April, 2017 23:07:19
>>> Subject: Re: Can not add foreign key constraint
>>
>>> Hello,
>>>
>>> Tried recreating the virtual_users table didn't solve anything. Would
>>> it be possible for anyone to check out my box directly?
>>>
>>> Thanks.
>>> Dave.
>>
>> --
>> The bay-trees in our country are all wither'd
>> And meteors fright the fixed stars of heaven;
>> The pale-faced moon looks bloody on the earth
>> And lean-look'd prophets whisper fearful change.
>> These signs forerun the death or fall of kings.
>>   -- Wm. Shakespeare, "Richard II"
>>
>
> Thanks.
> Dave.
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/mysql