-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.
Description
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
I run the following statement through JDBC with version 8.3.0
CREATE TABLE t1 ( c1 int, c2 int);
CREATE TABLE t2 ( c1 int unsigned);
INSERT INTO t1 (c1,c2) VALUES (8,4);
INSERT INTO t2 (c1) VALUES (2454396638);
SELECT ca4 AS ca1 FROM (SELECT c2 AS ca4 FROM t1) AS ta2 CROSS JOIN (SELECT c1 FROM t2) AS ta3 UNION ALL SELECT c1 AS ca13 FROM t2;
2. What did you expect to see? (Required)
The JDBC should return {2454396638, 4}
3. What did you see instead (Required)
A SQLException is returned.
java.sql.SQLException: Out of range value for column 'ca1' : value 2454396638 is not in class java.lang.Integer range
at org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.RowProtocol.rangeCheck(RowProtocol.java:283)
at org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.TextRowProtocol.getInternalInt(TextRowProtocol.java:255)
at org.mariadb.jdbc.internal.com.read.resultset.rowprotocol.TextRowProtocol.getInternalObject(TextRowProtocol.java:900)
at org.mariadb.jdbc.internal.com.read.resultset.SelectResultSet.getObject(SelectResultSet.java:1159)
in JdbcHelperImpl.getObject(JdbcHelperImpl.java:353)
4. What is your TiDB version? (Required)
Release Version: v8.0.0
Edition: Community
Git Commit Hash: 8ba1fa4
Git Branch: HEAD
UTC Build Time: 2024-03-28 14:22:15
GoVersion: go1.21.4
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Metadata
Metadata
Assignees
Labels
affects-5.4This bug affects the 5.4.x(LTS) versions.This bug affects the 5.4.x(LTS) versions.affects-6.1This bug affects the 6.1.x(LTS) versions.This bug affects the 6.1.x(LTS) versions.affects-6.5This bug affects the 6.5.x(LTS) versions.This bug affects the 6.5.x(LTS) versions.affects-7.1This bug affects the 7.1.x(LTS) versions.This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.This bug affects the 8.1.x(LTS) versions.severity/majorsig/sql-infraSIG: SQL InfraSIG: SQL Infratype/bugThe issue is confirmed as a bug.The issue is confirmed as a bug.