Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-27015 Assertion `!is_null()' failed in FixedBinTypeBundle<FbtImp…
…l>::Fbt FixedBinTypeBundle<FbtImpl>::Field_fbt::to_fbt() The assuption that Field::is_null() is always false when Field_fbt::val_native() or Field_fbt::to_fbt() are called was wrong. In some cases, e.g. when this helper Field method is called: inline String *val_str(String *str, const uchar *new_ptr) we temporarily reset Field::ptr to some alternative record buffer but don't reset null_ptr, so null_ptr still points to null flags of the original record. In such cases it's meaningless to test the original Field::null_ptr when Field::ptr is temporarily reset: they don't relate to each other. Removing the DBUG_ASSERT.
- Loading branch information
Showing
7 changed files
with
169 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # | ||
| # Start of 10.7 tests | ||
| # | ||
| # | ||
| # MDEV-27015 Assertion `!is_null()' failed in FixedBinTypeBundle<FbtImpl>::Fbt FixedBinTypeBundle<FbtImpl>::Field_fbt::to_fbt() | ||
| # | ||
| CREATE TABLE t1 (i6 INET6, a1 TIME, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('::','09:43:12','uw'), ('70:ef59::46:c7b:f:678:bd9f','00:00:00','a'); | ||
| SELECT GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) FROM t1; | ||
| GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) | ||
| :: | ||
| Warnings: | ||
| Warning 1292 Incorrect inet6 value: 'a' | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1 (i6 inet6, a2 varchar(10)); | ||
| INSERT INTO t1 VALUES ('::','uw'), (null,'a'); | ||
| SELECT group_concat(coalesce(i6, a2) ORDER BY 1) FROM t1; | ||
| group_concat(coalesce(i6, a2) ORDER BY 1) | ||
| :: | ||
| Warnings: | ||
| Warning 1292 Incorrect inet6 value: 'a' | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1 (a INET6); | ||
| INSERT INTO t1 VALUES(); | ||
| SELECT JSON_ARRAYAGG(a ORDER BY a DESC) FROM t1; | ||
| JSON_ARRAYAGG(a ORDER BY a DESC) | ||
| [null] | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1 (i6 INET6, a1 INT, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('::',1,'uw'), ('70:ef59::46:c7b:f:678:bd9f',0,'a'); | ||
| SELECT GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) FROM t1; | ||
| GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) | ||
| :: | ||
| Warnings: | ||
| Warning 1292 Incorrect inet6 value: 'a' | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1 (i6 INET6, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('::',''), (NULL,NULL); | ||
| SELECT GROUP_CONCAT(COALESCE(i6, a2) ORDER BY 1) FROM t1; | ||
| GROUP_CONCAT(COALESCE(i6, a2) ORDER BY 1) | ||
| :: | ||
| DROP TABLE t1; | ||
| CREATE TABLE t1 (i6 INET6, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('::',''), (NULL,NULL); | ||
| SELECT GROUP_CONCAT(DISTINCT COALESCE(i6, a2)) FROM t1; | ||
| GROUP_CONCAT(DISTINCT COALESCE(i6, a2)) | ||
| :: | ||
| DROP TABLE t1; | ||
| # | ||
| # End of 10.7 tests | ||
| # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --echo # | ||
| --echo # Start of 10.7 tests | ||
| --echo # | ||
|
|
||
| --echo # | ||
| --echo # MDEV-27015 Assertion `!is_null()' failed in FixedBinTypeBundle<FbtImpl>::Fbt FixedBinTypeBundle<FbtImpl>::Field_fbt::to_fbt() | ||
| --echo # | ||
|
|
||
| CREATE TABLE t1 (i6 INET6, a1 TIME, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('::','09:43:12','uw'), ('70:ef59::46:c7b:f:678:bd9f','00:00:00','a'); | ||
| SELECT GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) FROM t1; | ||
| DROP TABLE t1; | ||
|
|
||
| CREATE TABLE t1 (i6 inet6, a2 varchar(10)); | ||
| INSERT INTO t1 VALUES ('::','uw'), (null,'a'); | ||
| SELECT group_concat(coalesce(i6, a2) ORDER BY 1) FROM t1; | ||
| DROP TABLE t1; | ||
|
|
||
| CREATE TABLE t1 (a INET6); | ||
| INSERT INTO t1 VALUES(); | ||
| SELECT JSON_ARRAYAGG(a ORDER BY a DESC) FROM t1; | ||
| DROP TABLE t1; | ||
|
|
||
| CREATE TABLE t1 (i6 INET6, a1 INT, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('::',1,'uw'), ('70:ef59::46:c7b:f:678:bd9f',0,'a'); | ||
| SELECT GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) FROM t1; | ||
| DROP TABLE t1; | ||
|
|
||
| CREATE TABLE t1 (i6 INET6, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('::',''), (NULL,NULL); | ||
| SELECT GROUP_CONCAT(COALESCE(i6, a2) ORDER BY 1) FROM t1; | ||
| DROP TABLE t1; | ||
|
|
||
| CREATE TABLE t1 (i6 INET6, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('::',''), (NULL,NULL); | ||
| SELECT GROUP_CONCAT(DISTINCT COALESCE(i6, a2)) FROM t1; | ||
| DROP TABLE t1; | ||
|
|
||
| --echo # | ||
| --echo # End of 10.7 tests | ||
| --echo # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # | ||
| # Start of 10.7 tests | ||
| # | ||
| # | ||
| # MDEV-27015 Assertion `!is_null()' failed in FixedBinTypeBundle<FbtImpl>::Fbt FixedBinTypeBundle<FbtImpl>::Field_fbt::to_fbt() | ||
| # | ||
| CREATE TABLE t1 (i6 UUID, a1 TIME, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('ffffffff-ffff-ffff-ffff-fffffffffffe','09:43:12','uw'), (uuid(),'00:00:00','a'); | ||
| SELECT GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) FROM t1; | ||
| GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) | ||
| ffffffff-ffff-ffff-ffff-fffffffffffe | ||
| Warnings: | ||
| Warning 1292 Incorrect uuid value: 'a' | ||
| DROP TABLE t1; | ||
| # | ||
| # End of 10.7 tests | ||
| # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| --echo # | ||
| --echo # Start of 10.7 tests | ||
| --echo # | ||
|
|
||
| --echo # | ||
| --echo # MDEV-27015 Assertion `!is_null()' failed in FixedBinTypeBundle<FbtImpl>::Fbt FixedBinTypeBundle<FbtImpl>::Field_fbt::to_fbt() | ||
| --echo # | ||
|
|
||
| CREATE TABLE t1 (i6 UUID, a1 TIME, a2 VARCHAR(10)); | ||
| INSERT INTO t1 VALUES ('ffffffff-ffff-ffff-ffff-fffffffffffe','09:43:12','uw'), (uuid(),'00:00:00','a'); | ||
| SELECT GROUP_CONCAT(IF(a1, i6, a2) ORDER BY 1) FROM t1; | ||
| DROP TABLE t1; | ||
|
|
||
|
|
||
| --echo # | ||
| --echo # End of 10.7 tests | ||
| --echo # |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters