3.3.0 catalog问题

3.3.0 创建JDBC-catalog连接2.3.13的starrocks,查询提示表不存在(show tables/databases正常),同样的操作3.2.4可以查询

报错内容:ERROR 5502 (42602): Getting analyzing error. Detail message: Unknown table
语句:CREATE EXTERNAL CATALOG sr_old
PROPERTIES
(
“type”=“jdbc”,
“user”="",
“password”="",
“jdbc_uri”="jdbc:mysql:// ",
“driver_url”=“https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar”,
“driver_class”=“com.mysql.cj.jdbc.Driver”
);

3.2.4 和 3.3.0 创建catalog的命令是一样的么,fe日志里有什么详细的日志信息么

catalog的创建命令是一样的

2024-07-01 20:15:00.560+08:00 INFO (starrocks-mysql-nio-pool-2984|415668) [MetadataMgr$QueryMetadatas.getConnectorMetadata():107] Succeed to register query level connector metadata [catalog:sr_old, queryId: 89f66d8a-37a3-11ef-9e55-8a32d72586a5]
2024-07-01 20:15:00.584+08:00 WARN (starrocks-mysql-nio-pool-2984|415668) [Slf4JLogger.warn():99] Error: 1064-HY000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘UNSIGNED’ at line 1
2024-07-01 20:15:00.584+08:00 WARN (starrocks-mysql-nio-pool-2984|415668) [JDBCMetadata.lambda$getTable$1():211] get table for JDBC catalog fail!
java.sql.SQLException: (conn=39219) You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘UNSIGNED’ at line 1

请检查下查询表的语句是不是正确

1赞

select * from $tb limit 2;


会和JDK版本有关系吗,我看3.3.0的JDK需要用11 但是3.2.4用的是JDK8

完整的“jdbc_uri”="jdbc:mysql:// ",发一下,ip可以码住

CREATE EXTERNAL CATALOG sr_old
PROPERTIES
(
“type”=“jdbc”,
“user”="",
“password”="",
“jdbc_uri”="jdbc:mysql://$ip:9030 ",
“driver_url”=“https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.28/mysql-connector-java-8.0.28.jar”,
“driver_class”=“com.mysql.cj.jdbc.Driver”
);

正式创建时端口后面也有个空格么

嗯对 有的

您删除catalog,删除空格重新创建试下

我遇到一摸一样的情况:

我敢肯定 这是个大bug了

看下我的回复,我的没有空格,也是报错查不到表,但是show table 和 show databases 都正常

看起来是阿里云 adb 的问题,正常 mysql 没有问题
2025-02-13 17:40:36.226+08:00 WARN (starrocks-mysql-nio-pool-2|3594) [JDBCMetadata.lambda$getTable$1():215] get table for JDBC catalog fail! java.sql.SQLException: (conn=20888) [20034, 2025021317403619216812317303151052758] : Unknown type: unsigned integer at org.mariadb.jdbc.export.ExceptionFactory.createException(ExceptionFactory.java:306) at org.mariadb.jdbc.export.ExceptionFactory.create(ExceptionFactory.java:378) at org.mariadb.jdbc.message.ClientMessage.readPacket(ClientMessage.java:172) at org.mariadb.jdbc.client.impl.StandardClient.readPacket(StandardClient.java:913) at org.mariadb.jdbc.client.impl.StandardClient.readResults(StandardClient.java:852) at org.mariadb.jdbc.client.impl.StandardClient.readResponse(StandardClient.java:771) at org.mariadb.jdbc.client.impl.StandardClient.execute(StandardClient.java:695) at org.mariadb.jdbc.Statement.executeInternal(Statement.java:1035) at org.mariadb.jdbc.Statement.executeQuery(Statement.java:166) at org.mariadb.jdbc.DatabaseMetaData.executeQuery(DatabaseMetaData.java:560) at org.mariadb.jdbc.DatabaseMetaData.getColumns(DatabaseMetaData.java:931) at com.starrocks.connector.jdbc.JDBCSchemaResolver.getColumns(JDBCSchemaResolver.java:61) at com.starrocks.connector.jdbc.JDBCMetadata.lambda$getTable$1(JDBCMetadata.java:200) at com.starrocks.connector.jdbc.JDBCMetaCache.get(JDBCMetaCache.java:73) at com.starrocks.connector.jdbc.JDBCMetadata.getTable(JDBCMetadata.java:197) at com.starrocks.connector.CatalogConnectorMetadata.getTable(CatalogConnectorMetadata.java:149) at com.starrocks.server.MetadataMgr.lambda$getTable$5(MetadataMgr.java:510) at java.base/java.util.Optional.map(Optional.java:265) at com.starrocks.server.MetadataMgr.getTable(MetadataMgr.java:510) at com.starrocks.qe.ShowExecutor$ShowExecutorVisitor.showCreateExternalCatalogTable(ShowExecutor.java:789) at com.starrocks.qe.ShowExecutor$ShowExecutorVisitor.visitShowCreateTableStatement(ShowExecutor.java:701) at com.starrocks.qe.ShowExecutor$ShowExecutorVisitor.visitShowCreateTableStatement(ShowExecutor.java:291) at com.starrocks.sql.ast.ShowCreateTableStmt.accept(ShowCreateTableStmt.java:115) at com.starrocks.sql.ast.AstVisitor.visit(AstVisitor.java:84) at com.starrocks.qe.ShowExecutor.execute(ShowExecutor.java:288) at com.starrocks.qe.StmtExecutor.handleShow(StmtExecutor.java:1894) at com.starrocks.qe.StmtExecutor.execute(StmtExecutor.java:749) at com.starrocks.qe.ConnectProcessor.handleQuery(ConnectProcessor.java:372) at com.starrocks.qe.ConnectProcessor.dispatch(ConnectProcessor.java:572) at com.starrocks.qe.ConnectProcessor.processOnce(ConnectProcessor.java:910) at com.starrocks.mysql.nio.ReadListener.lambda$handleEvent$0(ReadListener.java:69) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829)