Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mycat1.6.7.6连接postgresql问题 #2934

Open
lisihan0607 opened this issue May 9, 2023 · 5 comments
Open

mycat1.6.7.6连接postgresql问题 #2934

lisihan0607 opened this issue May 9, 2023 · 5 comments
Assignees
Labels

Comments

@lisihan0607
Copy link

1、bug描述
配置postgresql后日志报错如下:
2023-05-09 14:57:25.967 WARN [BusinessExecutor4] (io.mycat.backend.mysql.nio.handler.SingleNodeHandler.backConnectionErr(SingleNodeHandler.java:287)) - execute sql err : errno:0 ERROR: missing FROM-clause entry for table "session"
Position: 99
Where: referenced column: auto_increment_increment con:JDBCConnection [id=24,autocommit=true,pool=io.mycat.backend.jdbc.JDBCDatasource@32c432cb, schema=smc, dbType=POSTGRESQL, oldSchema=smc, packetId=1, txIsolation=0, running=false, borrowed=true, host=192.168.xxx.xxx, port=xxx, con=org.postgresql.jdbc4.Jdbc4Connection@89e10, respHandler=SingleNodeHandler [node=xxx{/* mysql-connector-java-5.1.48 ( Revision: 29734982609c32d3ab7e5cac2e6acee69ff6b4aa ) /SELECT @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@performance_schema AS performance_schema, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@transaction_isolation AS transaction_isolation, @@wait_timeout AS wait_timeout}, packetId=1], attachement=xxx{/ mysql-connector-java-5.1.48 ( Revision: 29734982609c32d3ab7e5cac2e6acee69ff6b4aa ) */SELECT @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@collation_server AS collation_server, @@collation_connection AS collation_connection, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@performance_schema AS performance_schema, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@transaction_isolation AS transaction_isolation, @@wait_timeout AS wait_timeout}, headerOutputed=false, modifiedSQLExecuted=false, startTime=1683615445270, lastTime=1683615445903, isSpark=false, processor=io.mycat.net.NIOProcessor@4b2f4d52] frontend host:192.168.xxx.xxx/55542/root
给postgresq发了mysql的sql执行导致报错?
之前用的1.6没有这个问题
近期想修改mycat模拟的mysql版本,发现只能升级到1.6.7.6才能使用mysql8.x,但升级后就出现了上述报错

2、版本号(非常重要)
v 1.6.7.6

3、相关表的配置信息
schema.xml (需包含表的配置信息,mysql的连接驱动是JDBC还是native方式)
rule.xml (涉及到的路由函数)
server.xml(可选)

4、操作步骤

  1. '...'
  2. '....'
  3. ...

5、期望结果
A clear and concise description of what you expected to happen.

6、实际结果
A clear and concise description of what actually happened.

7、额外信息
Add any other context about the problem here.

@hedong0112
Copy link

这项目没维护了,什么postgresql、oracle、sqlserver、达梦之类的,适配一堆bug没人解决,也就mysql还能用

@yuyinw
Copy link

yuyinw commented May 30, 2023

我这边测试,报找不到postgres驱动的问题:java.sql.SQLException: No suitable driver found for jdbc:postgresql.....

@yuyinw
Copy link

yuyinw commented May 30, 2023

我这边测试,报找不到postgres驱动的问题:java.sql.SQLException: No suitable driver found for jdbc:postgresql.....

替换postgres驱动解决

@CXLGai
Copy link

CXLGai commented May 31, 2023

请问一下楼主解决了吗?我也遇到和你相同的问题

@yuyinw
Copy link

yuyinw commented May 31, 2023

请问这个问题有遇到过么:mycat ERROR: column "version_comment" does not exist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants