Open jazd opened 2 months ago
The same client and database using the useInformationSchema option. sqlline> !connect jdbc:oceanbase://172.16.4.198:2881/db1?useInformationSchema
0: jdbc:oceanbase://172.16.4.198:2881/db1> !tables
+-----------+-------------+------------+------------+---------+----------+------------+-----------+---------------------------+----------------+
| TABLE_CAT | TABLE_SCHEM | TABLE_NAME | TABLE_TYPE | REMARKS | TYPE_CAT | TYPE_SCHEM | TYPE_NAME | SELF_REFERENCING_COL_NAME | REF_GENERATION |
+-----------+-------------+------------+------------+---------+----------+------------+-----------+---------------------------+----------------+
| db1 | | results | TABLE | | | | | | |
| db1 | | stuff | TABLE | | | | | | |
| db1 | | zot | TABLE | ZOT Me | | | | | |
+-----------+-------------+------------+------------+---------+----------+------------+-----------+---------------------------+----------------+
Describe the bug
When using the driver without the useInformationSchema option the getTables REMARK column returns the result of
new byte[0].toString();
which results in values like[B@78aab498
Environment
For any version of the obconnector-j, I used 2.4.10 For any JDBC SQL client, I used sqlline
Fast reproduce steps
JDBC Connection string without the useInformationSchema option.
Expected behavior
sqlline> !connect jdbc:oceanbase://172.16.4.198:2881/db1
Actual behavior
sqlline> !connect jdbc:oceanbase://172.16.4.198:2881/db1
Additional context
The line that produces the invalid column values in version 2.4.10 is JDBC4DatabaseMetaData.java:1014
data[4] = new byte[0].toString();