package testsuite.simple; import testsuite.BaseTestCase; public class TestBug21770 extends BaseTestCase{ public TestBug21770(String name) { super(name); } /* *Test for Bugs: #21770: MetaData getColumnClassName() Returning Strange Result & Some Text as Blob, *returning wrong collumn class name for some BLOB types * * @throws Exception */ public void testbug21770() throws Exception { createTable("bug21770", "(data_type_id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,"+ "char_type CHAR(30) DEFAULT NULL,"+ "varchar_type VARCHAR(30) DEFAULT NULL,"+ "tinyBlob_type TINYBLOB DEFAULT NULL,"+ "blob_type BLOB DEFAULT NULL,"+ "mediumBlob_type MEDIUMBLOB DEFAULT NULL,"+ "longBlob_type LONGBLOB DEFAULT NULL,"+ "tinyText_type TINYTEXT DEFAULT NULL,"+ "text_type TEXT DEFAULT NULL,"+ "mediumText_type MEDIUMTEXT DEFAULT NULL,"+ "longText_type LONGTEXT DEFAULT NULL,"+ "enum_type ENUM('New', 'Used') NOT NULL DEFAULT 'New',"+ "set_type SET('a', 'b', 'c') DEFAULT NULL,"+ "tinyInt_type TINYINT DEFAULT NULL,"+ "smallInt_type SMALLINT UNSIGNED DEFAULT NULL,"+ "mediumInt_type MEDIUMINT DEFAULT NULL,"+ "int_type INT DEFAULT NULL,"+ "bigInt_type BIGINT DEFAULT NULL,"+ "float_type FLOAT DEFAULT NULL,"+ "double_type DOUBLE DEFAULT NULL,"+ "decimal_type DECIMAL(16,2) DEFAULT NULL,"+ "date_type DATE DEFAULT NULL,"+ "time_type TIME DEFAULT NULL,"+ "dateTime_type DATETIME DEFAULT NULL,"+ "timeStamp_type TIMESTAMP,"+ "year_type YEAR DEFAULT NULL"+ ") TYPE = InnoDB;"); try { this.rs = this.stmt.executeQuery("SELECT * FROM bug21770"); java.sql.ResultSetMetaData tblMD = this.rs.getMetaData(); for (int i=1; i