=== modified file 'driver/results.c' --- driver/results.c 2010-06-03 22:37:58 +0000 +++ driver/results.c 2010-06-03 22:42:09 +0000 @@ -664,8 +664,10 @@ field->table ? field->table : ""); case SQL_DESC_CASE_SENSITIVE: - *(SQLINTEGER *)NumericAttributePtr= (field->flags & BINARY_FLAG ? - SQL_FALSE : SQL_TRUE); + *(SQLINTEGER *)NumericAttributePtr= ((field->charsetnr == 63 || field->flags & BINARY_FLAG) && + (test(field->org_table_length > 0) || + ((stmt->dbc->flag & FLAG_NO_BINARY_RESULT) == 0)) ? + SQL_TRUE : SQL_FALSE); break; case SQL_DESC_CATALOG_NAME: === modified file 'test/my_result.c' --- test/my_result.c 2010-01-30 23:08:01 +0000 +++ test/my_result.c 2010-06-03 21:53:21 +0000 @@ -1271,7 +1271,7 @@ DECLARE_TEST(t_colattributes) { SQLLEN count; - SQLINTEGER isauto; + SQLINTEGER isauto, issensitive; ok_sql(hstmt, "DROP TABLE IF EXISTS t_colattr"); @@ -1286,7 +1286,7 @@ "m1 MEDIUMINT," "m2 MEDIUMINT(10)," "m3 MEDIUMINT UNSIGNED," - "i1 INT," +/* 10 */ "i1 INT," "i2 INT(10) NOT NULL," "i3 INT UNSIGNED," "i4 INT ZEROFILL," @@ -1296,7 +1296,7 @@ "f1 FLOAT," "f2 FLOAT(10)," "f3 FLOAT(24) ZEROFILL," - "f4 FLOAT(10,4)," +/* 20 */ "f4 FLOAT(10,4)," "d1 DOUBLE," "d2 DOUBLE(30,3)," "d3 DOUBLE PRECISION," @@ -1306,17 +1306,17 @@ "dc1 DECIMAL," "dc2 DECIMAL(10)," "dc3 DECIMAL(10,3)," - "n1 NUMERIC," +/* 30 */ "n1 NUMERIC," "n2 NUMERIC(10,3)," "dt DATE," "dtime DATETIME," - "ts1 TIMESTAMP(8)," - "ts2 TIMESTAMP(14)," + "ts1 TIMESTAMP/*(8)*/," + "ts2 TIMESTAMP/*(14)*/," "ti TIME," "yr1 YEAR," "yr2 YEAR(2)," "yr3 YEAR(4)," - "c1 CHAR(10)," +/* 40 */ "c1 CHAR(10)," "c2 CHAR(10) BINARY," "c3 NATIONAL CHAR(10)," "v1 VARCHAR(10)," @@ -1326,7 +1326,7 @@ "bl2 BLOB," "bl3 MEDIUMBLOB," "bl4 LONGBLOB," - "txt1 TINYTEXT," +/* 50 */ "txt1 TINYTEXT," "txt2 TEXT," "txt3 MEDIUMTEXT," "txt4 LONGTEXT," @@ -1344,6 +1344,17 @@ NULL, &isauto)); is_num(isauto, SQL_TRUE); + + /* c1 CHAR(10) */ + ok_stmt(hstmt, SQLColAttribute(hstmt, 40, SQL_DESC_CASE_SENSITIVE,NULL, 0, NULL, &issensitive)); + is_num(issensitive, SQL_FALSE); + /* c2 CHAR(10) BINARY */ + ok_stmt(hstmt, SQLColAttribute(hstmt, 41, SQL_DESC_CASE_SENSITIVE,NULL, 0, NULL, &issensitive)); + is_num(issensitive, SQL_TRUE); + /* bl1 TINYBLOB */ + ok_stmt(hstmt, SQLColAttribute(hstmt, 46, SQL_DESC_CASE_SENSITIVE,NULL, 0, NULL, &issensitive)); + is_num(issensitive, SQL_TRUE); + ok_sql(hstmt, "DROP TABLE IF EXISTS t_colattr"); return OK; @@ -2077,7 +2088,6 @@ { SQLCHAR buff[10]; SQLLEN len= 0; - SQLSMALLINT namelen, type, digits, nullable; ok_stmt(hstmt, SQLPrepare(hstmt, (SQLCHAR *) "SELECT ?", SQL_NTS)); strcpy((char *)buff, "2.0"); @@ -2156,7 +2166,7 @@ ok_stmt(hstmt, SQLExtendedFetch(hstmt, SQL_FETCH_NEXT, 1, &count, &status)); - is(colSize >= boundLen); + is(colSize >= (SQLULEN)boundLen); ok_stmt(hstmt, SQLFreeStmt(hstmt, SQL_CLOSE)); ok_sql(hstmt, "drop table if exists bug24131");