Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
13.0.1
-
None
-
Docker-based MariaDB 13.0.1 runtime (exact image ID, host OS/architecture, compiler/build information, and my.cnf not retained; not an exact current-HEAD build)
-
Not for Release Notes
Description
Description
`CREATE SERVER` applies inconsistent range validation to numeric and quoted `PORT` values. The numeric value `2147483648` is rejected as out of range, while the quoted value `'2147483648'` is accepted without a warning and stored in `mysql.servers.Port` as `2147483647`.
The behavior was reproduced twice. The quoted boundary value `'2147483647'` is the control and is preserved without loss.
How to Repeat
DROP SERVER IF EXISTS port_numeric; |
DROP SERVER IF EXISTS port_quoted; |
|
|
CREATE SERVER port_numeric |
FOREIGN DATA WRAPPER mysql |
OPTIONS (HOST '', PORT 2147483648); |
|
|
CREATE SERVER port_quoted |
FOREIGN DATA WRAPPER mysql |
OPTIONS (HOST '', PORT '2147483648'); |
|
|
SHOW COUNT(*) WARNINGS; |
SHOW WARNINGS;
|
SELECT Server_name, Port |
FROM mysql.servers |
WHERE Server_name IN ('port_numeric', 'port_quoted'); |
For the non-triggering control, repeat the quoted case with `PORT '2147483647'`.
Actual Result
The numeric form returns ERROR 1690: port value is out of range in 'INT'.
|
The quoted form succeeds, produces zero warnings, and stores 2147483647.
|
Expected Result
Numeric and quoted forms should receive equivalent range validation. `'2147483648'` should be rejected rather than silently changed to a different port.
Attachments
Issue Links
- is part of
-
MDEV-40312 SHOW CREATE SERVER incorrect quoting
-
- Closed
-