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/10/18 07:36:40 UTC

[GitHub] [shardingsphere] penghuazhou opened a new issue #13089: Do not support sql parameter?

penghuazhou opened a new issue #13089:
URL: https://github.com/apache/shardingsphere/issues/13089


   Do not support sql parameter?
   
   version:shardingshpere-proxy, the master git 
   
   It be ok if use Where("app_id = 1"), It not be of when use Where("app_id = ?", 1)
   ![image](https://user-images.githubusercontent.com/13001038/137687783-6358a6ef-b39a-473b-89fc-88d5677f8498.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.

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

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



[GitHub] [shardingsphere] lanchengx commented on issue #13089: Do not support sql parameter?

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


   Sorry that the log display is not complete. We adjusted the display of the log. Please update the latest code and use the debug level to view and copy the log.


-- 
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] lanchengx commented on issue #13089: Do not support sql parameter?

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


   @penghuazhou Sorry, some omissions cause compilation exceptions, please update the code and make sure that the compilation is passed and try again


-- 
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] lanchengx commented on issue #13089: Do not support sql parameter?

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


   thanks, could you find the SQL sent to the proxy when using `?` as a placeholder, for example through debug.


-- 
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] lanchengx commented on issue #13089: Do not support sql parameter?

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


   Yes, modified in https://github.com/apache/shardingsphere/pull/13095


-- 
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] penghuazhou closed issue #13089: Do not support sql parameter?

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


   


