longtext missing from getColumns() method

longtext missing from getColumns() method

am 09.01.2003 15:35:26 von kvanbrun

Description:
In the JDBC connector for MySQL, a method called getColumns() appears
in the class DatabaseMetaData. One portion of the code determines the
size of each column by using its type. The column type "longtext" is
missing from the code in both the production and development versions.

How-To-Repeat:
Call getColumns() and ask for a column of type "longtext".

Fix:
Production version (2.0.14):
else if (TypeInfo.toLowerCase().equals("longtext"))
{
Size =
(Integer.toString(MysqlIO.getMaxBuf()).compareTo("2147483657 ") < 0
? Integer.toString(MysqlIO.getMaxBuf())
: "2147483657");
}

Development version (3.0.3-beta):
else if (typeInfo.equalsIgnoreCase("longtext"))
{
size = Integer.toString(Integer.MAX_VALUE);
}

Synopsis: longtext missing from getColumns() method
Submitter-Id: kvanbrun@harris.com
Originator: Kevin Van Brunt
Severity: non-critical
Priority: low
Category: mysql JDBC connector
Class: sw-bug
Release: at least mysql-connector-java-2.0.14 and higher

------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13432@lists.mysql.com
To unsubscribe, e-mail

Re: longtext missing from getColumns() method

am 09.01.2003 16:53:48 von Sinisa Milivojevic

Van Brunt, Kevin writes:
> Description:
> In the JDBC connector for MySQL, a method called getColumns() appears
> in the class DatabaseMetaData. One portion of the code determines the
> size of each column by using its type. The column type "longtext" is
> missing from the code in both the production and development versions.
>
> How-To-Repeat:
> Call getColumns() and ask for a column of type "longtext".
>

Thank you for your bug report and it truly looks like the ommission.

But I would like to stress that it the best way to get size of each
column is from the result set itself, unless you wish to get create
info for the table.

--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com

Join MySQL Users Conference and Expo:
http://www.mysql.com/events/uc2003/


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13435@lists.mysql.com
To unsubscribe, e-mail

Re: longtext missing from getColumns() method

am 09.01.2003 17:30:14 von Mark Matthews

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Van Brunt, Kevin wrote:
> Description:
> In the JDBC connector for MySQL, a method called getColumns() appears
> in the class DatabaseMetaData. One portion of the code determines the
> size of each column by using its type. The column type "longtext" is
> missing from the code in both the production and development versions.
>
> How-To-Repeat:
> Call getColumns() and ask for a column of type "longtext".
>
> Fix:
> Production version (2.0.14):
> else if (TypeInfo.toLowerCase().equals("longtext"))
> {
> Size =
> (Integer.toString(MysqlIO.getMaxBuf()).compareTo("2147483657 ") < 0
> ? Integer.toString(MysqlIO.getMaxBuf())
> : "2147483657");
> }
>
> Development version (3.0.3-beta):
> else if (typeInfo.equalsIgnoreCase("longtext"))
> {
> size = Integer.toString(Integer.MAX_VALUE);
> }
>
> Synopsis: longtext missing from getColumns() method
> Submitter-Id: kvanbrun@harris.com
> Originator: Kevin Van Brunt
> Severity: non-critical
> Priority: low
> Category: mysql JDBC connector
> Class: sw-bug
> Release: at least mysql-connector-java-2.0.14 and higher
>
> ------------------------------------------------------------ ---------
> Before posting, please check:
> http://www.mysql.com/manual.php (the manual)
> http://lists.mysql.com/ (the list archive)
>
> To request this thread, e-mail bugs-thread13432@lists.mysql.com
> To unsubscribe, e-mail
>

Fixed in the source tree for Connector/J 3.0.x. Will show up in release
3.0.5 GAMMA, or you can check out the nightly snapshot (after midnight
tonight CST) at http://mmmysql.sourceforge.net/snapshots/

-Mark

- --
MySQL 2003 Users Conference -> http://www.mysql.com/events/uc2003/

For technical support contracts, visit https://order.mysql.com/?ref=mmma

__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mark Matthews
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Full-Time Developer - JDBC/Java
/_/ /_/\_, /___/\___\_\___/ Flossmoor (Chicago), IL USA
<___/ www.mysql.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.1.90 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE+HaOWtvXNTca6JD8RAt56AKCKtjmadatVE7QRh41B4+OZbMlcHACg wXPJ
kBM9s+L+IoHgtQT7AfcZr8k=
=wApB
-----END PGP SIGNATURE-----


------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)

To request this thread, e-mail bugs-thread13436@lists.mysql.com
To unsubscribe, e-mail