Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.5, 10.3.25, 10.2(EOL), 10.3(EOL), 10.4(EOL)
-
None
-
Ubuntu 20.04
Description
The sorting behavior for columns with CRLF (\n\r) values seem to have changed from MariaDB 10.1 to 10.3
Simple example table
CREATE TABLE `test` (
|
`a` int(11) NOT NULL AUTO_INCREMENT,
|
`b` varchar(255) NOT NULL,
|
`c` text NOT NULL,
|
`d` varchar(255) NOT NULL,
|
PRIMARY KEY (`a`)
|
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
|
|
INSERT INTO `test` VALUES (1,'A','\r\n','CRLF'),(2,'A','',''),(3,'A','',''),(4,'A','\r\n','CRLF'),(5,'A','','');
|
Results on MariaDB 10.1 (Ubuntu 18.04 LTS)
SELECT * FROM test ORDER BY b ASC, c ASC, a ASC;
|
|
+---+---+----+------+
|
| a | b | c | d |
|
+---+---+----+------+
|
| 2 | A | | |
|
| 3 | A | | |
|
| 5 | A | | |
|
| 1 | A | | CRLF |
|
| 4 | A | | CRLF |
|
+---+---+----+------+
|
Results on MariaDB 10.3 (Ubuntu 20.04 LTS)
SELECT * FROM test ORDER BY b ASC, c ASC, a ASC;
|
|
+---+---+----+------+
|
| a | b | c | d |
|
+---+---+----+------+
|
| 1 | A | | CRLF |
|
| 4 | A | | CRLF |
|
| 2 | A | | |
|
| 3 | A | | |
|
| 5 | A | | |
|
+---+---+----+------+
|
The ordering for column c has obviously changed, since rows with a CRLF value are now shown before rows with an empty value.
I did not find any documentation describing this change in sorting behavior. Is this a bug or can this behavior be changed "back" by a setting?
Attachments
Issue Links
- is caused by
-
MDEV-11320 MariaRocks: rocksdb.type_text_indexes fails
- Closed