MySql with rollup - not giving the total. What am I doing wrong?
Your query is not actually aggregating anything (there is not any aggregation funcion).  You should just try:

SELECT
    IFNULL(product_name, 'GRAND TOTAL') AS product,
    -- Need an aggregate function on the SELECT
    -- I think you just want to SUM all your revenue
    SUM((oi.item_price - oi.discount_amount) * oi.quantity) AS total_amount
FROM
    order_items oi
    JOIN products p ON p.product_id = oi.product_id
GROUP BY
    product_name
    WITH ROLLUP ;


... which I think is what you're trying to do.

This strange behaviour arises from the fact that MySQL (and MariaDB, for that matter) allows, in versions previous to the current one, for a GROUP BY to use unaggregated columns that are not part of the GROUP BY list. (See Why does MySQL allow “group by” queries WITHOUT aggregate functions?). This is not standard SQL and should best be avoided. This is handled in current version with ONLY_FULL_GROUP_BY.

Check it at dbfiddle here