-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Open
Description
Bug Report
Which version of ShardingSphere did you use?
shardingsphere-proxy 5.5.2
postgres 17.6 as backend
Expected behavior
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c8 TIMESTAMP);
INSERT INTO t1 VALUES ('1973-06-03 10:30:01'); -- no fractional seconds
SELECT c8 FROM t1;should return (in native PG):
1973-06-03 10:30:01
Actual behavior
testdb=> CREATE TABLE t100 (c8 TIMESTAMP);
CREATE TABLE
testdb=> INSERT INTO t100 VALUES ('1973-06-03 10:30:01');
INSERT 0 1
testdb=> SELECT c8 FROM t100 ;
c8
-----------------------
1973-06-03 10:30:01.0
(1 row)The semantic value seems identical, but the textual representation differs and may break clients/tests relying on stable output formatting.
We guess the bug is related to Timestamp.toString() in java.sql.Timestamp.
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
run docker compose up -d in this file.
SQL to execute are shown above
Reactions are currently unavailable