shardingsphere: Boolean type giving error in ShardingSphere while insert

Bug Report

For English only, other languages will not accept.

Before report a bug, make sure you have:

Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will close it.

Please answer these questions before submitting your issue. Thanks!

Which version of ShardingSphere did you use?

ShardingSphere Proxy - 5.3.2

Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?

ShardingSphere Proxy

Expected behavior

INSERT INTO "mobile" ("created_at","tracking_id","custom_released") VALUES (2023-01-25 16:36:04.11781, 775275296,false); The above insert statement should pass successfully.

Actual behavior

ERROR: column "custom_released" is of type boolean but expression is of type character varying

Reason analyze (If you can)

Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.

sh start.sh
psql -U root -h 127.0.0.1 -p 3307 dbname=hint_db
INSERT INTO "mobile" ("created_at","tracking_id","custom_released") VALUES (2023-01-25 16:36:04.11781, 775275296,false);

Example codes for reproduce this issue (such as a github link).

About this issue

  • Original URL
  • State: open
  • Created a year ago
  • Comments: 30 (30 by maintainers)

Most upvoted comments

i meet this case using node typeorm update ,too

it seems like pg’s parameterMarkerIndex may not be in order as jdbc’s treat

(1)generated sql is like : UPDATE "t_alert_rule" SET "alert_persons" = $2, "update_time" = CURRENT_TIMESTAMP WHERE "id" IN ($1) RETURNING "update_time”

(2) and parseExecutor convert it to jdbc style UPDATE "t_alert_rule" SET "alert_persons" = ?, "update_time" = CURRENT_TIMESTAMP WHERE "id" IN (?) RETURNING "update_time”

(3) parameters readed in ‘bind’ is json: [‘test’] bigint : 1

eventually the actual parameters is miss match with index; re order the actual parameters’ order in ‘bind’ phase may works

@TeslaCN

I think this is another issue.