[MDEV-26786] Inserting NULL into base column breaks NATURAL_SORT_KEY column Created: 2021-10-07  Updated: 2021-10-14  Resolved: 2021-10-07

Status: Closed
Project: MariaDB Server
Component/s: Server
Affects Version/s: N/A
Fix Version/s: 10.7.1

Type: Bug Priority: Critical
Reporter: Elena Stepanova Assignee: Vladislav Vaintroub
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Problem/Incident
is caused by MDEV-4742 A function for native natural sorting... Closed

 Description   

create or replace table t (a varchar(8), b varchar(8) as (natural_sort_key(a)));
insert into t (a) values ('a2'),(NULL),('a11');
select * from t order by b;
select a, b from t order by b;

preview-10.7-MDEV-4742-natural-sort deac988668

MariaDB [test]> select * from t order by b;
+------+------+
| a    | b    |
+------+------+
| NULL | NULL |
| a11  | NULL |
| a2   | a02  |
+------+------+
3 rows in set (0.001 sec)
 
MariaDB [test]> select a, b from t order by b;
+------+------+
| a    | b    |
+------+------+
| a2   | NULL |
| NULL | NULL |
| a11  | NULL |
+------+------+
3 rows in set (0.001 sec)



 Comments   
Comment by Vladislav Vaintroub [ 2021-10-07 ]

I fixed in
preview-10.7-MDEV-4742-natural-sort , but JIRA forced me to put 10.7.1 as "fixed version"

Generated at Thu Feb 08 09:47:56 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.