You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/11/19 06:55:57 UTC

[GitHub] [shardingsphere] iamif3000 opened a new issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

iamif3000 opened a new issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218


   ### Which version of ShardingSphere did you use?
   tag 4.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   sharding-proxy
   
   ### Expected behavior
   No error
   
   ### Actual behavior
   Error reported.
   
   ### Reason analyze (If you can)
   Probably the binary protocol part is not compatible with mysql.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   - login with mysql client
   - run the following sqls
     - create table t1(id bigint unsigned not null auto_increment, name varchar(100), primary key(id
   ));
     - create table t2(id bigint unsigned not null auto_increment, name varchar(100), primary key(id
   ));
     - select * from t1;
   - result
   
   > ERROR 2027 (HY000): received malformed packet
   
   ### Example codes for reproduce this issue (such as a github link).
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] iamif3000 commented on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
iamif3000 commented on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-732010204


   @tuohai666  
   The log 
   
   -----------
   [INFO ] 16:27:50.477 [ShardingSphere-Command-3] ShardingSphere-SQL - Logic SQL: select * from t3
   [INFO ] 16:27:50.477 [ShardingSphere-Command-3] ShardingSphere-SQL - SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@3de4b6fc, tablesContext=org.apache.shardingsphere.sql.parser.binder.segment.table.TablesContext@b94c3ac), tablesContext=org.apache.shardingsphere.sql.parser.binder.segment.table.TablesContext@b94c3ac, projectionsContext=ProjectionsContext(startIndex=7, stopIndex=7, distinctRow=false, projections=[ShorthandProjection(owner=Optional.empty, actualColumns=[])]), groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByContext@1d6c5945, orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@105038e6, paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@89b2f46, containsSubquery=false)
   [INFO ] 16:27:50.477 [ShardingSphere-Command-3] ShardingSphere-SQL - Actual SQL: slave_ds_0 ::: select * from t3
   -----------
   ![image](https://user-images.githubusercontent.com/16129632/99941744-82ac8780-2da9-11eb-8335-243bbdda3b97.png)
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] caohuanglin commented on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
caohuanglin commented on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-1078707255


   check your system locale and mysql charset #16348 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] tuohai666 commented on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
tuohai666 commented on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-731965278


   @iamif3000 Please set **sql.show: true**
   And show me the log generated by proxy.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] iamif3000 edited a comment on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
iamif3000 edited a comment on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-730181524


   > I can't reproduce it.
   > Can you show your config with proxy, and your mysql version(server/client)?
   
   server.yaml
   --------------------
   authentication:
     users:
       root:
         password: root
       sharding:
         password: sharding 
         authorizedSchemas: master_slave_db
   
   props:
     max.connections.size.per.query: 1
     acceptor.size: 4
     executor.size: 16
     proxy.frontend.flush.threshold: 128
     proxy.transaction.type: LOCAL
     proxy.opentracing.enabled: false
     proxy.hint.enabled: false
     query.with.cipher.column: true
     sql.show: true
     allow.range.query.with.inline.sharding: false
   
   config-master_slave.yaml
   -------------------------
   schemaName: master_slave_db
   
   dataSources:
     master_ds:
       url: jdbc:mysql://172.31.197.149:3306/proxy?serverTimezone=UTC&useSSL=false
       username: proxy
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     slave_ds_0:
       url: jdbc:mysql://172.31.197.149:3307/proxy?serverTimezone=UTC&useSSL=false
       username: proxy
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   masterSlaveRule:
     name: ms_ds
     masterDataSourceName: master_ds
     slaveDataSourceNames:
       - slave_ds_0
   
   client version
   -------------------------
   Ver 15.1 Distrib 10.5.8-MariaDB, for Linux (x86_64) using readline 5.1
   Server is 10.5.8-MariaDB.
   
   @kimmking 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] iamif3000 commented on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
iamif3000 commented on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-731059493


   I find out that table names such as "test", "test2", "test3" ...  makes the reproducing easy.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] terrymanu commented on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-731917065


   First analyzation:
   MariaDB's protocol may a little different with MySQL.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] kimmking commented on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-730175710


   I can't reproduce it.
   Can you show your config with proxy, and your mysql version(server/client)?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] iamif3000 commented on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
iamif3000 commented on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-730183454


   @kimmking you can also verify this with navicat(my vesion is 12.1.11)
   The result of
   “select * from t1;”
   “select id,name from t1;”
   are different.
   
   And with mysql client, if you cannot reproduce it. You can create more tables such as "t3", "t4", and then try "select * from t2", "select * from t3"...


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [shardingsphere] iamif3000 commented on issue #8218: “select * from t1” causes "ERROR 2027 (HY000): received malformed packet"

Posted by GitBox <gi...@apache.org>.
iamif3000 commented on issue #8218:
URL: https://github.com/apache/shardingsphere/issues/8218#issuecomment-730181524


   > I can't reproduce it.
   > Can you show your config with proxy, and your mysql version(server/client)?
   
   server.yaml
   --------------------
   authentication:
     users:
       root:
         password: root
       sharding:
         password: sharding 
         authorizedSchemas: master_slave_db
   
   props:
     max.connections.size.per.query: 1
     acceptor.size: 4
     executor.size: 16
     proxy.frontend.flush.threshold: 128
     proxy.transaction.type: LOCAL
     proxy.opentracing.enabled: false
     proxy.hint.enabled: false
     query.with.cipher.column: true
     sql.show: true
     allow.range.query.with.inline.sharding: false
   
   config-master_slave.yaml
   -------------------------
   schemaName: master_slave_db
   
   dataSources:
     master_ds:
       url: jdbc:mysql://172.31.197.149:3306/proxy?serverTimezone=UTC&useSSL=false
       username: proxy
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
     slave_ds_0:
       url: jdbc:mysql://172.31.197.149:3307/proxy?serverTimezone=UTC&useSSL=false
       username: proxy
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
   
   masterSlaveRule:
     name: ms_ds
     masterDataSourceName: master_ds
     slaveDataSourceNames:
       - slave_ds_0
   
   client version
   -------------------------
   Ver 15.1 Distrib 10.5.8-MariaDB, for Linux (x86_64) using readline 5.1


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org