MySQL bug - decimal comparison
I've made some tests and manage to find some interesting results.


You can use the casting operation to solve the problem:

SET totalTaxRate = CAST(totalTax * 100 / amount AS DECIMAL(10,3));
You can use the truncate operation to solve the problem:

SET totalTaxRate = TRUNCATE(totalTax * 100 / amount, 3);
Somehow, using a select after changing the value of the variable seems to also solve the problem...

SET totalTaxRate = totalTax * 100 / amount;
SELECT totalTaxRate;

I'd rather not use this solution as it returns a recordset.
Using a select into also solve the problem

SELECT totalTax * 100 / amount INTO totalTaxRate;


Note: You can use the truncate or casting operation either inside or outside the procedure (even both), but I'd suggest to do it inside so you don't have use the truncate/casting operation on the output every time you call the procedure. 

I still can't assert for sure the root of the problem but, at least, there are some ways to work around it.