Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.1(EOL), 10.2(EOL), 10.3(EOL), 10.4(EOL), 10.5
-
None
Description
Fields of the numeric and temporal data types convert to character_set_results, while functions do not:
This is bad when character_set_results is set to character sets like UCS2, UTF16, UTF32, as well as filename.
SET character_set_results=filename; |
CREATE OR REPLACE TABLE t1 (a DATETIME(6)); |
INSERT INTO t1 VALUES ('2001-01-01 00:00:00.000000'); |
SELECT a, COALESCE(a) AS c FROM t1; |
+----------------------------------------------------+----------------------------+
|
| a | c |
|
+----------------------------------------------------+----------------------------+
|
| 2001@002d01@002d01@002000@003a00@003a00@002e000000 | 2001-01-01 00:00:00.000000 |
|
+----------------------------------------------------+----------------------------+
|
Notice, the field converted its value to 'filename', while the function did not.
The same problem is repeatable with INT (and also with TINYINT, SHORTINT, MEDIUMINT, BIGINT):
SET character_set_results=filename; |
CREATE OR REPLACE TABLE t1 (a INT); |
INSERT INTO t1 VALUES (-3); |
SELECT a, COALESCE(a) AS c FROM t1; |
+--------+------+
|
| a | c |
|
+--------+------+
|
| @002d3 | -3 |
|
+--------+------+
|
Attachments
Issue Links
- relates to
-
MDEV-23162 Improve Protocol performance for numeric data
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Link |
This issue relates to |
issue.field.resolutiondate | 2020-08-10 04:10:49.0 | 2020-08-10 04:10:49.387 |
Fix Version/s | 10.5.5 [ 24423 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Fix Version/s | 10.5.6 [ 24508 ] | |
Fix Version/s | 10.5.5 [ 24423 ] |
Fix Version/s | 10.5.7 [ 25019 ] |
Fix Version/s | 10.5.6 [ 24508 ] |
Workflow | MariaDB v3 [ 112152 ] | MariaDB v4 [ 158219 ] |