-- 
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] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   @lanchengx 
   
   [DEBUG] 2021-10-18 17:35:02.843 [nioEventLoopGroup-3-2] o.a.s.db.protocol.codec.PacketCodec - Read from client 69c087fd : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 50 00 00 00 5a 6c 72 75 70 73 63 5f 31 5f 31 00 |P...Zlrupsc_1_1.|
   |00000010| 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 22 71 |SELECT * FROM "q|
   |00000020| 75 61 6c 69 74 79 5f 72 65 63 6f 72 64 5f 72 65 |uality_record_re|
   |00000030| 73 75 6c 74 22 20 57 48 45 52 45 20 61 70 70 5f |sult" WHERE app_|
   |00000040| 69 64 20 3d 20 24 31 20 4f 52 44 45 52 20 42 59 |id = $1 ORDER BY|
   |00000050| 20 69 64 20 64 65 73 63 00 00 00 44 00 00 00 10 | id desc...D....|
   |00000060| 53 6c 72 75 70 73 63 5f 31 5f 31 00 53 00 00 00 |Slrupsc_1_1.S...|
   |00000070| 04                                              |.               |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 17:35:02.961 [Connection-2-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: PARSE_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.parse.PostgreSQLComParsePacket@212e6d94
   [DEBUG] 2021-10-18 17:35:03.356 [Connection-2-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: DESCRIBE_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.describe.PostgreSQLComDescribePacket@44a59c8c
   [DEBUG] 2021-10-18 17:35:03.359 [Connection-2-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: SYNC_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.sync.PostgreSQLComSyncPacket@294a8fe2
   [DEBUG] 2021-10-18 17:35:03.361 [nioEventLoopGroup-3-2] o.a.s.db.protocol.codec.PacketCodec - Write to client 69c087fd : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 31 00 00 00 04                                  |1....           |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 17:35:03.362 [nioEventLoopGroup-3-2] o.a.s.db.protocol.codec.PacketCodec - Write to client 69c087fd : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 5a 00 00 00 05 49                               |Z....I          |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 17:35:05.170 [HikariPool-1 housekeeper] com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Before cleanup stats (total=1, active=0, idle=1, waiting=0)
   [DEBUG] 2021-10-18 17:35:05.170 [HikariPool-1 housekeeper] com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - Before cleanup stats (total=1, active=0, idle=1, waiting=0)
   [DEBUG] 2021-10-18 17:35:05.174 [HikariPool-1 housekeeper] com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - After cleanup  stats (total=1, active=0, idle=1, waiting=0)
   [DEBUG] 2021-10-18 17:35:05.174 [HikariPool-1 housekeeper] com.zaxxer.hikari.pool.HikariPool - HikariPool-1 - After cleanup  stats (total=1, active=0, idle=1, waiting=0)
   [DEBUG] 2021-10-18 17:35:05.310 [HikariPool-2 housekeeper] com.zaxxer.hikari.pool.HikariPool - HikariPool-2 - Before cleanup stats (total=1, active=0, idle=1, waiting=0)
   [DEBUG] 2021-10-18 17:35:05.310 [HikariPool-2 housekeeper] com.zaxxer.hikari.pool.HikariPool - HikariPool-2 - Before cleanup stats (total=1, active=0, idle=1, waiting=0)
   [DEBUG] 2021-10-18 17:35:05.311 [HikariPool-2 housekeeper] com.zaxxer.hikari.pool.HikariPool - HikariPool-2 - After cleanup  stats (total=1, active=0, idle=1, waiting=0)
   [DEBUG] 2021-10-18 17:35:05.311 [HikariPool-2 housekeeper] com.zaxxer.hikari.pool.HikariPool - HikariPool-2 - After cleanup  stats (total=1, active=0, idle=1, waiting=0)
   
   
   <img width="1397" alt="企业微信截图_4b812127-756a-42a3-9de7-1aabfbb54bbb" src="https://user-images.githubusercontent.com/13001038/137706773-1951d7c7-47f1-4346-ae32-46cdaeac6534.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.

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

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



[GitHub] [shardingsphere] penghuazhou edited a comment on issue #13089: Do not support sql parameter?

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


   @TeslaCN 
   
   when will you fixed it ?
   
   import (
   	"fmt"
   	"gorm.io/driver/postgres"
   	"gorm.io/gorm"
   	"testing"
   )
   
   func TestShardingSphere(t *testing.T) {
   	dsn := "host=127.0.0.1 user=sharding password=sharding dbname=sharding_db port=3307 sslmode=disable TimeZone=Asia/Shanghai"
   	db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
   	if err != nil {
   		fmt.Println(err)
   		return
   	}
   	var info string
   	err2 := db.Debug().Raw("select info from t_order where order_id = ? and user_id = ?", 1206921609, 81031208).Scan(&info).Error
   	if err2 != nil {
   		fmt.Println(err2)
   		return
   	}
   }
   
   ![image](https://user-images.githubusercontent.com/13001038/137728269-957152df-a991-4d09-a793-19c43e61ad20.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.

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

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



[GitHub] [shardingsphere] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   @lanchengx, it not print the error sql
   
   <img width="994" alt="企业微信截图_1f25d127-6b69-4fe8-ad32-d786c56826a4" src="https://user-images.githubusercontent.com/13001038/137694394-012d9823-50f1-4366-993d-a18461e09ecc.png">
   
   <img width="994" alt="企业微信截图_6358f939-597f-4f74-9f72-3d0533450e3d" src="https://user-images.githubusercontent.com/13001038/137694408-2774d285-d09b-4141-8383-420411a076f6.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.

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

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



[GitHub] [shardingsphere] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   > This issue may relates to #10814
   
   thanks, when will support sql parameter?


-- 
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] lanchengx edited a comment on issue #13089: Do not support sql parameter?

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


   @penghuazhou thanks, 
   could you show what the actual SQL sent by the ORM to the proxy is?
   


-- 
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] TeslaCN commented on issue #13089: Do not support sql parameter?

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


   This issue may relates to https://github.com/apache/shardingsphere/issues/10814


-- 
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] penghuazhou edited a comment on issue #13089: Do not support sql parameter?

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


   @lanchengx, it not print the error sql
   
   <img width="994" alt="企业微信截图_1f25d127-6b69-4fe8-ad32-d786c56826a4" src="https://user-images.githubusercontent.com/13001038/137694394-012d9823-50f1-4366-993d-a18461e09ecc.png">
   
   <img width="1428" alt="企业微信截图_2de49385-fa7f-4963-a21b-d9c0670a80dc" src="https://user-images.githubusercontent.com/13001038/137694550-a46020ca-426e-4eb7-9f8b-f637dcd9ac39.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.

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

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



[GitHub] [shardingsphere] TeslaCN commented on issue #13089: Do not support sql parameter?

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


   Hi @penghuazhou 
   We are still figuring out how to describe SQL without executing it. Currently, we fetch the meta data by executing the SQL.


-- 
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] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   @lanchengx
   
   [DEBUG] 2021-10-18 19:35:26.968 [nioEventLoopGroup-3-6] o.a.s.db.protocol.codec.PacketCodec - Read from client 5b1410b2 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 50 00 00 00 5a 6c 72 75 70 73 63 5f 31 5f 31 00 |P...Zlrupsc_1_1.|
   |00000010| 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 22 71 |SELECT * FROM "q|
   |00000020| 75 61 6c 69 74 79 5f 72 65 63 6f 72 64 5f 72 65 |uality_record_re|
   |00000030| 73 75 6c 74 22 20 57 48 45 52 45 20 61 70 70 5f |sult" WHERE app_|
   |00000040| 69 64 20 3d 20 24 31 20 4f 52 44 45 52 20 42 59 |id = $1 ORDER BY|
   |00000050| 20 69 64 20 64 65 73 63 00 00 00 44 00 00 00 10 | id desc...D....|
   |00000060| 53 6c 72 75 70 73 63 5f 31 5f 31 00 53 00 00 00 |Slrupsc_1_1.S...|
   |00000070| 04                                              |.               |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 19:35:27.005 [Connection-6-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: PARSE_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.parse.PostgreSQLComParsePacket@1c90c152
   [DEBUG] 2021-10-18 19:35:27.095 [Connection-6-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: DESCRIBE_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.describe.PostgreSQLComDescribePacket@152173a5
   [DEBUG] 2021-10-18 19:35:27.099 [Connection-6-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: SYNC_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.sync.PostgreSQLComSyncPacket@7cc81896
   [DEBUG] 2021-10-18 19:35:27.100 [nioEventLoopGroup-3-6] o.a.s.db.protocol.codec.PacketCodec - Write to client 5b1410b2 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 31 00 00 00 04                                  |1....           |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 19:35:27.101 [nioEventLoopGroup-3-6] o.a.s.db.protocol.codec.PacketCodec - Write to client 5b1410b2 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 5a 00 00 00 05 49                               |Z....I          |
   +--------+-------------------------------------------------+----------------+


-- 
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] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   thanks


-- 
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] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   @lanchengx , It the debug message
   
   [DEBUG] 2021-10-18 16:45:07.914 [nioEventLoopGroup-3-2] o.a.s.db.protocol.codec.PacketCodec - Read from client 3c5268a4 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 50 00 00 00 5a 6c 72 75 70 73 63 5f 31 5f 31 00 |P...Zlrupsc_1_1.|
   |00000010| 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 22 71 |SELECT * FROM "q|
   |00000020| 75 61 6c 69 74 79 5f 72 65 63 6f 72 64 5f 72 65 |uality_record_re|
   |00000030| 73 75 6c 74 22 20 57 48 45 52 45 20 61 70 70 5f |sult" WHERE app_|
   |00000040| 69 64 20 3d 20 24 31 20 4f 52 44 45 52 20 42 59 |id = $1 ORDER BY|
   |00000050| 20 69 64 20 64 65 73 63 00 00 00 44 00 00 00 10 | id desc...D....|
   |00000060| 53 6c 72 75 70 73 63 5f 31 5f 31 00 53 00 00 00 |Slrupsc_1_1.S...|
   |00000070| 04                                              |.               |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 16:45:07.952 [Connection-2-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: PARSE_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.parse.PostgreSQLComParsePacket@b33df96
   [DEBUG] 2021-10-18 16:45:08.414 [Connection-2-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: DESCRIBE_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.describe.PostgreSQLComDescribePacket@3167ad50
   [DEBUG] 2021-10-18 16:45:08.415 [Connection-2-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: SYNC_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.sync.PostgreSQLComSyncPacket@65b3c879
   [DEBUG] 2021-10-18 16:45:08.419 [nioEventLoopGroup-3-2] o.a.s.db.protocol.codec.PacketCodec - Write to client 3c5268a4 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 31 00 00 00 04                                  |1....           |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 16:45:08.422 [nioEventLoopGroup-3-2] o.a.s.db.protocol.codec.PacketCodec - Write to client 3c5268a4 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 5a 00 00 00 05 49                               |Z....I          |
   +--------+-------------------------------------------------+----------------+


-- 
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] penghuazhou edited a comment on issue #13089: Do not support sql parameter?

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


   @TeslaCN 
   
   when will you fixed it ? Do you will add it to 5.0.0-RC1?
   
   import (
   	"fmt"
   	"gorm.io/driver/postgres"
   	"gorm.io/gorm"
   	"testing"
   )
   
   func TestShardingSphere(t *testing.T) {
   	dsn := "host=127.0.0.1 user=sharding password=sharding dbname=sharding_db port=3307 sslmode=disable TimeZone=Asia/Shanghai"
   	db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
   	if err != nil {
   		fmt.Println(err)
   		return
   	}
   	var info string
   	err2 := db.Debug().Raw("select info from t_order where order_id = ? and user_id = ?", 1206921609, 81031208).Scan(&info).Error
   	if err2 != nil {
   		fmt.Println(err2)
   		return
   	}
   }
   
   ![image](https://user-images.githubusercontent.com/13001038/137728269-957152df-a991-4d09-a793-19c43e61ad20.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.

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

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



[GitHub] [shardingsphere] lanchengx commented on issue #13089: Do not support sql parameter?

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


   Hi @penghuazhou, Which version are you using?


-- 
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] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   > > Hi @penghuazhou, Which version are you using?
   > 
   >@lanchengx  master
   
   


-- 
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] lanchengx edited a comment on issue #13089: Do not support sql parameter?

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


   @penghuazhou thanks, 
   could you show what the actual SQL sent by the ORM to the proxy is?
   It will be printed in the proxy log if you enable `sql-show`


-- 
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] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   > Hi @penghuazhou, Which version are you using?
   
   master


-- 
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] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   @lanchengx I download it now?


