-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Roberto Leibman wrote:
> OK, > A few days ago I reported a problem with getImportedKeys, since nobody > came with a solution that would work, I did some research, downloaded > the code for the driver (I actually downloaded the code for Alpha, since > I wanted to report the bug, if there was one as accurately as possible). > As far as I can tell, it is a bug. I hope one of the developers is > reading this list and can respond directly as to how to proceed with > this, or if anyone knows where to post this, please let me know. > > In line 4926 of DatabaseMetaData.java, the code is looking for a line > starting with "FOREIGN KEY". > > The problem seems to be that the version of mysql I have (mysql > --version gives me 'mysql Ver 12.20 Distrib 4.0.13, for pc-linux > (i686)') > Returns the following when you do a show create table: > > mysql> show Create Table Template > > CREATE TABLE `Template` ( > `template_ID` int(11) NOT NULL auto_increment, > `foreign_Key_ID` int(11) NOT NULL default '0', > `string_Field` varchar(255) default NULL, > `date_Field` timestamp(14) NOT NULL, > `boolean_Field` tinyint(4) default NULL, > `double_Field` double default NULL, > `decimal_Field` decimal(10,0) default NULL, > PRIMARY KEY (`template_ID`), > KEY `fkid_ind` (`foreign_Key_ID`), > CONSTRAINT `0_45` FOREIGN KEY (`foreign_Key_ID`) REFERENCES > `ForeignTable` (`foreign_ID`) > ) TYPE=InnoDB > > If you pay a little attention, the line with the foreign key happens to > have the name of the constraint as well as the word FOREIGN KEY. > This of course, breaks the algorithm. > > Perhaps something along the lines of line.substring may work better than > line.startsWith? > > Thank you very much! > > Roberto Leibman > > P.S. Here are the versions of software I use > mysql: > mysql Ver 12.20 Distrib 4.0.13, for pc-linux (i686) > java: > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_02-b06) > Java HotSpot(TM) Client VM (build 1.4.1_02-b06, mixed mode) > mysql connector: > mysql-connector-java-3.1.0-alpha-bin.jar This was fixed last week, and is in the nightly snapshots (http://mmmysql.sourceforge.net/). Sorry that you weren't aware of http://bugs.mysql.com/ where bug reports are taken and closed (maybe we need to start adding it into the tagline for this list). Please check http://bugs.mysql.com/ when reporting bugs to [EMAIL PROTECTED], because it will save you some time if the bug has already been reported (and in this case, fixed and closed :) ) (See http://bugs.mysql.com/bug.php?id=517 and and a duplicate of #517, http://bugs.mysql.com/bug.php?id=664) -Mark - -- For technical support contracts, visit https://order.mysql.com/?ref=mmma __ ___ ___ ____ __ / |/ /_ __/ __/ __ \/ / Mark Matthews <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, SW Dev. Manager - J2EE/Windows /_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA <___/ www.mysql.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+9jQGtvXNTca6JD8RAgT8AKCyO9C535hHvTl3gpx/C62A0deshgCfbcVy e2HfcqWPJP/8NN9BSUk3c/w= =AgQ2 -----END PGP SIGNATURE----- -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]