4 messages in com.mysql.lists.javagetPrimaryKeys Bug
FromSent OnAttachments
James Bowling03 Dec 2003 21:07 
Mark Matthews04 Dec 2003 17:52 
Ralf Hauser05 Dec 2003 01:40 
James Bowling05 Dec 2003 18:06 
Subject:getPrimaryKeys Bug
From:James Bowling (jhbj@yahoo.com)
Date:12/03/2003 09:07:43 PM
List:com.mysql.lists.java

The getPrimaryKeys method uses the "Key_name" to determine if a column is a
primary key column. My primary key name is of the form XXX_PK, so neither 3.1.0
alpha nor 3.0.9 stable will return my key column.

String keyType = rs.getString("Key_name");

3.1.0 alpha if (keyType.toUpperCase().startsWith("PRI")) { 3.0.9 stable if (keyType.equalsIgnoreCase("PRIMARY") || keyType.equalsIgnoreCase("PRI")) {