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 2021/06/14 07:48:04 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue #10773: PostgreSQL Proxy DataRow value format may be incorrect

TeslaCN opened a new issue #10773:
URL: https://github.com/apache/shardingsphere/issues/10773


   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   Proxy
   
   ### Expected behavior
   
   ### Actual behavior
   
   ```
   22:29:26,925 [Thread-2] FATAL  jTPCCTerminal : 2
   java.lang.ArrayIndexOutOfBoundsException: 2
   	at org.postgresql.util.ByteConverter.int4(ByteConverter.java:46)
   	at org.postgresql.jdbc.PgResultSet.getInt(PgResultSet.java:2061)
   	at org.postgresql.jdbc.PgResultSet.getInt(PgResultSet.java:2485)
   	at jTPCCTData.executeNewOrder(jTPCCTData.java:488)
   	at jTPCCTData.execute(jTPCCTData.java:95)
   	at jTPCCTerminal.executeTransactions(jTPCCTerminal.java:261)
   	at jTPCCTerminal.run(jTPCCTerminal.java:88)
   	at java.lang.Thread.run(Thread.java:748)
   ```
   
   The client expect the first column in result formats is binary.
   ```
   PostgreSQL
       Type: Bind
       Length: 59
       Portal: 
       Statement: S_2
       Parameter formats: 2
           Format: Binary (1)
           Format: Binary (1)
       Parameter values: 2
           Column length: 4
           Data: 00000001
           Column length: 4
           Data: 00010ec6
       Result formats: 12
           Format: Binary (1)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
           Format: Text (0)
   PostgreSQL
       Type: Execute
       Length: 9
       Portal: 
       Returns: all rows
   PostgreSQL
       Type: Sync
       Length: 4
   ```
   
   But the first column returned by the server was text format.
   ```
   PostgreSQL
       Type: Bind completion
       Length: 4
   PostgreSQL
       Type: Data row
       Length: 334
       Field count: 12
           Column length: 2
           Data: 3831
           Column length: 38
           Data: 536f6641306972524158446530364b4c6b6f7046366b4c7a74534c6f7679424675565648…
           Column length: 24
           Data: 75784657466572457633625571313274685a6e4d5a377835
           Column length: 24
           Data: 516b354a6e42494977724631685159796a78543339697762
           Column length: 24
           Data: 616337574c694f696a614d35764e4c687147573863306a52
           Column length: 24
           Data: 4576624e786e6d61427769765347364e6e33346473443465
           Column length: 24
           Data: 685a58675448325a7a71444445334f4946414c347137456c
           Column length: 24
           Data: 6f3052786a62466d4f756d4e634633457a6c73466d535846
           Column length: 24
           Data: 566e6270746a6f424663526f454f57366170514765554a65
           Column length: 24
           Data: 555241396d567753524937526851617063476578796d6e37
           Column length: 24
           Data: 4e6c34554b3479486d7564496479547835354e377a544149
           Column length: 24
           Data: 6874496a3368354530414b555835617a486f473948723230
   PostgreSQL
       Type: Command completion
       Length: 13
       Tag: SELECT 1
   PostgreSQL
       Type: Ready for query
       Length: 5
       Status: In a transaction (84)
   ```
   


-- 
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 closed issue #10773: PostgreSQL Proxy DataRow value format may be incorrect

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #10773:
URL: https://github.com/apache/shardingsphere/issues/10773


   


-- 
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