Of course, we do our job before and searched this community or the web for similar posts but we found nothing.
Issue:
We are not happy with our current hosting provider and have to make change. In the middle of our database switch from MySQL 5.7 to MariaDB 10.3, we have recognized a SET handling difference, which works perfect in MySQL.
SQL code:
SET @sb = 0;
SELECT art,sb
FROM ARTICLE
WHERE(@sb:=sb) > 700 AND @sb <= 1000 >AND art = 'AM';
MySQL result:
art | sb |
---|---|
AM | 900.00 |
AM | 960.00 |
AM | 1000.00 |
AM | 770.00 |
AM | 800.00 |
the list is much longer... |
MariaDB result:
art | sb |
---|---|
AM | 770.00 |
AM | 960.00 |
AM | 1200.00 |
AM | 3000.00 |
only 10 rows... |
In fact there is a difference between them.
But we want to know:
- Can we configure this in MariaDB, that we get the same result in MySQL?
- Should we replace the Set handling in MariaDB with another one?