-- 
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] penghuazhou commented on issue #13089: Do not support sql parameter?

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


   @TeslaCN 
   
   when will you fixed it ?
   
   import (
   	"fmt"
   	"gorm.io/driver/postgres"
   	"gorm.io/gorm"
   	"testing"
   )
   
   func TestShardingSphere(t *testing.T) {
   	dsn := "host=10.1.80.167 user=sharding password=sharding dbname=sharding_db port=3307 sslmode=disable TimeZone=Asia/Shanghai"
   	db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
   	if err != nil {
   		fmt.Println(err)
   		return
   	}
   	var info string
   	err2 := db.Debug().Raw("select info from t_order where order_id = ? and user_id = ?", 1206921609, 81031208).Scan(&info).Error
   	if err2 != nil {
   		fmt.Println(err2)
   		return
   	}
   }
   
   <img width="1386" alt="企业微信截图_def7b6a0-710c-44db-aa9c-36e382394ecc" src="https://user-images.githubusercontent.com/13001038/137727143-31a84eab-b791-48a1-9b48-d51d80443c41.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.

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

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



[GitHub] [shardingsphere] penghuazhou edited a comment on issue #13089: Do not support sql parameter?

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


   @TeslaCN 
   
   when will you fixed it ?
   
   import (
   	"fmt"
   	"gorm.io/driver/postgres"
   	"gorm.io/gorm"
   	"testing"
   )
   
   func TestShardingSphere(t *testing.T) {
   	dsn := "host=10.1.80.167 user=sharding password=sharding dbname=sharding_db port=3307 sslmode=disable TimeZone=Asia/Shanghai"
   	db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
   	if err != nil {
   		fmt.Println(err)
   		return
   	}
   	var info string
   	err2 := db.Debug().Raw("select info from t_order where order_id = ? and user_id = ?", 1206921609, 81031208).Scan(&info).Error
   	if err2 != nil {
   		fmt.Println(err2)
   		return
   	}
   }
   
   <img width="1386" alt="企业微信截图_def7b6a0-710c-44db-aa9c-36e382394ecc" src="https://user-images.githubusercontent.com/13001038/137727143-31a84eab-b791-48a1-9b48-d51d80443c41.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.

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

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



