Details
-
Type:
Bug
-
Status: Closed (View Workflow)
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: N/A
-
Fix Version/s: 10.10.1
-
Component/s: Server
-
Labels:None
Description
I am not setting it to critical 10.10v1 to avoid it blocking the release, but it would be good to look into this. Not only does it cause an untidy output with a long list of duplicate warnings, but also my concern is that it may indicate some redundancy in the way the function is executed.
bb-10.10-MDEV-25704 c33ed04b7e7 |
MariaDB [test]> select random_bytes(cast('x' as unsigned)+1); |
+---------------------------------------+ |
| random_bytes(cast('x' as unsigned)+1) | |
+---------------------------------------+ |
| � |
|
+---------------------------------------+ |
1 row in set, 5 warnings (0.000 sec) |
|
MariaDB [test]> show warnings;
|
+---------+------+----------------------------------------+ |
| Level | Code | Message | |
+---------+------+----------------------------------------+ |
| Warning | 1292 | Truncated incorrect INTEGER value: 'x' | |
| Warning | 1292 | Truncated incorrect INTEGER value: 'x' | |
| Warning | 1292 | Truncated incorrect INTEGER value: 'x' | |
| Warning | 1292 | Truncated incorrect INTEGER value: 'x' | |
| Warning | 1292 | Truncated incorrect INTEGER value: 'x' | |
+---------+------+----------------------------------------+ |
5 rows in set (0.000 sec) |
The CAST alone only produces one warning, as expected:
MariaDB [test]> select cast('x' as unsigned); |
+-----------------------+ |
| cast('x' as unsigned) | |
+-----------------------+ |
| 0 |
|
+-----------------------+ |
1 row in set, 1 warning (0.000 sec) |
|
MariaDB [test]> show warnings;
|
+---------+------+----------------------------------------+ |
| Level | Code | Message | |
+---------+------+----------------------------------------+ |
| Warning | 1292 | Truncated incorrect INTEGER value: 'x' | |
+---------+------+----------------------------------------+ |
1 row in set (0.000 sec) |
If random_bytes is replaced by another function, no extra warnings are produced (although I didn't try all functions, so maybe random_bytes is not unique in this sense):
MariaDB [test]> select ceil(cast('x' as unsigned)+1); |
+-------------------------------+ |
| ceil(cast('x' as unsigned)+1) | |
+-------------------------------+ |
| 1 |
|
+-------------------------------+ |
1 row in set, 1 warning (0.000 sec) |
|
MariaDB [test]> show warnings;
|
+---------+------+----------------------------------------+ |
| Level | Code | Message | |
+---------+------+----------------------------------------+ |
| Warning | 1292 | Truncated incorrect INTEGER value: 'x' | |
+---------+------+----------------------------------------+ |
1 row in set (0.000 sec) |
Attachments
Issue Links
- relates to
-
MDEV-25704 Add RANDOM_BYTES function
-
- Closed
-