Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Environment
- Version or commit-id (e.g. v0.1.0 or 8b23a93):e086b4d
- Hardware parameters:Mac M1 ARM 16GB
- OS type: OSX
- Others:Actual Behavior
[SQL STATEMENT]: select length(space(1024*1024)) as a;
[EXPECT RESULT]:
a
1048576
[ACTUAL RESULT]:
a
null
[SQL STATEMENT]: select length('\n\t\r\b\0_%\');
[EXPECT RESULT]:
length('\n\t\r\b\0_%\')
10
[ACTUAL RESULT]:
length(
��_%)
8
[SQL STATEMENT]: SELECT t1.t1_fld1, t2.t2_fld1, t3.t3_fld1 FROM t1 JOIN t2 JOIN t3 ON (length(t1.b) = length(t2.b));
[EXPECT RESULT]:
t1_fld1 t2_fld1 t3_fld1
300 65680 65680
300 65680 65680
300 65680 16777300
300 65680 16777300
300 65680 16777300
300 65680 16777300
[ACTUAL RESULT]:
t1_fld1 t2_fld1 t3_fld1
300 null null
300 null null
300 null null
300 null null
300 null null
300 null null
CREATE TABLE t1 (t1_fld1 int, b varchar(255));
CREATE TABLE t2 (t2_fld1 int, b varchar(255));
CREATE TABLE t3 (t3_fld1 int, b varchar(255));
INSERT INTO t1 select LENGTH(space(300)), "abcdefg";
INSERT INTO t1 select LENGTH(space(300)), "123124141";
INSERT INTO t2 select LENGTH(space(65680)), "abcdefg";
INSERT INTO t2 select LENGTH(space(65680)), "1238193";
INSERT INTO t3 select LENGTH(space(65680)), "1238193";
INSERT INTO t3 select LENGTH(space(16777300)),"123124141";
INSERT INTO t3 select LENGTH(space(16777300)),"123asdq";
SELECT DISTINCT * from t1;
SELECT t1.t1_fld1, t2.t2_fld1, t3.t3_fld1 FROM t1 JOIN t2 JOIN t3 ON (length(t1.b) = length(t2.b));
drop table t1;
drop table t2;
drop table t3;
Expected Behavior
No response
Steps to Reproduce
No response
Additional information
No response
Activity
daviszhen commentedon Jun 30, 2022
resolved:
[SQL STATEMENT]: select length(space(1024*1024)) as a;
CREATE TABLE t1 (t1_fld1 int, b varchar(255));
CREATE TABLE t2 (t2_fld1 int, b varchar(255));
CREATE TABLE t3 (t3_fld1 int, b varchar(255));
INSERT INTO t1 select LENGTH(space(300)), "abcdefg";
INSERT INTO t1 select LENGTH(space(300)), "123124141";
INSERT INTO t2 select LENGTH(space(65680)), "abcdefg";
INSERT INTO t2 select LENGTH(space(65680)), "1238193";
INSERT INTO t3 select LENGTH(space(65680)), "1238193";
INSERT INTO t3 select LENGTH(space(16777300)),"123124141";
INSERT INTO t3 select LENGTH(space(16777300)),"123asdq";
SELECT DISTINCT * from t1;
SELECT t1.t1_fld1, t2.t2_fld1, t3.t3_fld1 FROM t1 JOIN t2 JOIN t3 ON (length(t1.b) = length(t2.b));
drop table t1;
drop table t2;
drop table t3;
can not input in shell: same as #3313
select length('\n\t\r\b\0_%');
Fix Issue #3313 #3256 (#3638)
Fix Issue matrixorigin#3313 matrixorigin#3256 (matrixorigin#3638)