You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: POW with negative base and fractional exponent returns NaN instead of MySQL error #25308
Latest origin/main verified locally at 200bfa7e0efb.
Reproduce Steps
set session sql_mode ='';
select pow(-2, 0.5) as pow_domain;
Expected Behavior
MySQL rejects the out-of-domain result:
ERROR 1690 (22003): DOUBLE value is out of range in 'pow(-(2),0.5)'
Actual Behavior
MatrixOne returns NaN:
pow_domain
NaN
Notes
Found during MySQL compatibility Module 6 exploration for numeric functions. Other domain checks such as sqrt(-1), log(-2), and log(1, 100) matched MySQL by returning NULL; this issue is specific to POW/POWER domain handling.
Activity
fix(function): reject out-of-range power results (#25464)
Ariznawlll commentedon Jul 7, 2026
Verified on latest main
a03bfc1b6(FIX: FileService implements new DISK-V2 backend to replace DISK (#25272)).Validation:
MO now matches MySQL 8.0.45 by returning an out-of-range error instead of
NaN:Additional checks:
pow(4, 0.5)/power(9, 0.5): normal positive-base control case works.power(-2, 0.5): returns ERROR 1690.pow(-8, 1.0 / 3.0): returns ERROR 1690.Regression added to motr PR: matrixorigin/motr#39
MOTR validation:
fix(function): reject out-of-range power results (matrixorigin#25464)
fix(function): reject out-of-range power results (matrixorigin#25464)
fix(function): reject out-of-range power results (matrixorigin#25464)
fix(function): return row-local NULL for fractional powers of negativ…