Mariadb Vs MySql

2

Recently I made the migration from one page to another server. I began to observe a strange behavior of a module. Perform the inspection of the module and I see an SQL query was not throwing me the expected results. After making the breakdown of the query. As proof I import the BD to the previous server and through phpmyadmin I executed the queries and I could observe that I have different results. Within the analysis I found that the previous server had MySql database engine 5.5.51-38.2 and the new server has a 10.0.35-MariaDB engine. My query to the community is that if this is normal and how I could solve it

The query that I execute is the following:

SELECT temp.C3 as col1,C20 as col2,TABLA3.C2 as col3,C27 as col4 
    FROM (SELECT C3,C20 FROM TABLA1 ORDER BY C1 DESC) AS temp 
    LEFT JOIN TABLA2 ON temp.C3 = TABLA2.C4 
    LEFT JOIN TABLA3 ON TABLA2.C3 = TABLA3.C1
    WHERE TABLA2.C27 != 0 
    GROUP BY C3
    ORDER BY TABLA3.C3 ASC, col1 ASC

The structure of the tables is:

TABLA1
    C1 AUTO INT
    C2-C24 

TABLA2
    C1 AUTO INT
    C2-C27 

TABLA3
    C1 AUTO INT
    C2-C5 

If I run the query on a motor MYSQL works properly with the expected results, but if I run the query on a motor MariaDB the result would be like omitting the ORDER BY C1 DESC statement when building the subtable when the LEFT JOIN .

    
asked by javierfmelo 07.06.2018 в 18:01
source

1 answer

0

Searching for this link

link

I see that this is the cause

    
answered by 09.06.2018 в 01:32