[GitHub] [shardingsphere] lanchengx edited a comment on issue #13089: Do not support sql parameter?

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


   thanks, could you find the SQL sent to the proxy when using `?` as a placeholder, such as through debug, or change the proxy log level to debug.


-- 
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] lanchengx commented on issue #13089: Do not support sql parameter?

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


   @penghuazhou thanks, 
   could you show what the actual SQL sent by the ORM to the proxy is?
   It will be printed in the Proxy log if you enable `sql-show`


-- 
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] penghuazhou edited a comment on issue #13089: Do not support sql parameter?

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


   @lanchengx
   
   Do where throw the error message? I have not find in the shardingsphere-proxy source code.
   
   <img width="719" alt="企业微信截图_c892bbec-be12-4cf2-84a7-5e3a651f8827" src="https://user-images.githubusercontent.com/13001038/137723496-b7aafd93-c222-4f61-aa57-434aabaa4463.png">
   
   
   [DEBUG] 2021-10-18 19:35:26.968 [nioEventLoopGroup-3-6] o.a.s.db.protocol.codec.PacketCodec - Read from client 5b1410b2 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 50 00 00 00 5a 6c 72 75 70 73 63 5f 31 5f 31 00 |P...Zlrupsc_1_1.|
   |00000010| 53 45 4c 45 43 54 20 2a 20 46 52 4f 4d 20 22 71 |SELECT * FROM "q|
   |00000020| 75 61 6c 69 74 79 5f 72 65 63 6f 72 64 5f 72 65 |uality_record_re|
   |00000030| 73 75 6c 74 22 20 57 48 45 52 45 20 61 70 70 5f |sult" WHERE app_|
   |00000040| 69 64 20 3d 20 24 31 20 4f 52 44 45 52 20 42 59 |id = $1 ORDER BY|
   |00000050| 20 69 64 20 64 65 73 63 00 00 00 44 00 00 00 10 | id desc...D....|
   |00000060| 53 6c 72 75 70 73 63 5f 31 5f 31 00 53 00 00 00 |Slrupsc_1_1.S...|
   |00000070| 04                                              |.               |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 19:35:27.005 [Connection-6-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: PARSE_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.parse.PostgreSQLComParsePacket@1c90c152
   [DEBUG] 2021-10-18 19:35:27.095 [Connection-6-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: DESCRIBE_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.describe.PostgreSQLComDescribePacket@152173a5
   [DEBUG] 2021-10-18 19:35:27.099 [Connection-6-ThreadExecutor] o.a.s.p.f.p.c.PostgreSQLCommandExecutorFactory - Execute packet type: SYNC_COMMAND, value: org.apache.shardingsphere.db.protocol.postgresql.packet.command.query.binary.sync.PostgreSQLComSyncPacket@7cc81896
   [DEBUG] 2021-10-18 19:35:27.100 [nioEventLoopGroup-3-6] o.a.s.db.protocol.codec.PacketCodec - Write to client 5b1410b2 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 31 00 00 00 04                                  |1....           |
   +--------+-------------------------------------------------+----------------+
   [DEBUG] 2021-10-18 19:35:27.101 [nioEventLoopGroup-3-6] o.a.s.db.protocol.codec.PacketCodec - Write to client 5b1410b2 : 
             +-------------------------------------------------+
            |  0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f |
   +--------+-------------------------------------------------+----------------+
   |00000000| 5a 00 00 00 05 49                               |Z....I          |
   +--------+-------------------------------------------------+----------------+


-- 
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] penghuazhou edited a comment on issue #13089: Do not support sql parameter?

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


   @TeslaCN 
   
   when will you fixed it ?
   
   `import (
   	"fmt"
   	"gorm.io/driver/postgres"
   	"gorm.io/gorm"
   	"testing"
   )
   
   func TestShardingSphere(t *testing.T) {
   	dsn := "host=10.1.80.167 user=sharding password=sharding dbname=sharding_db port=3307 sslmode=disable TimeZone=Asia/Shanghai"
   	db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
   	if err != nil {
   		fmt.Println(err)
   		return
   	}
   	var info string
   	err2 := db.Debug().Raw("select info from t_order where order_id = ? and user_id = ?", 1206921609, 81031208).Scan(&info).Error
   	if err2 != nil {
   		fmt.Println(err2)
   		return
   	}
   }`
   
   <img width="1386" alt="企业微信截图_def7b6a0-710c-44db-aa9c-36e382394ecc" src="https://user-images.githubusercontent.com/13001038/137727143-31a84eab-b791-48a1-9b48-d51d80443c41.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.

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

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



[GitHub] [shardingsphere] TeslaCN commented on issue #13089: Do not support sql parameter?

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


   @penghuazhou 
   Could you provide example codes in text format? I might try the Golang client after #10814 fixed.


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