I have a strange problem: There is a price in a JSON column in a table and the following statements give different results while they should give the same thing:
CAST(COALESCE(JSON_EXTRACT(item.price_details, "$.shipping.price"), 0) AS FLOAT) AS shippricecoalfloat
COALESCE(CAST(JSON_EXTRACT(item.price_details, "$.shipping.price") AS FLOAT), 0) AS shippricefloatcoal
Just to check I also added a JSON_EXTRACT(item.price_details, "$.shipping.price") AS shipprice
Result:
MariaDB version: mariadb Ver 15.1 Distrib 10.3.31-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
DB Fiddle (I couldn't use the same MariaDB version but it behaves the same anyways apparently)
